From 9eb1841bd8921d98a56f5971a5ce4e8de4288d58 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 6 Jun 2008 00:32:42 +0000 Subject: [PATCH 01/94] moved gfceu to gfceux --- gfceu | 69 ++++++----- gfceu.glade | 321 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 245 insertions(+), 145 deletions(-) diff --git a/gfceu b/gfceu index 95cce395..b27687fc 100644 --- a/gfceu +++ b/gfceu @@ -1,7 +1,8 @@ #!/usr/bin/python # gfceu - Graphical launcher for FCE Ultra. # Designed on Ubuntu, with platfrom independence in mind. -version = "0.6.0" +version = "0.6.1svn" +title = "gfceux" # Copyright (C) 2006 Lukas Sabota ## """ @@ -40,7 +41,7 @@ def gfceu_message(message, use_gtk=False): messages. However, it can be used for important messages as well. If a GTK message_box is requried, the use_gtk flag can be enabled """ - print 'gfceu message: '+message + print title + ' message: '+message if use_gtk: msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE) @@ -56,13 +57,13 @@ def gfceu_error(message, code, use_gtk=True, fatal=True): in the standard python language. One of these days... """ print '# # # #' - print 'gfceu ERROR code '+str(code)+':' + print title + ' ERROR code '+str(code)+':' print message print '# # # #' if use_gtk: msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup('gfceu ERROR Code '+str(code)+':\n'+message) + msgbox.set_markup(title + ' ERROR Code '+str(code)+':\n'+message) msgbox.run() msgbox.destroy() if fatal: @@ -225,26 +226,26 @@ def set_options(): def launch(passed, local=False): - global xml, options, fceu_server_binary, fceu_binary, aoss_binary + global xml, options, fceu_server_binary, fceux_binary set_options() if options.sound_check: - sound = '-sound 1 ' + sound = '--sound 1 ' else: - sound = '-sound 0 ' + sound = '--sound 0 ' if options.fullscreen_check: - fullscreen = '-fs 1 ' + fullscreen = '--fullscreen 1 ' else: - fullscreen = '-fs 0 ' + fullscreen = '--fullscreen 0 ' if options.join_radio: if options.join_pass == '': netpass = '' else: - netpass = '-netpassword ' + '"' + options.join_pass + '" ' - network = '-connect "' + options.join_add + '"'\ - ' -netport '+ str(options.join_port) + ' ' + netpass + netpass = '--pass ' + '"' + options.join_pass + '" ' + network = '-net "' + options.join_add + '"'\ + ' --port '+ str(options.join_port) + ' ' + netpass else: network = '' @@ -252,8 +253,8 @@ def launch(passed, local=False): if options.host_pass == '': netpass = ' ' else: - netpass = ' -netpassword ' + '"' + options.host_pass + '" ' - network = '-connect localhost -netport '+\ + netpass = ' --pass ' + '"' + options.host_pass + '" ' + network = '--net localhost --port '+\ str(options.host_port) + netpass + ' ' @@ -261,11 +262,11 @@ def launch(passed, local=False): network = '' if options.opengl_check: - opengl = '-opengl 1 ' + opengl = '--opengl 1 ' else: - opengl = '-opengl 0 ' + opengl = '--opengl 0 ' - command = aoss_binary + ' ' + fceu_binary +' '+ sound + fullscreen +\ + command = fceux_binary +' '+ sound + fullscreen +\ network + opengl + options.extra_entry + ' '+ passed gfceu_message('Command: ' + command) @@ -297,7 +298,8 @@ def launch(passed, local=False): os.kill(pid, 9) widgets['main_window'].show() -def find_binary(this_binary): +def find_binary(file): + path = os.getenv('PATH') directories= [] directory = '' @@ -310,12 +312,12 @@ def find_binary(this_binary): directory = '' for x in directories: - if os.path.isfile(os.path.join(x, this_binary)): - return os.path.join(x,this_binary) + if os.path.isfile(os.path.join(x, file)): + return os.path.join(x,file) + + if os.path.isfile(os.path.join(os.curdir,file)): + return os.path.join(os.curdir, file) - if os.path.isfile(os.path.join(os.curdir,this_binary)): - return os.path.join(os.curdir, this_binary) - return None # # # # # # # # @@ -483,11 +485,10 @@ class GladeHandlers: ############################################################################## # Globals options = None -appconfigdir = os.getenv('HOME') + '/.gfceu' -old_optionsfile = os.getenv('HOME')+'/.gfceu_options' +appconfigdir = os.getenv('HOME') + '/.'+ title +old_optionsfile = os.getenv('HOME')+'/.' + title + '_options' optionsfile = appconfigdir + 'gfceu_options.dat' -fceu_binary = None -aoss_binary = None +fceux_binary = None fceu_server_binary = None #version is defined earlier in the code #have_vfs is defined earlier in the code @@ -521,21 +522,15 @@ if __name__ == '__main__': parser = OptionParser(version='%prog '+ version) parser.parse_args() - fceu_binary = find_binary('fceu') - if fceu_binary == None: + fceux_binary = find_binary('fceux') + if fceux_binary == None: gfceu_error('Could not find the fceu binary.\n\ Ensure that FCE Ultra is installed and in the $PATH.\n\ On Debian based systems (like Ubuntu), try the following command:\n\ sudo apt-get install fceu', 4, True) else: - gfceu_message('Using: '+fceu_binary) - aoss_binary = find_binary('aoss') - if aoss_binary == None: - gfceu_error('Could not find the the ALSA OSS wrapper.\n\ - GFCEU will not be able to share the sound device with other applications.\n\ - On Debian based systems (like Ubuntu), try the following command:\n\ - sudo apt-get install alsa-oss', 76, True, False) - + gfceu_message('Using: '+fceux_binary) + widgets = WidgetsWrapper() widgets['main_window'].show_all() setup_environment() diff --git a/gfceu.glade b/gfceu.glade index 7d6240fa..399c0144 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -67,22 +67,6 @@ False - - - True - True - Enable _Sound - True - 0 - True - True - - - False - False - 1 - - @@ -140,17 +124,30 @@ 5 5 - + True True - Gamepad _3 + Gamepad _1 True 0 - 1 - 2 + + + + + + True + True + Gamepad _2 + True + 0 + + + + 1 + 2 @@ -172,30 +169,17 @@ - + True True - Gamepad _2 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True 0 + 1 + 2 @@ -271,6 +255,102 @@ 1 + + + True + + + True + X scale: + + + False + 5 + + + + + True + True + 1 1 10 0.5 2 2 + True + + + False + 1 + + + + + False + 2 + + + + + True + + + True + Y scale: + + + False + 5 + + + + + True + True + 1 1 10 0.5 1 10 + True + GTK_UPDATE_IF_VALID + + + False + 1 + + + + + False + 3 + + + + + True + + + True + Bits per pixel: + + + False + 5 + + + + + True + 3 + 8 +16 +32 + + + False + False + 1 + + + + + False + 4 + + True @@ -281,7 +361,7 @@ False False - 2 + 5 @@ -386,9 +466,35 @@ Invalid options may cause GFCE Ultra to perform incorrectly. False + + + True + True + Enable _Sound + True + 0 + True + True + + + 4 + + + + + True + Sound + + + tab + 4 + False + + True + False 5 5 @@ -409,7 +515,6 @@ Invalid options may cause GFCE Ultra to perform incorrectly. True - False 0 GTK_SHADOW_NONE @@ -424,28 +529,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - 4046 1 65536 1 10 10 - 1 - - - 1 - 2 + GTK_FILL @@ -463,13 +553,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - 0 - Port: + True + 4046 1 65536 1 10 10 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -504,7 +609,6 @@ Invalid options may cause GFCE Ultra to perform incorrectly. True - False 0 GTK_SHADOW_NONE @@ -521,54 +625,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -588,13 +651,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 @@ -629,17 +733,18 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - 4 + 5 True + False Network tab - 4 + 5 False From 73aec896e35d1ef707dde9af935ad14cfc19d664 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sat, 7 Jun 2008 00:12:07 +0000 Subject: [PATCH 02/94] added some sounds options to the glade file (though they do not work in the code yet) --- gfceu | 4 ++- gfceu.glade | 77 ++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 73 insertions(+), 8 deletions(-) diff --git a/gfceu b/gfceu index b27687fc..848d735f 100644 --- a/gfceu +++ b/gfceu @@ -519,10 +519,12 @@ class WidgetsWrapper: # main if __name__ == '__main__': # Parse options + fceux_binary = find_binary('fceux') parser = OptionParser(version='%prog '+ version) + parser.add_option('-b', '--binary', action="store", type="string", dest="fceux_binary") parser.parse_args() - fceux_binary = find_binary('fceux') + if fceux_binary == None: gfceu_error('Could not find the fceu binary.\n\ Ensure that FCE Ultra is installed and in the $PATH.\n\ diff --git a/gfceu.glade b/gfceu.glade index 399c0144..d77b0d41 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -202,6 +202,8 @@ False False + 5 + GTK_PACK_END 2 @@ -213,6 +215,7 @@ True + False Input @@ -467,17 +470,77 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True - Enable _Sound - True - 0 - True - True + 5 + + + True + True + Enable _Sound + True + 0 + True + True + + + False + 5 + + + + + True + True + Extra _Quaility + True + 0 + True + True + + + False + 5 + 1 + + + + + True + + + True + Sample rate: + + + False + False + 5 + + + + + True + True + 11000 + + + False + False + 1 + + + + + False + 5 + 2 + + 4 + False From 19c976aa0bdc75a6b128bf2330e65159976987d0 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sat, 7 Jun 2008 22:06:12 +0000 Subject: [PATCH 03/94] New GUI options for soundq and soundrate --- gfceu | 28 ++++++++- gfceu.glade | 176 ++++++++++++++++++++++++++-------------------------- 2 files changed, 114 insertions(+), 90 deletions(-) diff --git a/gfceu b/gfceu index 848d735f..6391476b 100644 --- a/gfceu +++ b/gfceu @@ -109,8 +109,16 @@ except ImportError: # GFCEU Functions class game_options: + # sound sound_check = True + soundq_check = True + soundrate_entry = 11000 + + # video fullscreen_check = False + xscale_spin = 2 + yscale_spin = 2 + bpp_combo = 32 extra_entry = '' romfile = '' opengl_check = False @@ -208,8 +216,13 @@ def set_options(): """ global xml options.romfile = widgets['rom_entry'].get_text() - options.sound_check = widgets['sound_check'].get_active() + # sound + options.sound_check = widgets['sound_check'].get_active() + options.soundq_check = widgets['soundq_check'].get_active() + options.soundrate_entry = widgets['soundrate_entry'].get_text() + + # video options.fullscreen_check = widgets['fullscreen_check'].get_active() options.opengl_check = widgets['opengl_check'].get_active() @@ -223,6 +236,7 @@ def set_options(): options.join_pass = widgets['join_pass'].get_text() options.host_port = widgets['host_port'].get_value() options.host_pass = widgets['host_pass'].get_text() + def launch(passed, local=False): @@ -233,6 +247,16 @@ def launch(passed, local=False): sound = '--sound 1 ' else: sound = '--sound 0 ' + + if options.soundq_check: + soundq = '--soundq 1 ' + else: + soundq = '--soundq 0 ' + + if options.soundrate_entry: + soundrate = '--soundrate ' + options.soundrate_entry + ' ' + else: + soundrate = ' ' if options.fullscreen_check: fullscreen = '--fullscreen 1 ' @@ -266,7 +290,7 @@ def launch(passed, local=False): else: opengl = '--opengl 0 ' - command = fceux_binary +' '+ sound + fullscreen +\ + command = fceux_binary +' '+ sound + soundq + soundrate + fullscreen +\ network + opengl + options.extra_entry + ' '+ passed gfceu_message('Command: ' + command) diff --git a/gfceu.glade b/gfceu.glade index d77b0d41..a5c118ad 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -124,30 +124,17 @@ 5 5 - + True True - Gamepad _1 + Gamepad _3 True 0 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 + 1 + 2 @@ -169,17 +156,30 @@ - + True True - Gamepad _3 + Gamepad _2 + True + 0 + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True 0 - 1 - 2 @@ -272,7 +272,7 @@ - + True True 1 1 10 0.5 2 2 @@ -303,10 +303,10 @@ - + True True - 1 1 10 0.5 1 10 + 2 1 10 0.5 1 10 True GTK_UPDATE_IF_VALID @@ -335,7 +335,7 @@ - + True 3 8 @@ -519,7 +519,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True True 11000 @@ -592,26 +592,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -629,15 +618,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -688,13 +688,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -714,54 +755,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 From 3ecd31976efdf78ae931ebfb7f113a5d3ccdce5c Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sat, 7 Jun 2008 22:08:34 +0000 Subject: [PATCH 04/94] now remembers sound settings on load and quit --- gfceu | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gfceu b/gfceu index 6391476b..044de66e 100644 --- a/gfceu +++ b/gfceu @@ -159,7 +159,11 @@ def give_widgets(): global xml, options try: widgets['rom_entry'].set_text(options.romfile) + + # sound widgets['sound_check'].set_active(options.sound_check) + widgets['soundq_check'].set_active(options.soundq_check) + widgets['soundrate_entry'].set_text(options.soundrate_entry) widgets['fullscreen_check'].set_active(options.fullscreen_check) widgets['opengl_check'].set_active(options.opengl_check) From 1295e797e533241975e5bffedd2ab1ffd3771c48 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 8 Jun 2008 03:33:53 +0000 Subject: [PATCH 05/94] cleaned up sound options --- gfceu | 16 ++++++++++------ gfceu.glade | 4 +++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/gfceu b/gfceu index 044de66e..4f5cd9ae 100644 --- a/gfceu +++ b/gfceu @@ -247,20 +247,24 @@ def launch(passed, local=False): global xml, options, fceu_server_binary, fceux_binary set_options() + sound_options = '' + if options.sound_check: - sound = '--sound 1 ' + sound_options += '--sound 1 ' else: - sound = '--sound 0 ' + sound_options += '--sound 0 ' if options.soundq_check: - soundq = '--soundq 1 ' + sound_options += '--soundq 1 ' else: - soundq = '--soundq 0 ' + sound_options += '--soundq 0 ' if options.soundrate_entry: - soundrate = '--soundrate ' + options.soundrate_entry + ' ' + sound_options += '--soundrate ' + options.soundrate_entry + ' ' else: soundrate = ' ' + + if options.fullscreen_check: fullscreen = '--fullscreen 1 ' @@ -294,7 +298,7 @@ def launch(passed, local=False): else: opengl = '--opengl 0 ' - command = fceux_binary +' '+ sound + soundq + soundrate + fullscreen +\ + command = fceux_binary + ' ' + sound_options + fullscreen +\ network + opengl + options.extra_entry + ' '+ passed gfceu_message('Command: ' + command) diff --git a/gfceu.glade b/gfceu.glade index a5c118ad..4c5013b8 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -275,7 +275,8 @@ True True - 1 1 10 0.5 2 2 + 2 1 10 0.5 1 10 + 1 True @@ -307,6 +308,7 @@ True True 2 1 10 0.5 1 10 + 1 True GTK_UPDATE_IF_VALID From 2abda3ed4a9897a7c87125725ec6ebbd891b3570 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 8 Jun 2008 03:45:41 +0000 Subject: [PATCH 06/94] xscale/yscale options still work todo: bpp --- gfceu | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/gfceu b/gfceu index 4f5cd9ae..41de468f 100644 --- a/gfceu +++ b/gfceu @@ -167,6 +167,8 @@ def give_widgets(): widgets['fullscreen_check'].set_active(options.fullscreen_check) widgets['opengl_check'].set_active(options.opengl_check) + widgets['xscale_spin'].set_value(options.xscale_spin) + widgets['yscale_spin'].set_value(options.yscale_spin) widgets['extra_entry'].set_text(options.extra_entry) @@ -229,6 +231,8 @@ def set_options(): # video options.fullscreen_check = widgets['fullscreen_check'].get_active() options.opengl_check = widgets['opengl_check'].get_active() + options.xscale_spin = widgets['xscale_spin'].get_value() + options.yscale_spin = widgets['yscale_spin'].get_value() options.extra_entry = widgets['extra_entry'].get_text() @@ -243,7 +247,7 @@ def set_options(): -def launch(passed, local=False): +def launch(rom_name, local=False): global xml, options, fceu_server_binary, fceux_binary set_options() @@ -264,13 +268,22 @@ def launch(passed, local=False): else: soundrate = ' ' - - + # video + video_options = '' if options.fullscreen_check: - fullscreen = '--fullscreen 1 ' + video_options += '--fullscreen 1 ' else: - fullscreen = '--fullscreen 0 ' + video_options += '--fullscreen 0 ' + if options.opengl_check: + video_options += '--opengl 1 ' + else: + video_options += '--opengl 0 ' + + video_options += ' --xscale ' + str(options.xscale_spin) + video_options += ' --yscale ' + str(options.yscale_spin) + + if options.join_radio: if options.join_pass == '': netpass = '' @@ -293,13 +306,10 @@ def launch(passed, local=False): if local: network = '' - if options.opengl_check: - opengl = '--opengl 1 ' - else: - opengl = '--opengl 0 ' - command = fceux_binary + ' ' + sound_options + fullscreen +\ - network + opengl + options.extra_entry + ' '+ passed + + command = fceux_binary + ' ' + sound_options + video_options +\ + network + options.extra_entry + ' '+ rom_name gfceu_message('Command: ' + command) From 2b97f232880d2c811fed88bb7afc7ec063d16833 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 8 Jun 2008 03:54:38 +0000 Subject: [PATCH 07/94] got rid of bpp from gui until its fixed --- gfceu.glade | 187 +++++++++++++++++++++++++--------------------------- 1 file changed, 88 insertions(+), 99 deletions(-) diff --git a/gfceu.glade b/gfceu.glade index 4c5013b8..ec13c51a 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -124,17 +124,30 @@ 5 5 - + True True - Gamepad _3 + Gamepad _1 True 0 - 1 - 2 + + + + + + True + True + Gamepad _2 + True + 0 + + + + 1 + 2 @@ -156,30 +169,17 @@ - + True True - Gamepad _2 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True 0 + 1 + 2 @@ -337,18 +337,7 @@ - - True - 3 - 8 -16 -32 - - - False - False - 1 - + @@ -594,28 +583,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - 4046 1 65536 1 10 10 - 1 - - - 1 - 2 + GTK_FILL @@ -633,13 +607,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - 0 - Port: + True + 4046 1 65536 1 10 10 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -690,54 +679,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -757,13 +705,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 From 47edbe285201d06d1585f21f20e9c65e612deb00 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 8 Jun 2008 13:29:21 +0000 Subject: [PATCH 08/94] fixed bug where advanced options would not work --- gfceu | 1 + 1 file changed, 1 insertion(+) diff --git a/gfceu b/gfceu index 41de468f..a5bd84f4 100644 --- a/gfceu +++ b/gfceu @@ -282,6 +282,7 @@ def launch(rom_name, local=False): video_options += ' --xscale ' + str(options.xscale_spin) video_options += ' --yscale ' + str(options.yscale_spin) + video_options += ' ' if options.join_radio: From 02b56cfa33cd180cca87e85ae0d6b905da3f50d6 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 10 Jun 2008 05:56:27 +0000 Subject: [PATCH 09/94] fixed bug in which gfceux would fail to start on virgin systems --- gfceu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfceu b/gfceu index a5bd84f4..ba3ef5e0 100644 --- a/gfceu +++ b/gfceu @@ -112,7 +112,7 @@ class game_options: # sound sound_check = True soundq_check = True - soundrate_entry = 11000 + soundrate_entry = "11000" # video fullscreen_check = False From 357170ae264a81e3f053fd3fc42f9fd9901d57da Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 10 Jun 2008 17:58:55 +0000 Subject: [PATCH 10/94] Reopened the config tab, now that config works again =] --- TODO | 16 +++-- gfceu.glade | 167 ++++++++++++++++++++++++++-------------------------- 2 files changed, 90 insertions(+), 93 deletions(-) diff --git a/TODO b/TODO index fc12b5ac..af5ab2b7 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,8 @@ TODO: -* Ensure version server >= 0.0.5 -* Resolution? -* Windows Support -* --last command line option -* normal options (quiet) -* server nick -* no xterm - In progress - status_window.py started, needs to work to be functional -* Browser? +* improve button config now that config system is resolved +* resolution +* parse normal options (etc quiet) +* Browser + +Deferred: +* A lot of shit was going to be done with the client/server GUI, but netplay is fucked in svn as it is. diff --git a/gfceu.glade b/gfceu.glade index ec13c51a..2a9c0fc5 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -124,30 +124,17 @@ 5 5 - + True True - Gamepad _1 + Gamepad _3 True 0 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 + 1 + 2 @@ -169,17 +156,30 @@ - + True True - Gamepad _3 + Gamepad _2 + True + 0 + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True 0 - 1 - 2 @@ -215,7 +215,6 @@ True - False Input @@ -583,26 +582,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -620,15 +608,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -679,13 +678,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -705,54 +745,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 From 3d98cd56a6c599b679e40afc102e669d9b9e28f4 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 11 Jun 2008 01:57:28 +0000 Subject: [PATCH 11/94] started some glade gtk mockups for controller config --- gfceu.glade | 386 ++++++++++++++++++++++++++++++++++++++----------- mockup_test.py | 17 +++ 2 files changed, 316 insertions(+), 87 deletions(-) create mode 100644 mockup_test.py diff --git a/gfceu.glade b/gfceu.glade index 2a9c0fc5..80cb8cf5 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -124,17 +124,30 @@ 5 5 - + True True - Gamepad _3 + Gamepad _1 True 0 - 1 - 2 + + + + + + True + True + Gamepad _2 + True + 0 + + + + 1 + 2 @@ -156,30 +169,17 @@ - + True True - Gamepad _2 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True 0 + 1 + 2 @@ -582,28 +582,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - 4046 1 65536 1 10 10 - 1 - - - 1 - 2 + GTK_FILL @@ -621,13 +606,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - 0 - Port: + True + 4046 1 65536 1 10 10 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -678,54 +678,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -745,13 +704,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 @@ -922,4 +922,216 @@ Artwork for old versions (< 0.2.7): + + + + True + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + 3 + 3 + + + True + True + True + Right + 0 + + + 2 + 3 + 1 + 2 + + + + + True + True + True + Down + 0 + + + 1 + 2 + 2 + 3 + + + + + True + True + True + Left + 0 + + + 1 + 2 + + + + + True + True + True + Up + 0 + + + 1 + 2 + + + + + + + + + + + + + + + + + + + + + + + + True + <b>D-Pad</b> + True + + + label_item + + + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + True + Select + 0 + + + + + True + True + True + Start + 0 + + + 1 + + + + + + + + + True + <b>Essentials</b> + True + + + label_item + + + + + 1 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + True + B + 0 + + + + + True + True + True + A + 0 + + + 1 + + + + + + + + + True + <b>Alpha and Beta</b> + True + + + label_item + + + + + 2 + + + + + diff --git a/mockup_test.py b/mockup_test.py new file mode 100644 index 00000000..3eb75e94 --- /dev/null +++ b/mockup_test.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# displays mockup of gamepad config +import gtk, gtk.glade + +class WidgetsWrapper: + def __init__(self): + self.widgets = gtk.glade.XML ('gfceu.glade', "gamepad_config_window") + self.widgets.signal_autoconnect(GladeHandlers.__dict__) + # Gives us the ability to do: widgets['widget_name'].action() + def __getitem__(self, key): + return self.widgets.get_widget(key) + +widgets = WidgetsWrapper() + +widgets['gamepad_config_window'].show_all() +gtk.main () + From bb4030d361dec63d131bea1a00d690aa9d0514c2 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Jun 2008 13:59:54 +0000 Subject: [PATCH 12/94] Fixed some issues with loading the glade file. Fixed an issue where the glade UI wouldn't load when prefix isn't /usr/ Elegantly closes when the glade file cannot be read --- gfceu | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gfceu b/gfceu index ba3ef5e0..ebc9c024 100644 --- a/gfceu +++ b/gfceu @@ -543,16 +543,20 @@ class WidgetsWrapper: if os.path.isfile('gfceu.glade'): glade_file = 'gfceu.glade' # Then check to see if its installed on a *nix system - elif os.path.isfile(os.path.join(os.path.dirname(sys.executable), '../share/gfceu/gfceu.glade')): - glade_file = os.path.join(os.path.dirname(sys.executable), '../share/gfceu/gfceu.glade') + elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.glade')): + glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.glade') else: print 'ERROR.' print 'Could not find the glade interface file.' print 'Try reinstalling the application.' sys.exit(1) - self.widgets = gtk.glade.XML(glade_file) - self.widgets.signal_autoconnect(GladeHandlers.__dict__) + try: + print "Using: " + glade_file + self.widgets = gtk.glade.XML(glade_file) + self.widgets.signal_autoconnect(GladeHandlers.__dict__) + except: + gfceu_error("Couldn't load the glade UI file", 24) def __getitem__(self, key): return self.widgets.get_widget(key) From d547cc57ba340d3ebb7ed5318ef617e461642f9c Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Jun 2008 14:39:48 +0000 Subject: [PATCH 13/94] Transitioned from gtk.glade to gtk.Builder. gtk.glade will be depreciated soon and builder is much cleaner. gtk.Builder requires pygtk >= 2.12, so as does gfceux --- ChangeLog | 3 + gfceu | 224 +++++------ gfceu.glade | 234 +++++------ gfceu.xml | 1117 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1349 insertions(+), 229 deletions(-) create mode 100644 gfceu.xml diff --git a/ChangeLog b/ChangeLog index ccb3902c..e2dac599 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +* Major code cleanup +* Now requires pygtk >= 2.12 +* Transitioned from gtk.glade to gtk.Builder. * Changed some strings to reflect new email and website * Fixed and cleaned some stuff with the glade loading ========================== version 0.6.0 ======================== diff --git a/gfceu b/gfceu index ebc9c024..3443c697 100644 --- a/gfceu +++ b/gfceu @@ -33,7 +33,7 @@ from subprocess import Popen # # # # # # # # # Messaging Functions -def gfceu_message(message, use_gtk=False): +def gfceu_print(text, use_gtk=False): """ gqfceu_message() @@ -41,11 +41,11 @@ def gfceu_message(message, use_gtk=False): messages. However, it can be used for important messages as well. If a GTK message_box is requried, the use_gtk flag can be enabled """ - print title + ' message: '+message + print text if use_gtk: msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(message) + msgbox.set_markup(text) msgbox.run() msgbox.destroy() @@ -74,19 +74,20 @@ def gfceu_error(message, code, use_gtk=True, fatal=True): # Import libraries try: import pytgtk - pygtk.require("2.6") + pygtk.require("2.12") except: pass try: import gtk except ImportError: gfceu_error('The PyGTK libraries cannot be found.\n\ - Ensure that PyGTK (>=2.0) is installed on this system.\n\ + Ensure that PyGTK (>=2.12) is installed on this system.\n\ On Debian based systems (like Ubuntu), try this command:\n\ sudo apt-get install python-gtk2 libgtk2.0-0', 1, False) try: - import gtk.glade + #import gtk.glade + pass except ImportError: gfceu_error('The glade libraries cannot be found.\n\ Ensure that libglade is installed on this system.\n\ @@ -158,31 +159,31 @@ def give_widgets(): """ global xml, options try: - widgets['rom_entry'].set_text(options.romfile) + widgets.get_object("rom_entry").set_text(options.romfile) # sound - widgets['sound_check'].set_active(options.sound_check) - widgets['soundq_check'].set_active(options.soundq_check) - widgets['soundrate_entry'].set_text(options.soundrate_entry) + widgets.get_object("sound_check").set_active(options.sound_check) + widgets.get_object("soundq_check").set_active(options.soundq_check) + widgets.get_object("soundrate_entry").set_text(options.soundrate_entry) - widgets['fullscreen_check'].set_active(options.fullscreen_check) - widgets['opengl_check'].set_active(options.opengl_check) - widgets['xscale_spin'].set_value(options.xscale_spin) - widgets['yscale_spin'].set_value(options.yscale_spin) + widgets.get_object("fullscreen_check").set_active(options.fullscreen_check) + widgets.get_object("opengl_check").set_active(options.opengl_check) + widgets.get_object("xscale_spin").set_value(options.xscale_spin) + widgets.get_object("yscale_spin").set_value(options.yscale_spin) - widgets['extra_entry'].set_text(options.extra_entry) + widgets.get_object("extra_entry").set_text(options.extra_entry) # Usability point: # Users will probably not want to remember their previous network setting. # Users may accidently be connecting to a remote server/hosting a game when # they were unaware. # No network is being set by default - widgets['no_network_radio'].set_active(True) - widgets['join_add'].set_text(options.join_add) - widgets['join_port'].set_value(float(options.join_port)) - widgets['join_pass'].set_text(options.join_pass) - widgets['host_port'].set_value(float(options.host_port)) - widgets['host_pass'].set_text(options.host_pass) + widgets.get_object("no_network_radio").set_active(True) + widgets.get_object("join_add").set_text(options.join_add) + widgets.get_object("join_port").set_value(float(options.join_port)) + widgets.get_object("join_pass").set_text(options.join_pass) + widgets.get_object("host_port").set_value(float(options.host_port)) + widgets.get_object("host_pass").set_text(options.host_pass) except AttributeError: # When new widgets are added, old pickle files might break. @@ -204,13 +205,13 @@ def setup_environment (): if not os.path.exists(appconfigdir): # this is the first time the application is run. # create the directory - gfceu_message("Creating application settings directory") + gfceu_print("Creating application settings directory") os.mkdir(appconfigdir) if os.path.exists(old_optionsfile): # for full backwards compatibility, this file is processed, but moved # to the new directory and filename for future compatibility - gfceu_message("Old version of options file found, converting to new version") + gfceu_print("Old version of options file found, converting to new version") shutil.move(old_optionsfile,optionsfile) def set_options(): @@ -221,29 +222,29 @@ def set_options(): and stores it in the options object. """ global xml - options.romfile = widgets['rom_entry'].get_text() + options.romfile = widgets.get_object("rom_entry").get_text() # sound - options.sound_check = widgets['sound_check'].get_active() - options.soundq_check = widgets['soundq_check'].get_active() - options.soundrate_entry = widgets['soundrate_entry'].get_text() + options.sound_check = widgets.get_object("sound_check").get_active() + options.soundq_check = widgets.get_object("soundq_check").get_active() + options.soundrate_entry = widgets.get_object("soundrate_entry").get_text() # video - options.fullscreen_check = widgets['fullscreen_check'].get_active() - options.opengl_check = widgets['opengl_check'].get_active() - options.xscale_spin = widgets['xscale_spin'].get_value() - options.yscale_spin = widgets['yscale_spin'].get_value() + options.fullscreen_check = widgets.get_object("fullscreen_check").get_active() + options.opengl_check = widgets.get_object("opengl_check").get_active() + options.xscale_spin = widgets.get_object("xscale_spin").get_value() + options.yscale_spin = widgets.get_object("yscale_spin").get_value() - options.extra_entry = widgets['extra_entry'].get_text() + options.extra_entry = widgets.get_object("extra_entry").get_text() - options.join_radio = widgets['join_radio'].get_active() - options.host_radio = widgets['host_radio'].get_active() - options.no_network_radio = widgets['no_network_radio'].get_active() - options.join_add = widgets['join_add'].get_text() - options.join_port = widgets['join_port'].get_value() - options.join_pass = widgets['join_pass'].get_text() - options.host_port = widgets['host_port'].get_value() - options.host_pass = widgets['host_pass'].get_text() + options.join_radio = widgets.get_object("join_radio").get_active() + options.host_radio = widgets.get_object("host_radio").get_active() + options.no_network_radio = widgets.get_object("no_network_radio").get_active() + options.join_add = widgets.get_object("join_add").get_text() + options.join_port = widgets.get_object("join_port").get_value() + options.join_pass = widgets.get_object("join_pass").get_text() + options.host_port = widgets.get_object("host_port").get_value() + options.host_pass = widgets.get_object("host_pass").get_text() @@ -311,7 +312,7 @@ def launch(rom_name, local=False): command = fceux_binary + ' ' + sound_options + video_options +\ network + options.extra_entry + ' '+ rom_name - gfceu_message('Command: ' + command) + gfceu_print('Command: ' + command) if options.host_radio: @@ -329,7 +330,7 @@ def launch(rom_name, local=False): args.append(options.host_pass) pid = Popen(args).pid - widgets['main_window'].hide() + widgets.get_object("main_window").hide() # os.system() is a blocker, so we must force # gtk to process our events. @@ -339,7 +340,7 @@ def launch(rom_name, local=False): os.system(command) if options.host_radio: os.kill(pid, 9) - widgets['main_window'].show() + widgets.get_object("main_window").show() def find_binary(file): @@ -366,12 +367,48 @@ def find_binary(file): # # # # # # # # # GTK Signal Handlers class GladeHandlers: - def launch_button_clicked(arg1): + pass + +############################################################################## +# Globals +options = None +appconfigdir = os.getenv('HOME') + '/.'+ title +old_optionsfile = os.getenv('HOME')+'/.' + title + '_options' +optionsfile = appconfigdir + 'gfceu_options.dat' +fceux_binary = None +fceu_server_binary = None +#version is defined earlier in the code +#have_vfs is defined earlier in the code + +class WidgetsWrapper: + def __init__(self): + # Search for the glade file + # Check first in the directory of this script. + global widgets + if os.path.isfile('gfceu.xml'): + glade_file = 'gfceu.xml' + # Then check to see if its installed on a *nix system + elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.xml')): + glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.xml') + else: + print 'ERROR.' + print 'Could not find the glade interface file.' + print 'Try reinstalling the application.' + sys.exit(1) + + try: + print "Using: " + glade_file + widgets = gtk.Builder() + widgets.add_from_file(glade_file) + widgets.connect_signals(self) + except: + gfceu_error("Couldn't load the glade UI file", 24) + def launch_button_clicked(self, arg1): global xml global options - options.romfile = widgets['rom_entry'].get_text() - if widgets['rom_entry'].get_text() == '': - gfceu_message('Please specify a ROM to open in the main tab.', True) + options.romfile = widgets.get_object("rom_entry").get_text() + if widgets.get_object("rom_entry").get_text() == '': + gfceu_print('Please specify a ROM to open in the main tab.', True) return if options.network_rom: try: @@ -401,15 +438,14 @@ class GladeHandlers: romfile = options.romfile launch('"'+romfile+'"') - - - def about_button_clicked(arg1): + + def about_button_clicked(self, menuitem, data=None): global xml - widgets['about_dialog'].set_name('GNOME FCE Ultra '+version) - widgets['about_dialog'].run() - widgets['about_dialog'].hide() + widgets.get_object("about_dialog").set_name('GNOME FCE Ultra '+version) + widgets.get_object("about_dialog").run() + widgets.get_object("about_dialog").hide() - def browse_button_clicked(widget): + def browse_button_clicked(self, menuitem, data=None): global xml,options set_options() chooser = gtk.FileChooserDialog("Open...", None, @@ -451,17 +487,17 @@ class GladeHandlers: if response == gtk.RESPONSE_OK: if chooser.get_filename(): x = chooser.get_filename() - widgets['rom_entry'].set_text(x) + widgets.get_object("rom_entry").set_text(x) options.romfile = x options.network_rom = False elif chooser.get_uri(): x = chooser.get_uri() - widgets['rom_entry'].set_text(x) + widgets.get_object("rom_entry").set_text(x) options.romfile = x options.network_rom = True - def gamepad_clicked(widget): - print widget.name + def gamepad_clicked(self, widget, data=None): + d = {'gp1_button' : '1', 'gp2_button' : '2', 'gp3_button' : '3', @@ -469,7 +505,7 @@ class GladeHandlers: command = '-inputcfg gamepad' + d[widget.name] + ' /dev/null' launch(command, True) - def config_help_button_clicked(arg1): + def config_help_button_clicked(self, menuitem, data=None): msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE) msgbox.set_markup("Once a gamepad is seleceted, a titlebar will be displayed\ @@ -480,17 +516,17 @@ class GladeHandlers: msgbox.hide() - def join_radio_clicked(arg1): + def join_radio_clicked(self, menuitem, data=None): global options - widgets['join_frame'].set_sensitive(True) - widgets['host_frame'].set_sensitive(False) + widgets.get_object("join_frame").set_sensitive(True) + widgets.get_object("host_frame").set_sensitive(False) options.join_radio = True options.host_radio = False options.no_network_radio = False - def host_radio_clicked(arg1): + def host_radio_clicked(self, menuitem, data=None): global fceu_server_binary - if widgets['host_radio'].get_active(): + if widgets.get_object("host_radio").get_active(): fceu_server_binary = find_binary('fceu-server') if fceu_server_binary == None: if os.name == 'nt': @@ -501,67 +537,31 @@ class GladeHandlers: gfceu_error("The fceu server software cannot be found on \n\ this system. Ensure that it is installed and in your path.", 101, True, False) - widgets['no_network_radio'].set_active(True) + widgets.get_object("no_network_radio").set_active(True) options.no_network_radio = True return False - gfceu_message("Using: "+fceu_server_binary) - widgets['join_frame'].set_sensitive(False) - widgets['host_frame'].set_sensitive(True) + gfceu_print("Using: "+fceu_server_binary) + widgets.get_object("join_frame").set_sensitive(False) + widgets.get_object("host_frame").set_sensitive(True) options.join_radio = False options.host_radio = True options.no_network_radio = False - def no_network_radio_clicked(arg1): - widgets['join_frame'].set_sensitive(False) - widgets['host_frame'].set_sensitive(False) + def no_network_radio_clicked(self, menuitem, data=None): + widgets.get_object("join_frame").set_sensitive(False) + widgets.get_object("host_frame").set_sensitive(False) options.join_radio = False options.host_radio = False options.no_network_radio = True - def end(widget,arg=0): + def end(self, menuitem, data=None): global xml, options, optionsfile set_options() save_options() gtk.main_quit() - -############################################################################## -# Globals -options = None -appconfigdir = os.getenv('HOME') + '/.'+ title -old_optionsfile = os.getenv('HOME')+'/.' + title + '_options' -optionsfile = appconfigdir + 'gfceu_options.dat' -fceux_binary = None -fceu_server_binary = None -#version is defined earlier in the code -#have_vfs is defined earlier in the code - -class WidgetsWrapper: - def __init__(self): - # Search for the glade file - # Check first in the directory of this script. - if os.path.isfile('gfceu.glade'): - glade_file = 'gfceu.glade' - # Then check to see if its installed on a *nix system - elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.glade')): - glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.glade') - else: - print 'ERROR.' - print 'Could not find the glade interface file.' - print 'Try reinstalling the application.' - sys.exit(1) - - try: - print "Using: " + glade_file - self.widgets = gtk.glade.XML(glade_file) - self.widgets.signal_autoconnect(GladeHandlers.__dict__) - except: - gfceu_error("Couldn't load the glade UI file", 24) - - def __getitem__(self, key): - return self.widgets.get_widget(key) - +widgets = None # # # # # # # # # main if __name__ == '__main__': @@ -578,10 +578,10 @@ if __name__ == '__main__': On Debian based systems (like Ubuntu), try the following command:\n\ sudo apt-get install fceu', 4, True) else: - gfceu_message('Using: '+fceux_binary) + gfceu_print('Using: '+fceux_binary) - widgets = WidgetsWrapper() - widgets['main_window'].show_all() + wrap = WidgetsWrapper() + widgets.get_object("main_window").show_all() setup_environment() options = game_options() diff --git a/gfceu.glade b/gfceu.glade index 80cb8cf5..57d03c28 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -124,30 +124,17 @@ 5 5 - + True True - Gamepad _1 + Gamepad _3 True 0 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 + 1 + 2 @@ -169,17 +156,30 @@ - + True True - Gamepad _3 + Gamepad _2 + True + 0 + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True 0 - 1 - 2 @@ -582,26 +582,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -619,15 +608,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -678,13 +678,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -704,54 +745,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 @@ -941,16 +941,42 @@ Artwork for old versions (< 0.2.7): 3 3 - + + + + + + + + + + + + + + + + True True True - Right + Up + 0 + + + 1 + 2 + + + + + True + True + True + Left 0 - 2 - 3 1 2 @@ -971,46 +997,20 @@ Artwork for old versions (< 0.2.7): - + True True True - Left + Right 0 + 2 + 3 1 2 - - - True - True - True - Up - 0 - - - 1 - 2 - - - - - - - - - - - - - - - - - diff --git a/gfceu.xml b/gfceu.xml new file mode 100644 index 00000000..1a090d39 --- /dev/null +++ b/gfceu.xml @@ -0,0 +1,1117 @@ + + + + + 10 + 1 + 1 + 0.5 + 10 + 2 + + + 10 + 1 + 1 + 0.5 + 10 + 2 + + + 65536 + 1 + 10 + 1 + 10 + 4046 + + + 65536 + 1 + 10 + 1 + 10 + 4046 + + + True + GFCE Ultra + 442 + gfceu.png + + + + True + 1 + + + True + True + 3 + + + True + 5 + 5 + + + True + 5 + + + True + 5 + ROM Filename: + + + False + False + + + + + True + True + + + 1 + + + + + True + True + _Browse... + True + + + + False + False + 2 + + + + + False + False + + + + + + + True + Main + + + False + + + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + Select an NES gamepad to configure. + True + + + False + False + 7 + 1 + + + + + False + False + + + + + True + 2 + 2 + 5 + 5 + + + True + True + Gamepad _3 + True + + + + 1 + 2 + + + + + + True + True + Gamepad _4 + True + + + + 1 + 2 + 1 + 2 + + + + + + True + True + Gamepad _2 + True + + + + 1 + 2 + + + + + + True + True + Gamepad _1 + True + + + + + + + + + False + False + 1 + + + + + True + True + gtk-help + True + + + + False + False + 5 + GTK_PACK_END + 2 + + + + + + + True + Input + + + 1 + False + + + + + True + 5 + 5 + + + True + True + Enable _OpenGL Rendering + True + True + + + False + False + + + + + True + True + Enable _Full Screen + True + True + + + False + False + 1 + + + + + True + + + True + X scale: + + + False + 5 + + + + + True + True + adjustment1 + 1 + True + + + False + 1 + + + + + False + 2 + + + + + True + + + True + Y scale: + + + False + 5 + + + + + True + True + adjustment2 + 1 + True + GTK_UPDATE_IF_VALID + + + False + 1 + + + + + False + 3 + + + + + True + + + True + Bits per pixel: + + + False + 5 + + + + + + + + False + 4 + + + + + True + <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> + True + True + + + False + False + 5 + + + + + + + True + Video + + + 2 + False + + + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. + +Invalid options may cause GFCE Ultra to perform incorrectly. + + True + + + False + False + 1 + + + + + False + False + 5 + + + + + True + + + True + Extra Parameters: + + + False + False + 5 + + + + + True + True + + + 5 + 1 + + + + + False + 1 + + + + + + + True + Advanced + + + 3 + False + + + + + True + 5 + + + True + True + Enable _Sound + True + True + True + + + False + 5 + + + + + True + True + Extra _Quaility + True + True + True + + + False + 5 + 1 + + + + + True + + + True + Sample rate: + + + False + False + 5 + + + + + True + True + 11000 + + + False + False + 1 + + + + + False + 5 + 2 + + + + + 4 + False + + + + + True + Sound + + + 4 + False + + + + + True + False + 5 + 5 + + + True + True + _Host Game + True + True + + + + False + False + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 19 + + + True + 2 + 2 + 5 + 5 + + + True + True + + + 1 + 2 + 1 + 2 + + + + + + True + True + adjustment3 + 1 + + + 1 + 2 + + + + + + True + 0 + Password: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL + + + + + + + + + + False + False + 1 + + + + + True + True + _Join Game + True + True + host_radio + + + + False + False + 2 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 0 + 19 + + + True + 5 + 3 + 2 + 3 + 5 + + + True + True + adjustment4 + 1 + + + 1 + 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + True + False + * + + + 1 + 2 + 2 + 3 + + + + + + True + True + + + 1 + 2 + + + + + + + + + + False + False + 3 + + + + + True + True + _No Network + True + True + True + host_radio + + + + False + False + 4 + + + + + + + True + False + Network + + + 5 + False + + + + + 10 + + + + + True + True + + + True + 3 + + + True + True + True + True + True + gtk-execute + True + + + + False + + + + + True + True + gtk-about + True + + + + False + False + 1 + + + + + True + True + gtk-quit + True + + + + False + 2 + + + + + + + False + False + 1 + + + + + + + GDK_WINDOW_TYPE_HINT_NORMAL + (C) Copyright 2006 + A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator + http://dietschnitzel.com/gfceu/ + This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + Lukas Sabota +<ltsmooth42@gmail.comt> + +Patch writers: +Scott Brown + translator-credits + Sketching: + J. Sammer +Digital Manipulation: + C. Kontros + +Artwork for old versions (< 0.2.7): + Jimmy Angelakos + <vyruss000@gmail.com> + gfceu_big.png + + + True + + + + + + True + + + False + GTK_PACK_END + + + + + + + + + True + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + 3 + 3 + + + + + + + + + + + + + + + + + + True + True + True + Up + + + 1 + 2 + + + + + True + True + True + Left + + + 1 + 2 + + + + + True + True + True + Down + + + 1 + 2 + 2 + 3 + + + + + True + True + True + Right + + + 2 + 3 + 1 + 2 + + + + + + + + + True + <b>D-Pad</b> + True + + + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + True + Select + + + + + True + True + True + Start + + + 1 + + + + + + + + + True + <b>Essentials</b> + True + + + + + 1 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + True + B + + + + + True + True + True + A + + + 1 + + + + + + + + + True + <b>Alpha and Beta</b> + True + + + + + 2 + + + + + + From e6cc29b7d2c0f759565cd288ba842258b2efafab Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Jun 2008 15:04:13 +0000 Subject: [PATCH 14/94] code cleanup --- gfceu | 63 +++++++++++++++++++++-------------------------------------- 1 file changed, 22 insertions(+), 41 deletions(-) diff --git a/gfceu b/gfceu index 3443c697..ae9c6fe0 100644 --- a/gfceu +++ b/gfceu @@ -35,11 +35,10 @@ from subprocess import Popen # Messaging Functions def gfceu_print(text, use_gtk=False): """ - gqfceu_message() + gfceu_print() This function prints messages to the user. This is generally used for status - messages. However, it can be used for important messages as well. If a - GTK message_box is requried, the use_gtk flag can be enabled + messages. If a GTK message_box is requried, the use_gtk flag can be enabled. """ print text if use_gtk: @@ -53,13 +52,9 @@ def gfceu_error(message, code, use_gtk=True, fatal=True): """ gfceu_error() - TODO: This can be reworked to use the raise/except methods already defined - in the standard python language. One of these days... + Presents the user with an error message and optionally quits the program. """ - print '# # # #' - print title + ' ERROR code '+str(code)+':' - print message - print '# # # #' + print title + ' error code '+str(code)+': ' + message if use_gtk: msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_CLOSE) @@ -84,15 +79,6 @@ except ImportError: Ensure that PyGTK (>=2.12) is installed on this system.\n\ On Debian based systems (like Ubuntu), try this command:\n\ sudo apt-get install python-gtk2 libgtk2.0-0', 1, False) - -try: - #import gtk.glade - pass -except ImportError: - gfceu_error('The glade libraries cannot be found.\n\ - Ensure that libglade is installed on this system.\n\ - On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install libglade2-0 python-gtk2', 2, False) try: import gnomevfs @@ -123,6 +109,8 @@ class game_options: extra_entry = '' romfile = '' opengl_check = False + + # network join_radio = False join_add = '' join_port = 4046 @@ -185,7 +173,7 @@ def give_widgets(): widgets.get_object("host_port").set_value(float(options.host_port)) widgets.get_object("host_pass").set_text(options.host_pass) - except AttributeError: + except: # When new widgets are added, old pickle files might break. options = game_options() give_widgets() @@ -199,20 +187,13 @@ def setup_environment (): a separate directory. """ - global appconfigdir, old_optionsfile, optionsfile + global appconfigdir, optionsfile - if not os.path.exists(appconfigdir): # this is the first time the application is run. # create the directory gfceu_print("Creating application settings directory") os.mkdir(appconfigdir) - - if os.path.exists(old_optionsfile): - # for full backwards compatibility, this file is processed, but moved - # to the new directory and filename for future compatibility - gfceu_print("Old version of options file found, converting to new version") - shutil.move(old_optionsfile,optionsfile) def set_options(): """ @@ -286,6 +267,8 @@ def launch(rom_name, local=False): video_options += ' ' + # Netplay is fucked right now + """ if options.join_radio: if options.join_pass == '': netpass = '' @@ -302,19 +285,19 @@ def launch(rom_name, local=False): else: netpass = ' --pass ' + '"' + options.host_pass + '" ' network = '--net localhost --port '+\ - str(options.host_port) + netpass + ' ' - + str(options.host_port) + netpass + ' ' if local: network = '' - - + """ + network = '' command = fceux_binary + ' ' + sound_options + video_options +\ network + options.extra_entry + ' '+ rom_name gfceu_print('Command: ' + command) - + # more code to disable because netplay is fucked + """ if options.host_radio: xterm_binary = find_binary("xterm") if xterm_binary == None: @@ -329,7 +312,7 @@ def launch(rom_name, local=False): args.append("--password") args.append(options.host_pass) pid = Popen(args).pid - + """ widgets.get_object("main_window").hide() # os.system() is a blocker, so we must force @@ -338,9 +321,14 @@ def launch(rom_name, local=False): gtk.main_iteration_do() os.system(command) + widgets.get_object("main_window").show() + + # another part of netplay code + """ if options.host_radio: os.kill(pid, 9) - widgets.get_object("main_window").show() + """ + def find_binary(file): @@ -364,21 +352,14 @@ def find_binary(file): return None - # # # # # # # # -# GTK Signal Handlers -class GladeHandlers: - pass ############################################################################## # Globals options = None appconfigdir = os.getenv('HOME') + '/.'+ title -old_optionsfile = os.getenv('HOME')+'/.' + title + '_options' optionsfile = appconfigdir + 'gfceu_options.dat' fceux_binary = None fceu_server_binary = None -#version is defined earlier in the code -#have_vfs is defined earlier in the code class WidgetsWrapper: def __init__(self): From cff7eb225aacb833b5b4da95c7221ebda351639c Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Jun 2008 15:46:41 +0000 Subject: [PATCH 15/94] Major code cleanup --- gfceu | 409 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 207 insertions(+), 202 deletions(-) diff --git a/gfceu b/gfceu index ae9c6fe0..a5b9b0c8 100644 --- a/gfceu +++ b/gfceu @@ -31,65 +31,28 @@ import shutil from optparse import OptionParser from subprocess import Popen - # # # # # # # # -# Messaging Functions -def gfceu_print(text, use_gtk=False): - """ - gfceu_print() - - This function prints messages to the user. This is generally used for status - messages. If a GTK message_box is requried, the use_gtk flag can be enabled. - """ - print text - if use_gtk: - msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, - buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(text) - msgbox.run() - msgbox.destroy() - -def gfceu_error(message, code, use_gtk=True, fatal=True): - """ - gfceu_error() - - Presents the user with an error message and optionally quits the program. - """ - print title + ' error code '+str(code)+': ' + message - if use_gtk: - msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, - buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(title + ' ERROR Code '+str(code)+':\n'+message) - msgbox.run() - msgbox.destroy() - if fatal: - sys.exit(code) - - - # # # # # # # # -# Import libraries -try: - import pytgtk - pygtk.require("2.12") -except: - pass try: + import pygtk + pygtk.require("2.0") import gtk except ImportError: - gfceu_error('The PyGTK libraries cannot be found.\n\ + print "The PyGTK libraries cannot be found.\n\ Ensure that PyGTK (>=2.12) is installed on this system.\n\ On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install python-gtk2 libgtk2.0-0', 1, False) + sudo apt-get install python-gtk2 libgtk2.0-0" try: import gnomevfs have_gnomevfs = True except ImportError: - gfceu_error('The gnomevfs libraries cannot be found.\n\ + print "The gnomevfs libraries cannot be found.\n\ To enable ROM loading over the network, ensure that gnomevfs is installed on\ this system.\n\ On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install python-gtk2 libgnomevfs2-0', 5, False, False) + sudo apt-get install python-gtk2 libgnomevfs2-0" have_gnomevfs = False + + # # # # # # # # @@ -145,7 +108,7 @@ def give_widgets(): This function takes data from the options struct and relays it to the GTK window """ - global xml, options + global options, widgets try: widgets.get_object("rom_entry").set_text(options.romfile) @@ -173,27 +136,11 @@ def give_widgets(): widgets.get_object("host_port").set_value(float(options.host_port)) widgets.get_object("host_pass").set_text(options.host_pass) - except: + except AttributeError: # When new widgets are added, old pickle files might break. options = game_options() give_widgets() -def setup_environment (): - """ - Configures the environment if this is the first time the application - has been run. For instance, it checks for the options file and creates - it if it doesn't exist. It also converts between the old version and - the new version of this application, which stores the options file in - a separate directory. - """ - - global appconfigdir, optionsfile - - if not os.path.exists(appconfigdir): - # this is the first time the application is run. - # create the directory - gfceu_print("Creating application settings directory") - os.mkdir(appconfigdir) def set_options(): """ @@ -202,7 +149,6 @@ def set_options(): This function grabs all of the data from the GTK widgets and stores it in the options object. """ - global xml options.romfile = widgets.get_object("rom_entry").get_text() # sound @@ -229,105 +175,7 @@ def set_options(): -def launch(rom_name, local=False): - global xml, options, fceu_server_binary, fceux_binary - set_options() - - sound_options = '' - - if options.sound_check: - sound_options += '--sound 1 ' - else: - sound_options += '--sound 0 ' - if options.soundq_check: - sound_options += '--soundq 1 ' - else: - sound_options += '--soundq 0 ' - - if options.soundrate_entry: - sound_options += '--soundrate ' + options.soundrate_entry + ' ' - else: - soundrate = ' ' - - # video - video_options = '' - if options.fullscreen_check: - video_options += '--fullscreen 1 ' - else: - video_options += '--fullscreen 0 ' - - if options.opengl_check: - video_options += '--opengl 1 ' - else: - video_options += '--opengl 0 ' - - video_options += ' --xscale ' + str(options.xscale_spin) - video_options += ' --yscale ' + str(options.yscale_spin) - video_options += ' ' - - - # Netplay is fucked right now - """ - if options.join_radio: - if options.join_pass == '': - netpass = '' - else: - netpass = '--pass ' + '"' + options.join_pass + '" ' - network = '-net "' + options.join_add + '"'\ - ' --port '+ str(options.join_port) + ' ' + netpass - else: - network = '' - - if options.host_radio: - if options.host_pass == '': - netpass = ' ' - else: - netpass = ' --pass ' + '"' + options.host_pass + '" ' - network = '--net localhost --port '+\ - str(options.host_port) + netpass + ' ' - - if local: - network = '' - """ - network = '' - - command = fceux_binary + ' ' + sound_options + video_options +\ - network + options.extra_entry + ' '+ rom_name - gfceu_print('Command: ' + command) - - # more code to disable because netplay is fucked - """ - if options.host_radio: - xterm_binary = find_binary("xterm") - if xterm_binary == None: - gfceu_error("Cannot find xterm on this system. You will not \n\ - be informed of server output.", 102, True, False) - args = [fceu_server_binary] - else: - args = [xterm_binary, "-e", fceu_server_binary] - args.append('--port') - args.append(str(options.host_port)) - if options.host_pass: - args.append("--password") - args.append(options.host_pass) - pid = Popen(args).pid - """ - widgets.get_object("main_window").hide() - - # os.system() is a blocker, so we must force - # gtk to process our events. - while gtk.events_pending(): - gtk.main_iteration_do() - - os.system(command) - widgets.get_object("main_window").show() - - # another part of netplay code - """ - if options.host_radio: - os.kill(pid, 9) - """ def find_binary(file): @@ -358,14 +206,86 @@ def find_binary(file): options = None appconfigdir = os.getenv('HOME') + '/.'+ title optionsfile = appconfigdir + 'gfceu_options.dat' -fceux_binary = None -fceu_server_binary = None +widgets = None -class WidgetsWrapper: +class GfceuApp: def __init__(self): - # Search for the glade file - # Check first in the directory of this script. + self.fceux_binary = self.find_fceu() + self.load_ui() + self.setup_environment() + + options = game_options() + load_options() + give_widgets() + try: + gtk.main() + except KeyboardInterrupt: + sys.exit(0) + + def msg(self, text, use_gtk=False): + """ + GfceuApp.msg() + + This function prints messages to the user. This is generally used for status + messages. If a GTK message_box is requried, the use_gtk flag can be enabled. + """ + print text + if use_gtk: + msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, + buttons=gtk.BUTTONS_CLOSE) + msgbox.set_markup(text) + msgbox.run() + msgbox.destroy() + + def print_error(self, message, code, use_gtk=True, fatal=True): + """ + GfceuApp.error() + + Presents the user with an error message and optionally quits the program. + """ + print title + ' error code '+str(code)+': ' + message + if use_gtk: + msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, + buttons=gtk.BUTTONS_CLOSE) + msgbox.set_markup(title + ' ERROR Code '+str(code)+':\n'+message) + msgbox.run() + msgbox.destroy() + if fatal: + sys.exit(code) + + def setup_environment (self): + """ + Configures the environment if this is the first time the application + has been run. For instance, it checks for the options file and creates + it if it doesn't exist. It also converts between the old version and + the new version of this application, which stores the options file in + a separate directory. + """ + + global appconfigdir, optionsfile + + if not os.path.exists(appconfigdir): + # this is the first time the application is run. + # create the directory + self.msg("Creating application settings directory") + os.mkdir(appconfigdir) + + def find_fceu(self): + bin = find_binary('fceux') + if bin == None: + gfceu_error('Could not find the fceu binary.\n\ + Ensure that FCE Ultra is installed and in the $PATH.\n\ + On Debian based systems (like Ubuntu), try the following command:\n\ + sudo apt-get install fceu', 4, True) + else: + self.msg('Using: ' + bin) + + return bin + + def load_ui(self): global widgets + """ Search for the glade XML file and load it """ + # Check first in the directory of this script. if os.path.isfile('gfceu.xml'): glade_file = 'gfceu.xml' # Then check to see if its installed on a *nix system @@ -383,13 +303,117 @@ class WidgetsWrapper: widgets.add_from_file(glade_file) widgets.connect_signals(self) except: - gfceu_error("Couldn't load the glade UI file", 24) + self.print_error("Couldn't load the glade UI file", 24) + + widgets.get_object("main_window").show_all() + + def launch(self, rom_name, local=False): + global options + set_options() + + sound_options = '' + + if options.sound_check: + sound_options += '--sound 1 ' + else: + sound_options += '--sound 0 ' + + if options.soundq_check: + sound_options += '--soundq 1 ' + else: + sound_options += '--soundq 0 ' + + if options.soundrate_entry: + sound_options += '--soundrate ' + options.soundrate_entry + ' ' + else: + soundrate = ' ' + + # video + video_options = '' + if options.fullscreen_check: + video_options += '--fullscreen 1 ' + else: + video_options += '--fullscreen 0 ' + + if options.opengl_check: + video_options += '--opengl 1 ' + else: + video_options += '--opengl 0 ' + + video_options += ' --xscale ' + str(options.xscale_spin) + video_options += ' --yscale ' + str(options.yscale_spin) + video_options += ' ' + + + # Netplay is fucked right now + """ + if options.join_radio: + if options.join_pass == '': + netpass = '' + else: + netpass = '--pass ' + '"' + options.join_pass + '" ' + network = '-net "' + options.join_add + '"'\ + ' --port '+ str(options.join_port) + ' ' + netpass + else: + network = '' + + if options.host_radio: + if options.host_pass == '': + netpass = ' ' + else: + netpass = ' --pass ' + '"' + options.host_pass + '" ' + network = '--net localhost --port '+\ + str(options.host_port) + netpass + ' ' + + if local: + network = '' + """ + network = '' + + command = self.fceux_binary + ' ' + sound_options + video_options +\ + network + options.extra_entry + ' '+ rom_name + self.msg('Command: ' + command) + + # more code to disable because netplay is fucked + """ + if options.host_radio: + xterm_binary = find_binary("xterm") + if xterm_binary == None: + gfceu_error("Cannot find xterm on this system. You will not \n\ + be informed of server output.", 102, True, False) + args = [self.server_binary] + else: + args = [xterm_binary, "-e", self.server_binary] + args.append('--port') + args.append(str(options.host_port)) + if options.host_pass: + args.append("--password") + args.append(options.host_pass) + pid = Popen(args).pid + """ + widgets.get_object("main_window").hide() + + # os.system() is a blocker, so we must force + # gtk to process our events. + while gtk.events_pending(): + gtk.main_iteration_do() + + os.system(command) + widgets.get_object("main_window").show() + + # another part of netplay code + """ + if options.host_radio: + os.kill(pid, 9) + """ + + ### Callbacks def launch_button_clicked(self, arg1): - global xml + global options options.romfile = widgets.get_object("rom_entry").get_text() if widgets.get_object("rom_entry").get_text() == '': - gfceu_print('Please specify a ROM to open in the main tab.', True) + self.msg('Please specify a ROM to open in the main tab.', True) return if options.network_rom: try: @@ -418,16 +442,15 @@ class WidgetsWrapper: else: romfile = options.romfile - launch('"'+romfile+'"') + self.launch('"'+romfile+'"') def about_button_clicked(self, menuitem, data=None): - global xml widgets.get_object("about_dialog").set_name('GNOME FCE Ultra '+version) widgets.get_object("about_dialog").run() widgets.get_object("about_dialog").hide() def browse_button_clicked(self, menuitem, data=None): - global xml,options + global options set_options() chooser = gtk.FileChooserDialog("Open...", None, gtk.FILE_CHOOSER_ACTION_OPEN, @@ -506,10 +529,10 @@ class WidgetsWrapper: options.no_network_radio = False def host_radio_clicked(self, menuitem, data=None): - global fceu_server_binary if widgets.get_object("host_radio").get_active(): - fceu_server_binary = find_binary('fceu-server') - if fceu_server_binary == None: + self.server_binary = find_binary('fceu-server') + + if self.server_binary == None: if os.name == 'nt': gfceu_error("The fceu server software cannot be found. \n\ Ensure that it is installed in the same directory as \n\ @@ -522,7 +545,6 @@ class WidgetsWrapper: options.no_network_radio = True return False - gfceu_print("Using: "+fceu_server_binary) widgets.get_object("join_frame").set_sensitive(False) widgets.get_object("host_frame").set_sensitive(True) options.join_radio = False @@ -537,38 +559,21 @@ class WidgetsWrapper: options.no_network_radio = True def end(self, menuitem, data=None): - global xml, options, optionsfile + global options, optionsfile set_options() save_options() gtk.main_quit() -widgets = None - # # # # # # # # -# main + + if __name__ == '__main__': - # Parse options - fceux_binary = find_binary('fceux') + + parser = OptionParser(version='%prog '+ version) - parser.add_option('-b', '--binary', action="store", type="string", dest="fceux_binary") parser.parse_args() - if fceux_binary == None: - gfceu_error('Could not find the fceu binary.\n\ - Ensure that FCE Ultra is installed and in the $PATH.\n\ - On Debian based systems (like Ubuntu), try the following command:\n\ - sudo apt-get install fceu', 4, True) - else: - gfceu_print('Using: '+fceux_binary) - - wrap = WidgetsWrapper() - widgets.get_object("main_window").show_all() - setup_environment() - options = game_options() - load_options() - give_widgets() - try: - gtk.main() - except KeyboardInterrupt: - sys.exit(0) + + app = GfceuApp() + From 12e4300a35ce13d3738e109e9fe11034d2bd6f58 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Jun 2008 15:53:40 +0000 Subject: [PATCH 16/94] bumped version number to .7 gfceu works with stable fceu gfceu .7 works with fceux --- BUG | 1 - INSTALL | 12 +++++++----- gfceu | 2 +- setup.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/BUG b/BUG index ac514cf1..e69de29b 100644 --- a/BUG +++ b/BUG @@ -1 +0,0 @@ -* Too much shit when trying to run with no display diff --git a/INSTALL b/INSTALL index 8446979a..eb210c0a 100644 --- a/INSTALL +++ b/INSTALL @@ -1,11 +1,13 @@ You can install gfceu with setup.py: -$ sudo ./setup.py install +$ sudo ./setup.py install --prefix=/usr/local + +You can change the prefix to whatever you like. Requirements: -Python (tested with 2.4) (Ubuntu package name: python) -PyGTK, GTK, and PyGlade (tested with 2.8) (Ubuntu package name: (python-gtk2 libgtk2.0-0 python-glade) -FCE Ultra (Ubuntu package name: fceu) +Python (tested with 2.5); (Ubuntu package name: python) +PyGTK, and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) +FCE UltraX - You're going to need the latest fceux for gfceu .7 to work Optional: -GnomeVFS 2 (tested with 2.14.1) (Ubuntu package name libgnomevfs2-0 python-gtk2)alsa-oss (tested with 1.0.11 +GnomeVFS 2 (tested with 2.14.1) (Ubuntu package name libgnomevfs2-0 ) diff --git a/gfceu b/gfceu index a5b9b0c8..bd492a6a 100644 --- a/gfceu +++ b/gfceu @@ -1,7 +1,7 @@ #!/usr/bin/python # gfceu - Graphical launcher for FCE Ultra. # Designed on Ubuntu, with platfrom independence in mind. -version = "0.6.1svn" +version = "0.7svn" title = "gfceux" # Copyright (C) 2006 Lukas Sabota ## diff --git a/setup.py b/setup.py index 9dbf60e1..24b04f49 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python from distutils.core import setup setup(name="gfceu", - version="0.6.0", + version="0.7svn", scripts = ['gfceu'], data_files=[('share/gfceu/',['gfceu.glade', 'gfceu_big.png', 'gfceu.png']), ('share/pixmaps/', ['gfceu.png']), From a9dc04c394a3ecc14a6c3e2704cd2cebd318ce19 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Jun 2008 16:02:45 +0000 Subject: [PATCH 17/94] [[Split portion of a mixed commit.]] --- BUG | 1 - ChangeLog | 3 + INSTALL | 12 +- gfceu | 596 ++++++++++++++------------- gfceu.glade | 234 +++++------ gfceu.xml | 1117 +++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 2 +- 7 files changed, 1538 insertions(+), 427 deletions(-) create mode 100644 gfceu.xml diff --git a/BUG b/BUG index ac514cf1..e69de29b 100644 --- a/BUG +++ b/BUG @@ -1 +0,0 @@ -* Too much shit when trying to run with no display diff --git a/ChangeLog b/ChangeLog index ccb3902c..e2dac599 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +* Major code cleanup +* Now requires pygtk >= 2.12 +* Transitioned from gtk.glade to gtk.Builder. * Changed some strings to reflect new email and website * Fixed and cleaned some stuff with the glade loading ========================== version 0.6.0 ======================== diff --git a/INSTALL b/INSTALL index 8446979a..eb210c0a 100644 --- a/INSTALL +++ b/INSTALL @@ -1,11 +1,13 @@ You can install gfceu with setup.py: -$ sudo ./setup.py install +$ sudo ./setup.py install --prefix=/usr/local + +You can change the prefix to whatever you like. Requirements: -Python (tested with 2.4) (Ubuntu package name: python) -PyGTK, GTK, and PyGlade (tested with 2.8) (Ubuntu package name: (python-gtk2 libgtk2.0-0 python-glade) -FCE Ultra (Ubuntu package name: fceu) +Python (tested with 2.5); (Ubuntu package name: python) +PyGTK, and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) +FCE UltraX - You're going to need the latest fceux for gfceu .7 to work Optional: -GnomeVFS 2 (tested with 2.14.1) (Ubuntu package name libgnomevfs2-0 python-gtk2)alsa-oss (tested with 1.0.11 +GnomeVFS 2 (tested with 2.14.1) (Ubuntu package name libgnomevfs2-0 ) diff --git a/gfceu b/gfceu index ba3ef5e0..bd492a6a 100644 --- a/gfceu +++ b/gfceu @@ -1,7 +1,7 @@ #!/usr/bin/python # gfceu - Graphical launcher for FCE Ultra. # Designed on Ubuntu, with platfrom independence in mind. -version = "0.6.1svn" +version = "0.7svn" title = "gfceux" # Copyright (C) 2006 Lukas Sabota ## @@ -31,78 +31,28 @@ import shutil from optparse import OptionParser from subprocess import Popen - # # # # # # # # -# Messaging Functions -def gfceu_message(message, use_gtk=False): - """ - gqfceu_message() - - This function prints messages to the user. This is generally used for status - messages. However, it can be used for important messages as well. If a - GTK message_box is requried, the use_gtk flag can be enabled - """ - print title + ' message: '+message - if use_gtk: - msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, - buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(message) - msgbox.run() - msgbox.destroy() - -def gfceu_error(message, code, use_gtk=True, fatal=True): - """ - gfceu_error() - - TODO: This can be reworked to use the raise/except methods already defined - in the standard python language. One of these days... - """ - print '# # # #' - print title + ' ERROR code '+str(code)+':' - print message - print '# # # #' - if use_gtk: - msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, - buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(title + ' ERROR Code '+str(code)+':\n'+message) - msgbox.run() - msgbox.destroy() - if fatal: - sys.exit(code) - - - # # # # # # # # -# Import libraries -try: - import pytgtk - pygtk.require("2.6") -except: - pass try: + import pygtk + pygtk.require("2.0") import gtk except ImportError: - gfceu_error('The PyGTK libraries cannot be found.\n\ - Ensure that PyGTK (>=2.0) is installed on this system.\n\ + print "The PyGTK libraries cannot be found.\n\ + Ensure that PyGTK (>=2.12) is installed on this system.\n\ On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install python-gtk2 libgtk2.0-0', 1, False) - -try: - import gtk.glade -except ImportError: - gfceu_error('The glade libraries cannot be found.\n\ - Ensure that libglade is installed on this system.\n\ - On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install libglade2-0 python-gtk2', 2, False) + sudo apt-get install python-gtk2 libgtk2.0-0" try: import gnomevfs have_gnomevfs = True except ImportError: - gfceu_error('The gnomevfs libraries cannot be found.\n\ + print "The gnomevfs libraries cannot be found.\n\ To enable ROM loading over the network, ensure that gnomevfs is installed on\ this system.\n\ On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install python-gtk2 libgnomevfs2-0', 5, False, False) + sudo apt-get install python-gtk2 libgnomevfs2-0" have_gnomevfs = False + + # # # # # # # # @@ -122,6 +72,8 @@ class game_options: extra_entry = '' romfile = '' opengl_check = False + + # network join_radio = False join_add = '' join_port = 4046 @@ -156,62 +108,39 @@ def give_widgets(): This function takes data from the options struct and relays it to the GTK window """ - global xml, options + global options, widgets try: - widgets['rom_entry'].set_text(options.romfile) + widgets.get_object("rom_entry").set_text(options.romfile) # sound - widgets['sound_check'].set_active(options.sound_check) - widgets['soundq_check'].set_active(options.soundq_check) - widgets['soundrate_entry'].set_text(options.soundrate_entry) + widgets.get_object("sound_check").set_active(options.sound_check) + widgets.get_object("soundq_check").set_active(options.soundq_check) + widgets.get_object("soundrate_entry").set_text(options.soundrate_entry) - widgets['fullscreen_check'].set_active(options.fullscreen_check) - widgets['opengl_check'].set_active(options.opengl_check) - widgets['xscale_spin'].set_value(options.xscale_spin) - widgets['yscale_spin'].set_value(options.yscale_spin) + widgets.get_object("fullscreen_check").set_active(options.fullscreen_check) + widgets.get_object("opengl_check").set_active(options.opengl_check) + widgets.get_object("xscale_spin").set_value(options.xscale_spin) + widgets.get_object("yscale_spin").set_value(options.yscale_spin) - widgets['extra_entry'].set_text(options.extra_entry) + widgets.get_object("extra_entry").set_text(options.extra_entry) # Usability point: # Users will probably not want to remember their previous network setting. # Users may accidently be connecting to a remote server/hosting a game when # they were unaware. # No network is being set by default - widgets['no_network_radio'].set_active(True) - widgets['join_add'].set_text(options.join_add) - widgets['join_port'].set_value(float(options.join_port)) - widgets['join_pass'].set_text(options.join_pass) - widgets['host_port'].set_value(float(options.host_port)) - widgets['host_pass'].set_text(options.host_pass) + widgets.get_object("no_network_radio").set_active(True) + widgets.get_object("join_add").set_text(options.join_add) + widgets.get_object("join_port").set_value(float(options.join_port)) + widgets.get_object("join_pass").set_text(options.join_pass) + widgets.get_object("host_port").set_value(float(options.host_port)) + widgets.get_object("host_pass").set_text(options.host_pass) except AttributeError: # When new widgets are added, old pickle files might break. options = game_options() give_widgets() -def setup_environment (): - """ - Configures the environment if this is the first time the application - has been run. For instance, it checks for the options file and creates - it if it doesn't exist. It also converts between the old version and - the new version of this application, which stores the options file in - a separate directory. - """ - - global appconfigdir, old_optionsfile, optionsfile - - - if not os.path.exists(appconfigdir): - # this is the first time the application is run. - # create the directory - gfceu_message("Creating application settings directory") - os.mkdir(appconfigdir) - - if os.path.exists(old_optionsfile): - # for full backwards compatibility, this file is processed, but moved - # to the new directory and filename for future compatibility - gfceu_message("Old version of options file found, converting to new version") - shutil.move(old_optionsfile,optionsfile) def set_options(): """ @@ -220,126 +149,34 @@ def set_options(): This function grabs all of the data from the GTK widgets and stores it in the options object. """ - global xml - options.romfile = widgets['rom_entry'].get_text() + options.romfile = widgets.get_object("rom_entry").get_text() # sound - options.sound_check = widgets['sound_check'].get_active() - options.soundq_check = widgets['soundq_check'].get_active() - options.soundrate_entry = widgets['soundrate_entry'].get_text() + options.sound_check = widgets.get_object("sound_check").get_active() + options.soundq_check = widgets.get_object("soundq_check").get_active() + options.soundrate_entry = widgets.get_object("soundrate_entry").get_text() # video - options.fullscreen_check = widgets['fullscreen_check'].get_active() - options.opengl_check = widgets['opengl_check'].get_active() - options.xscale_spin = widgets['xscale_spin'].get_value() - options.yscale_spin = widgets['yscale_spin'].get_value() + options.fullscreen_check = widgets.get_object("fullscreen_check").get_active() + options.opengl_check = widgets.get_object("opengl_check").get_active() + options.xscale_spin = widgets.get_object("xscale_spin").get_value() + options.yscale_spin = widgets.get_object("yscale_spin").get_value() - options.extra_entry = widgets['extra_entry'].get_text() + options.extra_entry = widgets.get_object("extra_entry").get_text() - options.join_radio = widgets['join_radio'].get_active() - options.host_radio = widgets['host_radio'].get_active() - options.no_network_radio = widgets['no_network_radio'].get_active() - options.join_add = widgets['join_add'].get_text() - options.join_port = widgets['join_port'].get_value() - options.join_pass = widgets['join_pass'].get_text() - options.host_port = widgets['host_port'].get_value() - options.host_pass = widgets['host_pass'].get_text() + options.join_radio = widgets.get_object("join_radio").get_active() + options.host_radio = widgets.get_object("host_radio").get_active() + options.no_network_radio = widgets.get_object("no_network_radio").get_active() + options.join_add = widgets.get_object("join_add").get_text() + options.join_port = widgets.get_object("join_port").get_value() + options.join_pass = widgets.get_object("join_pass").get_text() + options.host_port = widgets.get_object("host_port").get_value() + options.host_pass = widgets.get_object("host_pass").get_text() -def launch(rom_name, local=False): - global xml, options, fceu_server_binary, fceux_binary - set_options() - - sound_options = '' - - if options.sound_check: - sound_options += '--sound 1 ' - else: - sound_options += '--sound 0 ' - - if options.soundq_check: - sound_options += '--soundq 1 ' - else: - sound_options += '--soundq 0 ' - - if options.soundrate_entry: - sound_options += '--soundrate ' + options.soundrate_entry + ' ' - else: - soundrate = ' ' - - # video - video_options = '' - if options.fullscreen_check: - video_options += '--fullscreen 1 ' - else: - video_options += '--fullscreen 0 ' - - if options.opengl_check: - video_options += '--opengl 1 ' - else: - video_options += '--opengl 0 ' - - video_options += ' --xscale ' + str(options.xscale_spin) - video_options += ' --yscale ' + str(options.yscale_spin) - video_options += ' ' - - - if options.join_radio: - if options.join_pass == '': - netpass = '' - else: - netpass = '--pass ' + '"' + options.join_pass + '" ' - network = '-net "' + options.join_add + '"'\ - ' --port '+ str(options.join_port) + ' ' + netpass - else: - network = '' - - if options.host_radio: - if options.host_pass == '': - netpass = ' ' - else: - netpass = ' --pass ' + '"' + options.host_pass + '" ' - network = '--net localhost --port '+\ - str(options.host_port) + netpass + ' ' - - - if local: - network = '' - - - - command = fceux_binary + ' ' + sound_options + video_options +\ - network + options.extra_entry + ' '+ rom_name - gfceu_message('Command: ' + command) - if options.host_radio: - xterm_binary = find_binary("xterm") - if xterm_binary == None: - gfceu_error("Cannot find xterm on this system. You will not \n\ - be informed of server output.", 102, True, False) - args = [fceu_server_binary] - else: - args = [xterm_binary, "-e", fceu_server_binary] - args.append('--port') - args.append(str(options.host_port)) - if options.host_pass: - args.append("--password") - args.append(options.host_pass) - pid = Popen(args).pid - - widgets['main_window'].hide() - - # os.system() is a blocker, so we must force - # gtk to process our events. - while gtk.events_pending(): - gtk.main_iteration_do() - - os.system(command) - if options.host_radio: - os.kill(pid, 9) - widgets['main_window'].show() def find_binary(file): @@ -363,15 +200,220 @@ def find_binary(file): return None - # # # # # # # # -# GTK Signal Handlers -class GladeHandlers: - def launch_button_clicked(arg1): - global xml + +############################################################################## +# Globals +options = None +appconfigdir = os.getenv('HOME') + '/.'+ title +optionsfile = appconfigdir + 'gfceu_options.dat' +widgets = None + +class GfceuApp: + def __init__(self): + self.fceux_binary = self.find_fceu() + self.load_ui() + self.setup_environment() + + options = game_options() + load_options() + give_widgets() + try: + gtk.main() + except KeyboardInterrupt: + sys.exit(0) + + def msg(self, text, use_gtk=False): + """ + GfceuApp.msg() + + This function prints messages to the user. This is generally used for status + messages. If a GTK message_box is requried, the use_gtk flag can be enabled. + """ + print text + if use_gtk: + msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, + buttons=gtk.BUTTONS_CLOSE) + msgbox.set_markup(text) + msgbox.run() + msgbox.destroy() + + def print_error(self, message, code, use_gtk=True, fatal=True): + """ + GfceuApp.error() + + Presents the user with an error message and optionally quits the program. + """ + print title + ' error code '+str(code)+': ' + message + if use_gtk: + msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, + buttons=gtk.BUTTONS_CLOSE) + msgbox.set_markup(title + ' ERROR Code '+str(code)+':\n'+message) + msgbox.run() + msgbox.destroy() + if fatal: + sys.exit(code) + + def setup_environment (self): + """ + Configures the environment if this is the first time the application + has been run. For instance, it checks for the options file and creates + it if it doesn't exist. It also converts between the old version and + the new version of this application, which stores the options file in + a separate directory. + """ + + global appconfigdir, optionsfile + + if not os.path.exists(appconfigdir): + # this is the first time the application is run. + # create the directory + self.msg("Creating application settings directory") + os.mkdir(appconfigdir) + + def find_fceu(self): + bin = find_binary('fceux') + if bin == None: + gfceu_error('Could not find the fceu binary.\n\ + Ensure that FCE Ultra is installed and in the $PATH.\n\ + On Debian based systems (like Ubuntu), try the following command:\n\ + sudo apt-get install fceu', 4, True) + else: + self.msg('Using: ' + bin) + + return bin + + def load_ui(self): + global widgets + """ Search for the glade XML file and load it """ + # Check first in the directory of this script. + if os.path.isfile('gfceu.xml'): + glade_file = 'gfceu.xml' + # Then check to see if its installed on a *nix system + elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.xml')): + glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.xml') + else: + print 'ERROR.' + print 'Could not find the glade interface file.' + print 'Try reinstalling the application.' + sys.exit(1) + + try: + print "Using: " + glade_file + widgets = gtk.Builder() + widgets.add_from_file(glade_file) + widgets.connect_signals(self) + except: + self.print_error("Couldn't load the glade UI file", 24) + + widgets.get_object("main_window").show_all() + + def launch(self, rom_name, local=False): global options - options.romfile = widgets['rom_entry'].get_text() - if widgets['rom_entry'].get_text() == '': - gfceu_message('Please specify a ROM to open in the main tab.', True) + set_options() + + sound_options = '' + + if options.sound_check: + sound_options += '--sound 1 ' + else: + sound_options += '--sound 0 ' + + if options.soundq_check: + sound_options += '--soundq 1 ' + else: + sound_options += '--soundq 0 ' + + if options.soundrate_entry: + sound_options += '--soundrate ' + options.soundrate_entry + ' ' + else: + soundrate = ' ' + + # video + video_options = '' + if options.fullscreen_check: + video_options += '--fullscreen 1 ' + else: + video_options += '--fullscreen 0 ' + + if options.opengl_check: + video_options += '--opengl 1 ' + else: + video_options += '--opengl 0 ' + + video_options += ' --xscale ' + str(options.xscale_spin) + video_options += ' --yscale ' + str(options.yscale_spin) + video_options += ' ' + + + # Netplay is fucked right now + """ + if options.join_radio: + if options.join_pass == '': + netpass = '' + else: + netpass = '--pass ' + '"' + options.join_pass + '" ' + network = '-net "' + options.join_add + '"'\ + ' --port '+ str(options.join_port) + ' ' + netpass + else: + network = '' + + if options.host_radio: + if options.host_pass == '': + netpass = ' ' + else: + netpass = ' --pass ' + '"' + options.host_pass + '" ' + network = '--net localhost --port '+\ + str(options.host_port) + netpass + ' ' + + if local: + network = '' + """ + network = '' + + command = self.fceux_binary + ' ' + sound_options + video_options +\ + network + options.extra_entry + ' '+ rom_name + self.msg('Command: ' + command) + + # more code to disable because netplay is fucked + """ + if options.host_radio: + xterm_binary = find_binary("xterm") + if xterm_binary == None: + gfceu_error("Cannot find xterm on this system. You will not \n\ + be informed of server output.", 102, True, False) + args = [self.server_binary] + else: + args = [xterm_binary, "-e", self.server_binary] + args.append('--port') + args.append(str(options.host_port)) + if options.host_pass: + args.append("--password") + args.append(options.host_pass) + pid = Popen(args).pid + """ + widgets.get_object("main_window").hide() + + # os.system() is a blocker, so we must force + # gtk to process our events. + while gtk.events_pending(): + gtk.main_iteration_do() + + os.system(command) + widgets.get_object("main_window").show() + + # another part of netplay code + """ + if options.host_radio: + os.kill(pid, 9) + """ + + ### Callbacks + def launch_button_clicked(self, arg1): + + global options + options.romfile = widgets.get_object("rom_entry").get_text() + if widgets.get_object("rom_entry").get_text() == '': + self.msg('Please specify a ROM to open in the main tab.', True) return if options.network_rom: try: @@ -400,17 +442,15 @@ class GladeHandlers: else: romfile = options.romfile - launch('"'+romfile+'"') + self.launch('"'+romfile+'"') + + def about_button_clicked(self, menuitem, data=None): + widgets.get_object("about_dialog").set_name('GNOME FCE Ultra '+version) + widgets.get_object("about_dialog").run() + widgets.get_object("about_dialog").hide() - - def about_button_clicked(arg1): - global xml - widgets['about_dialog'].set_name('GNOME FCE Ultra '+version) - widgets['about_dialog'].run() - widgets['about_dialog'].hide() - - def browse_button_clicked(widget): - global xml,options + def browse_button_clicked(self, menuitem, data=None): + global options set_options() chooser = gtk.FileChooserDialog("Open...", None, gtk.FILE_CHOOSER_ACTION_OPEN, @@ -451,17 +491,17 @@ class GladeHandlers: if response == gtk.RESPONSE_OK: if chooser.get_filename(): x = chooser.get_filename() - widgets['rom_entry'].set_text(x) + widgets.get_object("rom_entry").set_text(x) options.romfile = x options.network_rom = False elif chooser.get_uri(): x = chooser.get_uri() - widgets['rom_entry'].set_text(x) + widgets.get_object("rom_entry").set_text(x) options.romfile = x options.network_rom = True - def gamepad_clicked(widget): - print widget.name + def gamepad_clicked(self, widget, data=None): + d = {'gp1_button' : '1', 'gp2_button' : '2', 'gp3_button' : '3', @@ -469,7 +509,7 @@ class GladeHandlers: command = '-inputcfg gamepad' + d[widget.name] + ' /dev/null' launch(command, True) - def config_help_button_clicked(arg1): + def config_help_button_clicked(self, menuitem, data=None): msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE) msgbox.set_markup("Once a gamepad is seleceted, a titlebar will be displayed\ @@ -480,19 +520,19 @@ class GladeHandlers: msgbox.hide() - def join_radio_clicked(arg1): + def join_radio_clicked(self, menuitem, data=None): global options - widgets['join_frame'].set_sensitive(True) - widgets['host_frame'].set_sensitive(False) + widgets.get_object("join_frame").set_sensitive(True) + widgets.get_object("host_frame").set_sensitive(False) options.join_radio = True options.host_radio = False options.no_network_radio = False - def host_radio_clicked(arg1): - global fceu_server_binary - if widgets['host_radio'].get_active(): - fceu_server_binary = find_binary('fceu-server') - if fceu_server_binary == None: + def host_radio_clicked(self, menuitem, data=None): + if widgets.get_object("host_radio").get_active(): + self.server_binary = find_binary('fceu-server') + + if self.server_binary == None: if os.name == 'nt': gfceu_error("The fceu server software cannot be found. \n\ Ensure that it is installed in the same directory as \n\ @@ -501,89 +541,39 @@ class GladeHandlers: gfceu_error("The fceu server software cannot be found on \n\ this system. Ensure that it is installed and in your path.", 101, True, False) - widgets['no_network_radio'].set_active(True) + widgets.get_object("no_network_radio").set_active(True) options.no_network_radio = True return False - gfceu_message("Using: "+fceu_server_binary) - widgets['join_frame'].set_sensitive(False) - widgets['host_frame'].set_sensitive(True) + widgets.get_object("join_frame").set_sensitive(False) + widgets.get_object("host_frame").set_sensitive(True) options.join_radio = False options.host_radio = True options.no_network_radio = False - def no_network_radio_clicked(arg1): - widgets['join_frame'].set_sensitive(False) - widgets['host_frame'].set_sensitive(False) + def no_network_radio_clicked(self, menuitem, data=None): + widgets.get_object("join_frame").set_sensitive(False) + widgets.get_object("host_frame").set_sensitive(False) options.join_radio = False options.host_radio = False options.no_network_radio = True - def end(widget,arg=0): - global xml, options, optionsfile + def end(self, menuitem, data=None): + global options, optionsfile set_options() save_options() gtk.main_quit() - -############################################################################## -# Globals -options = None -appconfigdir = os.getenv('HOME') + '/.'+ title -old_optionsfile = os.getenv('HOME')+'/.' + title + '_options' -optionsfile = appconfigdir + 'gfceu_options.dat' -fceux_binary = None -fceu_server_binary = None -#version is defined earlier in the code -#have_vfs is defined earlier in the code - -class WidgetsWrapper: - def __init__(self): - # Search for the glade file - # Check first in the directory of this script. - if os.path.isfile('gfceu.glade'): - glade_file = 'gfceu.glade' - # Then check to see if its installed on a *nix system - elif os.path.isfile(os.path.join(os.path.dirname(sys.executable), '../share/gfceu/gfceu.glade')): - glade_file = os.path.join(os.path.dirname(sys.executable), '../share/gfceu/gfceu.glade') - else: - print 'ERROR.' - print 'Could not find the glade interface file.' - print 'Try reinstalling the application.' - sys.exit(1) - - self.widgets = gtk.glade.XML(glade_file) - self.widgets.signal_autoconnect(GladeHandlers.__dict__) - - def __getitem__(self, key): - return self.widgets.get_widget(key) - # # # # # # # # -# main + if __name__ == '__main__': - # Parse options - fceux_binary = find_binary('fceux') + + parser = OptionParser(version='%prog '+ version) - parser.add_option('-b', '--binary', action="store", type="string", dest="fceux_binary") parser.parse_args() - if fceux_binary == None: - gfceu_error('Could not find the fceu binary.\n\ - Ensure that FCE Ultra is installed and in the $PATH.\n\ - On Debian based systems (like Ubuntu), try the following command:\n\ - sudo apt-get install fceu', 4, True) - else: - gfceu_message('Using: '+fceux_binary) - - widgets = WidgetsWrapper() - widgets['main_window'].show_all() - setup_environment() - options = game_options() - load_options() - give_widgets() - try: - gtk.main() - except KeyboardInterrupt: - sys.exit(0) + + app = GfceuApp() + diff --git a/gfceu.glade b/gfceu.glade index 80cb8cf5..57d03c28 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -124,30 +124,17 @@ 5 5 - + True True - Gamepad _1 + Gamepad _3 True 0 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 + 1 + 2 @@ -169,17 +156,30 @@ - + True True - Gamepad _3 + Gamepad _2 + True + 0 + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True 0 - 1 - 2 @@ -582,26 +582,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -619,15 +608,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -678,13 +678,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -704,54 +745,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 @@ -941,16 +941,42 @@ Artwork for old versions (< 0.2.7): 3 3 - + + + + + + + + + + + + + + + + True True True - Right + Up + 0 + + + 1 + 2 + + + + + True + True + True + Left 0 - 2 - 3 1 2 @@ -971,46 +997,20 @@ Artwork for old versions (< 0.2.7): - + True True True - Left + Right 0 + 2 + 3 1 2 - - - True - True - True - Up - 0 - - - 1 - 2 - - - - - - - - - - - - - - - - - diff --git a/gfceu.xml b/gfceu.xml new file mode 100644 index 00000000..1a090d39 --- /dev/null +++ b/gfceu.xml @@ -0,0 +1,1117 @@ + + + + + 10 + 1 + 1 + 0.5 + 10 + 2 + + + 10 + 1 + 1 + 0.5 + 10 + 2 + + + 65536 + 1 + 10 + 1 + 10 + 4046 + + + 65536 + 1 + 10 + 1 + 10 + 4046 + + + True + GFCE Ultra + 442 + gfceu.png + + + + True + 1 + + + True + True + 3 + + + True + 5 + 5 + + + True + 5 + + + True + 5 + ROM Filename: + + + False + False + + + + + True + True + + + 1 + + + + + True + True + _Browse... + True + + + + False + False + 2 + + + + + False + False + + + + + + + True + Main + + + False + + + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + Select an NES gamepad to configure. + True + + + False + False + 7 + 1 + + + + + False + False + + + + + True + 2 + 2 + 5 + 5 + + + True + True + Gamepad _3 + True + + + + 1 + 2 + + + + + + True + True + Gamepad _4 + True + + + + 1 + 2 + 1 + 2 + + + + + + True + True + Gamepad _2 + True + + + + 1 + 2 + + + + + + True + True + Gamepad _1 + True + + + + + + + + + False + False + 1 + + + + + True + True + gtk-help + True + + + + False + False + 5 + GTK_PACK_END + 2 + + + + + + + True + Input + + + 1 + False + + + + + True + 5 + 5 + + + True + True + Enable _OpenGL Rendering + True + True + + + False + False + + + + + True + True + Enable _Full Screen + True + True + + + False + False + 1 + + + + + True + + + True + X scale: + + + False + 5 + + + + + True + True + adjustment1 + 1 + True + + + False + 1 + + + + + False + 2 + + + + + True + + + True + Y scale: + + + False + 5 + + + + + True + True + adjustment2 + 1 + True + GTK_UPDATE_IF_VALID + + + False + 1 + + + + + False + 3 + + + + + True + + + True + Bits per pixel: + + + False + 5 + + + + + + + + False + 4 + + + + + True + <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> + True + True + + + False + False + 5 + + + + + + + True + Video + + + 2 + False + + + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. + +Invalid options may cause GFCE Ultra to perform incorrectly. + + True + + + False + False + 1 + + + + + False + False + 5 + + + + + True + + + True + Extra Parameters: + + + False + False + 5 + + + + + True + True + + + 5 + 1 + + + + + False + 1 + + + + + + + True + Advanced + + + 3 + False + + + + + True + 5 + + + True + True + Enable _Sound + True + True + True + + + False + 5 + + + + + True + True + Extra _Quaility + True + True + True + + + False + 5 + 1 + + + + + True + + + True + Sample rate: + + + False + False + 5 + + + + + True + True + 11000 + + + False + False + 1 + + + + + False + 5 + 2 + + + + + 4 + False + + + + + True + Sound + + + 4 + False + + + + + True + False + 5 + 5 + + + True + True + _Host Game + True + True + + + + False + False + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 19 + + + True + 2 + 2 + 5 + 5 + + + True + True + + + 1 + 2 + 1 + 2 + + + + + + True + True + adjustment3 + 1 + + + 1 + 2 + + + + + + True + 0 + Password: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL + + + + + + + + + + False + False + 1 + + + + + True + True + _Join Game + True + True + host_radio + + + + False + False + 2 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 0 + 19 + + + True + 5 + 3 + 2 + 3 + 5 + + + True + True + adjustment4 + 1 + + + 1 + 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + True + False + * + + + 1 + 2 + 2 + 3 + + + + + + True + True + + + 1 + 2 + + + + + + + + + + False + False + 3 + + + + + True + True + _No Network + True + True + True + host_radio + + + + False + False + 4 + + + + + + + True + False + Network + + + 5 + False + + + + + 10 + + + + + True + True + + + True + 3 + + + True + True + True + True + True + gtk-execute + True + + + + False + + + + + True + True + gtk-about + True + + + + False + False + 1 + + + + + True + True + gtk-quit + True + + + + False + 2 + + + + + + + False + False + 1 + + + + + + + GDK_WINDOW_TYPE_HINT_NORMAL + (C) Copyright 2006 + A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator + http://dietschnitzel.com/gfceu/ + This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + Lukas Sabota +<ltsmooth42@gmail.comt> + +Patch writers: +Scott Brown + translator-credits + Sketching: + J. Sammer +Digital Manipulation: + C. Kontros + +Artwork for old versions (< 0.2.7): + Jimmy Angelakos + <vyruss000@gmail.com> + gfceu_big.png + + + True + + + + + + True + + + False + GTK_PACK_END + + + + + + + + + True + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + 3 + 3 + + + + + + + + + + + + + + + + + + True + True + True + Up + + + 1 + 2 + + + + + True + True + True + Left + + + 1 + 2 + + + + + True + True + True + Down + + + 1 + 2 + 2 + 3 + + + + + True + True + True + Right + + + 2 + 3 + 1 + 2 + + + + + + + + + True + <b>D-Pad</b> + True + + + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + True + Select + + + + + True + True + True + Start + + + 1 + + + + + + + + + True + <b>Essentials</b> + True + + + + + 1 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + True + B + + + + + True + True + True + A + + + 1 + + + + + + + + + True + <b>Alpha and Beta</b> + True + + + + + 2 + + + + + + diff --git a/setup.py b/setup.py index 9dbf60e1..24b04f49 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python from distutils.core import setup setup(name="gfceu", - version="0.6.0", + version="0.7svn", scripts = ['gfceu'], data_files=[('share/gfceu/',['gfceu.glade', 'gfceu_big.png', 'gfceu.png']), ('share/pixmaps/', ['gfceu.png']), From 76ba622dcca2d0ac325cd1c54cadbfbfa78f44df Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Jun 2008 16:02:45 +0000 Subject: [PATCH 18/94] [[Split portion of a mixed commit.]] --- .gitignore | 17 - BUG | 0 COPYING | 340 -------------- ChangeLog | 113 ----- INSTALL | 13 - MANIFEST | 11 - TODO | 8 - gfceu | 579 ----------------------- gfceu.1 | 19 - gfceu.desktop | 10 - gfceu.glade | 1137 --------------------------------------------- gfceu.png | Bin 3776 -> 0 bytes gfceu.xml | 1117 -------------------------------------------- gfceu_big.png | Bin 14007 -> 0 bytes gfceu_big_old.png | Bin 9492 -> 0 bytes gfceu_old.png | Bin 1697 -> 0 bytes mockup_test.py | 17 - setup.py | 15 - status_window.py | 40 -- 19 files changed, 3436 deletions(-) delete mode 100644 .gitignore delete mode 100644 BUG delete mode 100644 COPYING delete mode 100644 ChangeLog delete mode 100644 INSTALL delete mode 100644 MANIFEST delete mode 100644 TODO delete mode 100644 gfceu delete mode 100644 gfceu.1 delete mode 100644 gfceu.desktop delete mode 100644 gfceu.glade delete mode 100644 gfceu.png delete mode 100644 gfceu.xml delete mode 100644 gfceu_big.png delete mode 100644 gfceu_big_old.png delete mode 100644 gfceu_old.png delete mode 100644 mockup_test.py delete mode 100644 setup.py delete mode 100644 status_window.py diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 674deb69..00000000 --- a/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# A simulation of Subversion default ignores, generated by reposurgeon. -*.o -*.lo -*.la -*.al -*.libs -*.so -*.so.[0-9]* -*.a -*.pyc -*.pyo -*.rej -*~ -*.#* -.*.swp -.DS_store -# Simulated Subversion default ignores end here diff --git a/BUG b/BUG deleted file mode 100644 index e69de29b..00000000 diff --git a/COPYING b/COPYING deleted file mode 100644 index b7b5f53d..00000000 --- a/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index e2dac599..00000000 --- a/ChangeLog +++ /dev/null @@ -1,113 +0,0 @@ -* Major code cleanup -* Now requires pygtk >= 2.12 -* Transitioned from gtk.glade to gtk.Builder. -* Changed some strings to reflect new email and website -* Fixed and cleaned some stuff with the glade loading -========================== version 0.6.0 ======================== -* Fixed evil no ROM problem. -* Added ALSA support (sort of) -* Fixed join/host problem. -========================== version 0.5.2 ======================== -Cleanup: -* Fixed silly hack when forcing GTK event processing. -* Accepted patch from Scott Brown on improved options file system -* Completely reworked glade handling -========================== version 0.5.1 ======================== -Bug Fixes: -* Updated chooser filters -* Allow support for loading zipped ROMs -* Network ROM loading works -* Code cleanup -* Strides towards platform independence -* Fixed man page error -========================== version 0.5.0 ======================== -Other: -* Added man page -* Shortened menu labels -* General code cleanup -* Advanced tab added -========================== version 0.4.0 ======================== -Bug Fixes: -* Correction: Changed "Alt-Tab for fullscreen" to "Alt-Enter" -Interface: -* Accelerators added to many buttons -* Video tab added -* OpenGL option added in video tab -* Fullscreen option moved into Video tab -* Change "FCE Ultra" strings to "GFCE Ultra" -* Cleaned gamepad buttons -* Icon in window -Internal: -* Made glade interface cleaner -* More effecient use of options struct -* Minor code cleanup -========================== version 0.3.2 ======================== -Bug Fixes: -* Fixed bug with fresh configuration -========================== version 0.3.1 ======================= -Under the hood: -* Switched interpreter to /usr/bin/python -Bug Fixes: -* Fixed bug in when gfceu wouldn't close on delete -* Fixed bug in which icon couldn't be found when running from tarbell -========================== version 0.3 ======================= -* No more confusing error when quitting with interrupts -* Spin button now used for port options -* New interface for network -* Hosting added -* Cleaned code to look nicer in standard size terminal -* Cleaned up code in other minor aspects -* Added help button to unintuitive button configuration -* More code cleanup -* Network passwords with spaces now execute properly -* Initial extra parameter support -* Some new cool scripts that make my life easier -========================== version 0.2.6 ======================== -* Fixed error that wouldn't let "Please specify ROM to open" close -* Fixed fatal error that wouldn't allow ROMs to open? -========================== version 0.2.5 ========================= -* Network ROM loading properly implemented. -* Fatal option added to error system -========================== version 0.2.4 ========================= -* Fixed bug in which last entry in $PATH wasn't being processed -========================== version 0.2.3 ========================= -* Option parser added -* Erased stupid comment in desktop file -* --version option now accepted. -* Smarter error messages (using both GTK and command-line) -* Detects when fceu is not install and displays error -* Smarter and more descriptive when gtk or glade aren't available -* Smarter glade file loading -========================= version 0.2.2 ========================= -* Romentry now stretches! -* Using stock icons for execute -* Can now open ROM files via network -========================== version 0.2.1 ========================= -* Icon provided (Thanks Jimmy Angelakos!) -* Desktop file provided -* Logo provied in about menu -* Fixed chooser problem about remembering -========================== version 0.2 =========================== -* Changed ChangeLog format :) -* Fixed network bug when no password was provided. -* Overall code cleanup: removed object to reduce the self.* headache. -* Remembers settings on close. -* Fullscreen option now available. -* Fullscreen tip added. -* Verticle resize bug fixed. -* Filechooser checks in a smart folder -========================== version 0.1.1 ============================ -6/12/06 - Now handles specialcharacter filenames and spaces. -6/12/06 - ROM file no longer required for input configuration. - -=========================== 0.1 ==================================== -6/12/06 - Changed directories for installation and changed structure. Made my -life a lot easier -6/10/06 3 - Add network functionality. -6/10/06 2 - Cleaned up interface. Added error when no ROM is available. -Added chooser filter for NES ROMs. -6/10/06 - Redesigned entire UI to use GtkNotebook for tabs. Cleaned up code -a lot. Fixed it so the window is hidden when FCE Ultra starts. Fixed ugly -things. Now closes on 'X'. -6/8/06 - Added sound checkbox. Config game works. Run game works. Woot -6/7/06 - Started project. Doesn't work yet. diff --git a/INSTALL b/INSTALL deleted file mode 100644 index eb210c0a..00000000 --- a/INSTALL +++ /dev/null @@ -1,13 +0,0 @@ -You can install gfceu with setup.py: - -$ sudo ./setup.py install --prefix=/usr/local - -You can change the prefix to whatever you like. - -Requirements: -Python (tested with 2.5); (Ubuntu package name: python) -PyGTK, and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) -FCE UltraX - You're going to need the latest fceux for gfceu .7 to work - -Optional: -GnomeVFS 2 (tested with 2.14.1) (Ubuntu package name libgnomevfs2-0 ) diff --git a/MANIFEST b/MANIFEST deleted file mode 100644 index 493dbe58..00000000 --- a/MANIFEST +++ /dev/null @@ -1,11 +0,0 @@ -gfceu -setup.py -COPYING -ChangeLog -INSTALL -TODO -gfceu.glade -gfceu.desktop -gfceu.png -gfceu_big.png -gfceu.1 diff --git a/TODO b/TODO deleted file mode 100644 index af5ab2b7..00000000 --- a/TODO +++ /dev/null @@ -1,8 +0,0 @@ -TODO: -* improve button config now that config system is resolved -* resolution -* parse normal options (etc quiet) -* Browser - -Deferred: -* A lot of shit was going to be done with the client/server GUI, but netplay is fucked in svn as it is. diff --git a/gfceu b/gfceu deleted file mode 100644 index bd492a6a..00000000 --- a/gfceu +++ /dev/null @@ -1,579 +0,0 @@ -#!/usr/bin/python -# gfceu - Graphical launcher for FCE Ultra. -# Designed on Ubuntu, with platfrom independence in mind. -version = "0.7svn" -title = "gfceux" -# Copyright (C) 2006 Lukas Sabota -## -""" -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -""" - - # # # # # # # # -# Python imports - -import sys -import os -import pickle -import shutil -from optparse import OptionParser -from subprocess import Popen - -try: - import pygtk - pygtk.require("2.0") - import gtk -except ImportError: - print "The PyGTK libraries cannot be found.\n\ - Ensure that PyGTK (>=2.12) is installed on this system.\n\ - On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install python-gtk2 libgtk2.0-0" - -try: - import gnomevfs - have_gnomevfs = True -except ImportError: - print "The gnomevfs libraries cannot be found.\n\ - To enable ROM loading over the network, ensure that gnomevfs is installed on\ - this system.\n\ - On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install python-gtk2 libgnomevfs2-0" - have_gnomevfs = False - - - - - # # # # # # # # -# GFCEU Functions - -class game_options: - # sound - sound_check = True - soundq_check = True - soundrate_entry = "11000" - - # video - fullscreen_check = False - xscale_spin = 2 - yscale_spin = 2 - bpp_combo = 32 - extra_entry = '' - romfile = '' - opengl_check = False - - # network - join_radio = False - join_add = '' - join_port = 4046 - join_pass = '' - host_radio = False - host_port = 4046 - host_pass = '' - no_network_radio = True - network_rom = False - - -def load_options(): - global options, optionsfile - try: - ifile = file(optionsfile, 'r') - options = pickle.load(ifile) - pickle.load(ifile) - except: - return - ifile.close() - -def save_options(): - global options, optionsfile, appconfigdir - ofile = file(optionsfile, 'w') - pickle.dump(options, ofile) - ofile.close() - -def give_widgets(): - """ - give_widgets() - - This function takes data from the options struct and relays it to - the GTK window - """ - global options, widgets - try: - widgets.get_object("rom_entry").set_text(options.romfile) - - # sound - widgets.get_object("sound_check").set_active(options.sound_check) - widgets.get_object("soundq_check").set_active(options.soundq_check) - widgets.get_object("soundrate_entry").set_text(options.soundrate_entry) - - widgets.get_object("fullscreen_check").set_active(options.fullscreen_check) - widgets.get_object("opengl_check").set_active(options.opengl_check) - widgets.get_object("xscale_spin").set_value(options.xscale_spin) - widgets.get_object("yscale_spin").set_value(options.yscale_spin) - - widgets.get_object("extra_entry").set_text(options.extra_entry) - - # Usability point: - # Users will probably not want to remember their previous network setting. - # Users may accidently be connecting to a remote server/hosting a game when - # they were unaware. - # No network is being set by default - widgets.get_object("no_network_radio").set_active(True) - widgets.get_object("join_add").set_text(options.join_add) - widgets.get_object("join_port").set_value(float(options.join_port)) - widgets.get_object("join_pass").set_text(options.join_pass) - widgets.get_object("host_port").set_value(float(options.host_port)) - widgets.get_object("host_pass").set_text(options.host_pass) - - except AttributeError: - # When new widgets are added, old pickle files might break. - options = game_options() - give_widgets() - - -def set_options(): - """ - set_options() - - This function grabs all of the data from the GTK widgets - and stores it in the options object. - """ - options.romfile = widgets.get_object("rom_entry").get_text() - - # sound - options.sound_check = widgets.get_object("sound_check").get_active() - options.soundq_check = widgets.get_object("soundq_check").get_active() - options.soundrate_entry = widgets.get_object("soundrate_entry").get_text() - - # video - options.fullscreen_check = widgets.get_object("fullscreen_check").get_active() - options.opengl_check = widgets.get_object("opengl_check").get_active() - options.xscale_spin = widgets.get_object("xscale_spin").get_value() - options.yscale_spin = widgets.get_object("yscale_spin").get_value() - - options.extra_entry = widgets.get_object("extra_entry").get_text() - - options.join_radio = widgets.get_object("join_radio").get_active() - options.host_radio = widgets.get_object("host_radio").get_active() - options.no_network_radio = widgets.get_object("no_network_radio").get_active() - options.join_add = widgets.get_object("join_add").get_text() - options.join_port = widgets.get_object("join_port").get_value() - options.join_pass = widgets.get_object("join_pass").get_text() - options.host_port = widgets.get_object("host_port").get_value() - options.host_pass = widgets.get_object("host_pass").get_text() - - - - - - -def find_binary(file): - - path = os.getenv('PATH') - directories= [] - directory = '' - # check for '$' so last entry is processed - for x in path + '$': - if x != ':' and x != '$': - directory = directory + x - else: - directories.append(directory) - directory = '' - - for x in directories: - if os.path.isfile(os.path.join(x, file)): - return os.path.join(x,file) - - if os.path.isfile(os.path.join(os.curdir,file)): - return os.path.join(os.curdir, file) - - return None - - -############################################################################## -# Globals -options = None -appconfigdir = os.getenv('HOME') + '/.'+ title -optionsfile = appconfigdir + 'gfceu_options.dat' -widgets = None - -class GfceuApp: - def __init__(self): - self.fceux_binary = self.find_fceu() - self.load_ui() - self.setup_environment() - - options = game_options() - load_options() - give_widgets() - try: - gtk.main() - except KeyboardInterrupt: - sys.exit(0) - - def msg(self, text, use_gtk=False): - """ - GfceuApp.msg() - - This function prints messages to the user. This is generally used for status - messages. If a GTK message_box is requried, the use_gtk flag can be enabled. - """ - print text - if use_gtk: - msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, - buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(text) - msgbox.run() - msgbox.destroy() - - def print_error(self, message, code, use_gtk=True, fatal=True): - """ - GfceuApp.error() - - Presents the user with an error message and optionally quits the program. - """ - print title + ' error code '+str(code)+': ' + message - if use_gtk: - msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, - buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(title + ' ERROR Code '+str(code)+':\n'+message) - msgbox.run() - msgbox.destroy() - if fatal: - sys.exit(code) - - def setup_environment (self): - """ - Configures the environment if this is the first time the application - has been run. For instance, it checks for the options file and creates - it if it doesn't exist. It also converts between the old version and - the new version of this application, which stores the options file in - a separate directory. - """ - - global appconfigdir, optionsfile - - if not os.path.exists(appconfigdir): - # this is the first time the application is run. - # create the directory - self.msg("Creating application settings directory") - os.mkdir(appconfigdir) - - def find_fceu(self): - bin = find_binary('fceux') - if bin == None: - gfceu_error('Could not find the fceu binary.\n\ - Ensure that FCE Ultra is installed and in the $PATH.\n\ - On Debian based systems (like Ubuntu), try the following command:\n\ - sudo apt-get install fceu', 4, True) - else: - self.msg('Using: ' + bin) - - return bin - - def load_ui(self): - global widgets - """ Search for the glade XML file and load it """ - # Check first in the directory of this script. - if os.path.isfile('gfceu.xml'): - glade_file = 'gfceu.xml' - # Then check to see if its installed on a *nix system - elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.xml')): - glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.xml') - else: - print 'ERROR.' - print 'Could not find the glade interface file.' - print 'Try reinstalling the application.' - sys.exit(1) - - try: - print "Using: " + glade_file - widgets = gtk.Builder() - widgets.add_from_file(glade_file) - widgets.connect_signals(self) - except: - self.print_error("Couldn't load the glade UI file", 24) - - widgets.get_object("main_window").show_all() - - def launch(self, rom_name, local=False): - global options - set_options() - - sound_options = '' - - if options.sound_check: - sound_options += '--sound 1 ' - else: - sound_options += '--sound 0 ' - - if options.soundq_check: - sound_options += '--soundq 1 ' - else: - sound_options += '--soundq 0 ' - - if options.soundrate_entry: - sound_options += '--soundrate ' + options.soundrate_entry + ' ' - else: - soundrate = ' ' - - # video - video_options = '' - if options.fullscreen_check: - video_options += '--fullscreen 1 ' - else: - video_options += '--fullscreen 0 ' - - if options.opengl_check: - video_options += '--opengl 1 ' - else: - video_options += '--opengl 0 ' - - video_options += ' --xscale ' + str(options.xscale_spin) - video_options += ' --yscale ' + str(options.yscale_spin) - video_options += ' ' - - - # Netplay is fucked right now - """ - if options.join_radio: - if options.join_pass == '': - netpass = '' - else: - netpass = '--pass ' + '"' + options.join_pass + '" ' - network = '-net "' + options.join_add + '"'\ - ' --port '+ str(options.join_port) + ' ' + netpass - else: - network = '' - - if options.host_radio: - if options.host_pass == '': - netpass = ' ' - else: - netpass = ' --pass ' + '"' + options.host_pass + '" ' - network = '--net localhost --port '+\ - str(options.host_port) + netpass + ' ' - - if local: - network = '' - """ - network = '' - - command = self.fceux_binary + ' ' + sound_options + video_options +\ - network + options.extra_entry + ' '+ rom_name - self.msg('Command: ' + command) - - # more code to disable because netplay is fucked - """ - if options.host_radio: - xterm_binary = find_binary("xterm") - if xterm_binary == None: - gfceu_error("Cannot find xterm on this system. You will not \n\ - be informed of server output.", 102, True, False) - args = [self.server_binary] - else: - args = [xterm_binary, "-e", self.server_binary] - args.append('--port') - args.append(str(options.host_port)) - if options.host_pass: - args.append("--password") - args.append(options.host_pass) - pid = Popen(args).pid - """ - widgets.get_object("main_window").hide() - - # os.system() is a blocker, so we must force - # gtk to process our events. - while gtk.events_pending(): - gtk.main_iteration_do() - - os.system(command) - widgets.get_object("main_window").show() - - # another part of netplay code - """ - if options.host_radio: - os.kill(pid, 9) - """ - - ### Callbacks - def launch_button_clicked(self, arg1): - - global options - options.romfile = widgets.get_object("rom_entry").get_text() - if widgets.get_object("rom_entry").get_text() == '': - self.msg('Please specify a ROM to open in the main tab.', True) - return - if options.network_rom: - try: - myvfs = gnomevfs.Handle(options.romfile) - # FIXME - # Smarter way of handling this? Copying direct error information? - except gnomevfs.HostNotFoundError: - gfceu_error("Remote ROM host not found.", 7, True, False) - return - except: - gfceu_error("Failed to open the network ROM.", 6, True, False) - return - myfile = file('/tmp/gfceu.nes', 'wb') - while 1: - try: - myfile.write(myvfs.read(1024)) - except gnomevfs.EOFError: - break - except: - gfceu_error("Failed to open the network ROM.", 10, True, False) - return - - myvfs.close() - myfile.close() - romfile = '/tmp/gfceu.nes' - else: - romfile = options.romfile - - self.launch('"'+romfile+'"') - - def about_button_clicked(self, menuitem, data=None): - widgets.get_object("about_dialog").set_name('GNOME FCE Ultra '+version) - widgets.get_object("about_dialog").run() - widgets.get_object("about_dialog").hide() - - def browse_button_clicked(self, menuitem, data=None): - global options - set_options() - chooser = gtk.FileChooserDialog("Open...", None, - gtk.FILE_CHOOSER_ACTION_OPEN, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - if have_gnomevfs: - chooser.set_property("local-only", False) - else: - chooser.set_property("local-only", True) - - chooser.set_default_response(gtk.RESPONSE_OK) - - filter=gtk.FileFilter() - filter.set_name("NES Roms") - filter.add_mime_type("application/x-nes-rom") - filter.add_mime_type("application/zip") - filter.add_pattern("*.nes") - filter.add_pattern("*.zip") - chooser.add_filter(filter) - - filter = gtk.FileFilter() - filter.set_name("All files") - filter.add_pattern("*") - chooser.add_filter(filter) - - - - if options.romfile == '': - folder = os.getenv('HOME') - else: - folder = os.path.split(options.romfile)[0] - - chooser.set_current_folder (folder) - - response = chooser.run() - chooser.hide() - - if response == gtk.RESPONSE_OK: - if chooser.get_filename(): - x = chooser.get_filename() - widgets.get_object("rom_entry").set_text(x) - options.romfile = x - options.network_rom = False - elif chooser.get_uri(): - x = chooser.get_uri() - widgets.get_object("rom_entry").set_text(x) - options.romfile = x - options.network_rom = True - - def gamepad_clicked(self, widget, data=None): - - d = {'gp1_button' : '1', - 'gp2_button' : '2', - 'gp3_button' : '3', - 'gp4_button' : '4'} - command = '-inputcfg gamepad' + d[widget.name] + ' /dev/null' - launch(command, True) - - def config_help_button_clicked(self, menuitem, data=None): - msgbox = gtk.MessageDialog(parent=None, flags=0, - type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup("Once a gamepad is seleceted, a titlebar will be displayed\ - indicating a NES button. Press the button or key you would like to have\ - associated with the button indicated on the titlebar. This process\ - will repeat until all buttons on the gamepad are configured.") - msgbox.run() - msgbox.hide() - - - def join_radio_clicked(self, menuitem, data=None): - global options - widgets.get_object("join_frame").set_sensitive(True) - widgets.get_object("host_frame").set_sensitive(False) - options.join_radio = True - options.host_radio = False - options.no_network_radio = False - - def host_radio_clicked(self, menuitem, data=None): - if widgets.get_object("host_radio").get_active(): - self.server_binary = find_binary('fceu-server') - - if self.server_binary == None: - if os.name == 'nt': - gfceu_error("The fceu server software cannot be found. \n\ - Ensure that it is installed in the same directory as \n\ - GFCE Ultra.", 102, True, False) - else: - gfceu_error("The fceu server software cannot be found on \n\ - this system. Ensure that it is installed and in your path.", - 101, True, False) - widgets.get_object("no_network_radio").set_active(True) - options.no_network_radio = True - return False - - widgets.get_object("join_frame").set_sensitive(False) - widgets.get_object("host_frame").set_sensitive(True) - options.join_radio = False - options.host_radio = True - options.no_network_radio = False - - def no_network_radio_clicked(self, menuitem, data=None): - widgets.get_object("join_frame").set_sensitive(False) - widgets.get_object("host_frame").set_sensitive(False) - options.join_radio = False - options.host_radio = False - options.no_network_radio = True - - def end(self, menuitem, data=None): - global options, optionsfile - set_options() - save_options() - gtk.main_quit() - - - -if __name__ == '__main__': - - - parser = OptionParser(version='%prog '+ version) - parser.parse_args() - - - - - app = GfceuApp() - diff --git a/gfceu.1 b/gfceu.1 deleted file mode 100644 index 74543b99..00000000 --- a/gfceu.1 +++ /dev/null @@ -1,19 +0,0 @@ -.TH gfceu 1 "July 17 2006" "Lukas Sabota" -.SH NAME -GNOME FCE Ultra - A graphical front-end for FCE Ultra -.SH SYNOPSIS -.B gfceu -.BR [options] -.PP -.SH DESCRIPTION -GFCE Ultra is a graphical front-end for FCE Ultra, an advanced Nintendo Entertainment System emulator. The program allows easy control over various options including input, network, video, and sound. It uses the GTK+2 library and optionally GNOMEVFS. -.SH OPTIONS -.TP -.B --version -Displays the version number of the application -.TP -.B --help -Displays a help message displaying options -.SH AUTHOR -.TP -Written for Ubuntu/Debian by Lukas Sabota. diff --git a/gfceu.desktop b/gfceu.desktop deleted file mode 100644 index 37cc8e87..00000000 --- a/gfceu.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=GFCE Ultra NES Emulator -Comment=Play Nintendo ROM files -Exec=gfceu -Terminal=false -Type=Application -StartupNotify=true -Icon=gfceu -Categories=GNOME;GTK;Game; diff --git a/gfceu.glade b/gfceu.glade deleted file mode 100644 index 57d03c28..00000000 --- a/gfceu.glade +++ /dev/null @@ -1,1137 +0,0 @@ - - - - - - True - GFCE Ultra - 442 - gfceu.png - - - - True - 1 - - - True - True - 3 - - - True - 5 - 5 - - - True - 5 - - - True - 5 - ROM Filename: - - - False - False - - - - - True - True - - - 1 - - - - - True - True - _Browse... - True - 0 - - - - False - False - 2 - - - - - False - False - - - - - - - True - Main - - - tab - False - - - - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - - - - - True - Select an NES gamepad to configure. - True - - - False - False - 7 - 1 - - - - - False - False - - - - - True - 2 - 2 - 5 - 5 - - - True - True - Gamepad _3 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _4 - True - 0 - - - - 1 - 2 - 1 - 2 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _1 - True - 0 - - - - - - - - - False - False - 1 - - - - - True - True - gtk-help - True - 0 - - - - False - False - 5 - GTK_PACK_END - 2 - - - - - 1 - - - - - True - Input - - - tab - 1 - False - - - - - True - 5 - 5 - - - True - True - Enable _OpenGL Rendering - True - 0 - True - - - False - False - - - - - True - True - Enable _Full Screen - True - 0 - True - - - False - False - 1 - - - - - True - - - True - X scale: - - - False - 5 - - - - - True - True - 2 1 10 0.5 1 10 - 1 - True - - - False - 1 - - - - - False - 2 - - - - - True - - - True - Y scale: - - - False - 5 - - - - - True - True - 2 1 10 0.5 1 10 - 1 - True - GTK_UPDATE_IF_VALID - - - False - 1 - - - - - False - 3 - - - - - True - - - True - Bits per pixel: - - - False - 5 - - - - - - - - False - 4 - - - - - True - <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> - True - True - - - False - False - 5 - - - - - 2 - - - - - True - Video - - - tab - 2 - False - - - - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - - - - - True - If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. - -Invalid options may cause GFCE Ultra to perform incorrectly. - - True - - - False - False - 1 - - - - - False - False - 5 - - - - - True - - - True - Extra Parameters: - - - False - False - 5 - - - - - True - True - - - 5 - 1 - - - - - False - 1 - - - - - 3 - - - - - True - Advanced - - - tab - 3 - False - - - - - True - 5 - - - True - True - Enable _Sound - True - 0 - True - True - - - False - 5 - - - - - True - True - Extra _Quaility - True - 0 - True - True - - - False - 5 - 1 - - - - - True - - - True - Sample rate: - - - False - False - 5 - - - - - True - True - 11000 - - - False - False - 1 - - - - - False - 5 - 2 - - - - - 4 - False - - - - - True - Sound - - - tab - 4 - False - - - - - True - False - 5 - 5 - - - True - True - _Host Game - True - 0 - True - - - - False - False - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 19 - - - True - 2 - 2 - 5 - 5 - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - True - True - 4046 1 65536 1 10 10 - 1 - - - 1 - 2 - - - - - - True - 0 - Password: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Port: - - - GTK_FILL - - - - - - - - - - False - False - 1 - - - - - True - True - _Join Game - True - 0 - True - host_radio - - - - False - False - 2 - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 0 - 19 - - - True - 5 - 3 - 2 - 3 - 5 - - - True - True - 4046 1 65536 1 10 10 - 1 - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - True - False - * - - - 1 - 2 - 2 - 3 - - - - - - True - True - - - 1 - 2 - - - - - - - - - - False - False - 3 - - - - - True - True - _No Network - True - 0 - True - True - host_radio - - - - False - False - 4 - - - - - 5 - - - - - True - False - Network - - - tab - 5 - False - - - - - 10 - - - - - True - True - - - True - 3 - - - True - True - True - True - True - gtk-execute - True - 0 - - - - False - - - - - True - True - gtk-about - True - 0 - - - - False - False - 1 - - - - - True - True - gtk-quit - True - 0 - - - - False - 2 - - - - - - - False - False - 1 - - - - - - - GDK_WINDOW_TYPE_HINT_NORMAL - (C) Copyright 2006 - A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator - http://dietschnitzel.com/gfceu/ - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Lukas Sabota -<ltsmooth42@gmail.comt> - -Patch writers: -Scott Brown - translator-credits - Sketching: - J. Sammer -Digital Manipulation: - C. Kontros - -Artwork for old versions (< 0.2.7): - Jimmy Angelakos - <vyruss000@gmail.com> - gfceu_big.png - - - True - - - - - - True - - - False - GTK_PACK_END - - - - - - - - - True - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - 3 - 3 - - - - - - - - - - - - - - - - - - True - True - True - Up - 0 - - - 1 - 2 - - - - - True - True - True - Left - 0 - - - 1 - 2 - - - - - True - True - True - Down - 0 - - - 1 - 2 - 2 - 3 - - - - - True - True - True - Right - 0 - - - 2 - 3 - 1 - 2 - - - - - - - - - True - <b>D-Pad</b> - True - - - label_item - - - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - - - True - True - True - Select - 0 - - - - - True - True - True - Start - 0 - - - 1 - - - - - - - - - True - <b>Essentials</b> - True - - - label_item - - - - - 1 - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - - - True - True - True - B - 0 - - - - - True - True - True - A - 0 - - - 1 - - - - - - - - - True - <b>Alpha and Beta</b> - True - - - label_item - - - - - 2 - - - - - - diff --git a/gfceu.png b/gfceu.png deleted file mode 100644 index 4b7c4246bc159641a7fd2da659e480643aa9350d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00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^V#pr)R4|Rg}%o2uFh4Ke>2<2>1qK0@u>szTw;9 zuD?PYX1gsMbSaTL$op+csn|LUC1zw{kumb+i}_gS*@1xpPnVLNj}~$=wkWangrl)L z7Xw5fdr - - - - 10 - 1 - 1 - 0.5 - 10 - 2 - - - 10 - 1 - 1 - 0.5 - 10 - 2 - - - 65536 - 1 - 10 - 1 - 10 - 4046 - - - 65536 - 1 - 10 - 1 - 10 - 4046 - - - True - GFCE Ultra - 442 - gfceu.png - - - - True - 1 - - - True - True - 3 - - - True - 5 - 5 - - - True - 5 - - - True - 5 - ROM Filename: - - - False - False - - - - - True - True - - - 1 - - - - - True - True - _Browse... - True - - - - False - False - 2 - - - - - False - False - - - - - - - True - Main - - - False - - - - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - - - - - True - Select an NES gamepad to configure. - True - - - False - False - 7 - 1 - - - - - False - False - - - - - True - 2 - 2 - 5 - 5 - - - True - True - Gamepad _3 - True - - - - 1 - 2 - - - - - - True - True - Gamepad _4 - True - - - - 1 - 2 - 1 - 2 - - - - - - True - True - Gamepad _2 - True - - - - 1 - 2 - - - - - - True - True - Gamepad _1 - True - - - - - - - - - False - False - 1 - - - - - True - True - gtk-help - True - - - - False - False - 5 - GTK_PACK_END - 2 - - - - - - - True - Input - - - 1 - False - - - - - True - 5 - 5 - - - True - True - Enable _OpenGL Rendering - True - True - - - False - False - - - - - True - True - Enable _Full Screen - True - True - - - False - False - 1 - - - - - True - - - True - X scale: - - - False - 5 - - - - - True - True - adjustment1 - 1 - True - - - False - 1 - - - - - False - 2 - - - - - True - - - True - Y scale: - - - False - 5 - - - - - True - True - adjustment2 - 1 - True - GTK_UPDATE_IF_VALID - - - False - 1 - - - - - False - 3 - - - - - True - - - True - Bits per pixel: - - - False - 5 - - - - - - - - False - 4 - - - - - True - <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> - True - True - - - False - False - 5 - - - - - - - True - Video - - - 2 - False - - - - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - - - - - True - If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. - -Invalid options may cause GFCE Ultra to perform incorrectly. - - True - - - False - False - 1 - - - - - False - False - 5 - - - - - True - - - True - Extra Parameters: - - - False - False - 5 - - - - - True - True - - - 5 - 1 - - - - - False - 1 - - - - - - - True - Advanced - - - 3 - False - - - - - True - 5 - - - True - True - Enable _Sound - True - True - True - - - False - 5 - - - - - True - True - Extra _Quaility - True - True - True - - - False - 5 - 1 - - - - - True - - - True - Sample rate: - - - False - False - 5 - - - - - True - True - 11000 - - - False - False - 1 - - - - - False - 5 - 2 - - - - - 4 - False - - - - - True - Sound - - - 4 - False - - - - - True - False - 5 - 5 - - - True - True - _Host Game - True - True - - - - False - False - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 19 - - - True - 2 - 2 - 5 - 5 - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - True - True - adjustment3 - 1 - - - 1 - 2 - - - - - - True - 0 - Password: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Port: - - - GTK_FILL - - - - - - - - - - False - False - 1 - - - - - True - True - _Join Game - True - True - host_radio - - - - False - False - 2 - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 0 - 19 - - - True - 5 - 3 - 2 - 3 - 5 - - - True - True - adjustment4 - 1 - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - True - False - * - - - 1 - 2 - 2 - 3 - - - - - - True - True - - - 1 - 2 - - - - - - - - - - False - False - 3 - - - - - True - True - _No Network - True - True - True - host_radio - - - - False - False - 4 - - - - - - - True - False - Network - - - 5 - False - - - - - 10 - - - - - True - True - - - True - 3 - - - True - True - True - True - True - gtk-execute - True - - - - False - - - - - True - True - gtk-about - True - - - - False - False - 1 - - - - - True - True - gtk-quit - True - - - - False - 2 - - - - - - - False - False - 1 - - - - - - - GDK_WINDOW_TYPE_HINT_NORMAL - (C) Copyright 2006 - A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator - http://dietschnitzel.com/gfceu/ - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Lukas Sabota -<ltsmooth42@gmail.comt> - -Patch writers: -Scott Brown - translator-credits - Sketching: - J. Sammer -Digital Manipulation: - C. Kontros - -Artwork for old versions (< 0.2.7): - Jimmy Angelakos - <vyruss000@gmail.com> - gfceu_big.png - - - True - - - - - - True - - - False - GTK_PACK_END - - - - - - - - - True - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - 3 - 3 - - - - - - - - - - - - - - - - - - True - True - True - Up - - - 1 - 2 - - - - - True - True - True - Left - - - 1 - 2 - - - - - True - True - True - Down - - - 1 - 2 - 2 - 3 - - - - - True - True - True - Right - - - 2 - 3 - 1 - 2 - - - - - - - - - True - <b>D-Pad</b> - True - - - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - - - True - True - True - Select - - - - - True - True - True - Start - - - 1 - - - - - - - - - True - <b>Essentials</b> - True - - - - - 1 - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - - - True - True - True - B - - - - - True - True - True - A - - - 1 - - - - - - - - - True - <b>Alpha and Beta</b> - True - - - - - 2 - - - - - - diff --git a/gfceu_big.png b/gfceu_big.png deleted file mode 100644 index b35457b44be60e87022ffff3ccdf04002508ece0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14007 zcm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4sZL`N^ zY43j!D+Ai|wJ;4{*&uMgaL<}K)?e1coQGc|`1x&ZqBk~chmatVIP%5KP+w&w%zM?Y zgsHyqom_h;!ORdmt#y4%b0)DoTP>O!nXHJK;-+Co3Fbdcw z6ybr_@KJ!BAI~dV4tdpGv7iHXUJQ3vnGudF;0{qh!nfWom~CyMo&h92$C z!=1X~br?t#xNQxe34(F1{QO`@ku;uY+uH8sMafX(VS+V>?(>pm^rfr}Bk?@G=Ls4( zSg0q9t7IMv+AZUe=(EhTk91EX67EgBw}KLcIAFoIYj$g*I{f0o4Q7PjHaK(6S;s>P z5DA`;SJ6Rkzo~J?&;rG5-v>XHvjXeu+j-$OxcpupKKMiW07-`#wGyju>E|C@*+6vR zA~3=Wn9%^ELQAu6kUA0TBL9WKN0K}#`mO0Ney diff --git a/gfceu_big_old.png b/gfceu_big_old.png deleted file mode 100644 index 24ecfa2662c13ea98d75664d3163d895f5edc1f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9492 zcmV+vCF|OWP)Tux!^=-+ycGbGmQ$ z9o{@h4-K{@WZ9CCjE#jcwg?GeXD}2HAS59vQmNzvRiRQzDkPOkrSgeps1E-ymb=1T29{Zi&NQj`KfFLTMVy7#l1o;uD=KI#6C@L{ORs}8hiYoSZLd&^!UP=iS zA*!R}YYwa|AkOpc-|@j+zvtKMQMCl`T92iz5NSQNzOltuAAgGN;h3nAqzP3e#6V~Q zNwXMZjHu@Os7gvoOc6~9O$sV#N{BdOiuwGa)0qEGBv9q>@&SJ2hd#vOVxKqKQ54|p zvA5e)86wisj_~|Tr}@>7{1zLd35b9y-aABu$)q7^LcBwhPG6g1UhPf*5kv$Lm!&O2 zN---1(3C*1*XP$9US47_8nL*v_=Z$~2Wp_xx)nuC&5M}HX<}fU662JRB#0_8LRHtK zB*Y{TvtU&df*_KzsX?f`2US7}roX&91kjjGQ4HB+dFK#Uk<9Ellu`vxaCjU=G*4si~Ri3)+_2vQSV{f0I{%fKO1 z!X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yX%I68?OZYmHa4li$z^D3I$0v*PwPv)TEt6|UU~1!xPuZ_jbwyk4a7>qP-gO99y5 z3%g(>++;HpTDxF_*&yxzFBCAazsI)n+J$Uxq6yj!*B`fh(Vpfnf4wUpv;~Ti` diff --git a/gfceu_old.png b/gfceu_old.png deleted file mode 100644 index ab5144d937c337c3be13d38f94f688638ea9e532..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1697 zcmV;S244AzP)yNXjFeXu$A9NOGdnZP z%?%eag=lswA zoGX9>l7RgE`M=Bz3=Z-3xp#?tL>Prc-V^x<^@{gO6h%Z)#OL<)@{L2^7XHtX06Kwn zK)Vyidl&mT{M-vTafD%nb3))8BH(>Q-Fwt~wr|_atr!Vl4e(juP6X6@qA0@S0Z@g& z!Rp((&?tgrg6V4`ByqO{fCI7yVk5)=u!&_Ns488B0zd5C!($V}Joc#`))m?bR6mM6 zX?kt|5FoGzwTTX(pdLX9P~590$@gC(dF&WNE}$w)8gaJ8ZlKNf&H~$jKLDe^EbzE% z`Qwe(iYlRks^V3c>D^0l%O-03_k)1Sq9N@9x`CI06To+XmB2pWS>S87CIuW!EPMo^ z4Nskze5G=k=SHs++`SWhzn@I0Oxn*mtpn}{?gQR5PHngCK4J6U2iCWkdNHw}{{lh6 z_>_WBDCGH)3s`yd2>O)+{5YS-#~w%mw;N>+o7*3^@5UGd_5ydcn5qCjokL~y9k%P9RdQkB;-m(?<}6=(kT&nVM#Ba1h{OJNY}n?}6um z<3Jub2b7E(8?a1bo@D;Wo1~3LFK_17*wjxc~$qmrb)~RVN7t%hD+dm1#yY zDSGzq;jc%J(Y<*CubntSy7nlz~;xH&45sANp07U3$&$HvM zt)w$4ve_(KyEiugbOXNuw%(*1|J$-;J^(?$)K67Gm1;Ik-3cA}b`BjpKr)#i(Uu^W z%L1$bz7E`MX`BGQ3q%V7&_-Yy66}@K^ehsEl*%Q3_vBO5>mjO2sayuw3EXpච zfzz$kZ~-lh$)JGx2#q|Gr84KUt6+7$sd&t*0}b~B z1fe1dorMk_=-Evo5JZJ)wTh8xW(nh0fnQth_uE=s5n4GTi zkK?bC&9`%=?;Xa9Q`Eu`i{*7-Q=^H;E4r15Vs>DaWGUpD_3-~ zdU+17%1qVs!IfbIC6~`)Ze4F1b~fd=01ui-?E)TXGBRsiSSSRhLK3Ir+Epv)YH#P% zTYZ4CuXiu?Fk;}^FqupS;H(jGnYntqy#ss`__P(G=JNc6RY(?5LO~Ejgk%6`&z}c` zYPH6R({GbYB}k{*XiFvm-nFjhvekos*?Xh2+i0O_^iMAWKWff|M5_aYxD8jJHd|w+ zT4VY0P6h`mOjRn>!!QQvT%*}IX>qPwd;cbI0oVY1%xsJS&j3HS3b}X|G=TWXBW-E! zy=NyUPrX5AS&GkmvWKzK6xDhR!i-+Cn3jPZ#)%m-8UjNG>NQ&%Ev*BA!->O-a&>qV z5VmakIL-;f6Gbjw88L~tk2Y@Y&OX?zP)!h8D5o(}S*FWmruxxR{+_n^e86#Eo!%p_U r+|@cwC~^x|M_OY&W~7_B6(IftNzQYNJE)a600000NkvXXu0mjfZ3qz5 diff --git a/mockup_test.py b/mockup_test.py deleted file mode 100644 index 3eb75e94..00000000 --- a/mockup_test.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -# displays mockup of gamepad config -import gtk, gtk.glade - -class WidgetsWrapper: - def __init__(self): - self.widgets = gtk.glade.XML ('gfceu.glade', "gamepad_config_window") - self.widgets.signal_autoconnect(GladeHandlers.__dict__) - # Gives us the ability to do: widgets['widget_name'].action() - def __getitem__(self, key): - return self.widgets.get_widget(key) - -widgets = WidgetsWrapper() - -widgets['gamepad_config_window'].show_all() -gtk.main () - diff --git a/setup.py b/setup.py deleted file mode 100644 index 24b04f49..00000000 --- a/setup.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python -from distutils.core import setup -setup(name="gfceu", - version="0.7svn", - scripts = ['gfceu'], - data_files=[('share/gfceu/',['gfceu.glade', 'gfceu_big.png', 'gfceu.png']), - ('share/pixmaps/', ['gfceu.png']), - ('share/man/man1/', ['gfceu.1']), - ('share/applications/', ['gfceu.desktop'])], - author = "Lukas Sabota", - author_email = "punkrockguy318@comcast.net", - url = "http://punkrockguy318.no-ip.org" - - ) - diff --git a/status_window.py b/status_window.py deleted file mode 100644 index 4970cc84..00000000 --- a/status_window.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python -# A cool thing that i don't feel like explaining -import gtk -import gobject -import os -class shit: - def __init__(self, command, title="Status Window"): - self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) - self.window.set_default_size(400,300) - self.window.set_title(title) - - self.scroll = gtk.ScrolledWindow() - self.scroll.set_property("hscrollbar-policy", gtk.POLICY_NEVER) - - self.buffer = gtk.TextBuffer() - - self.text_view = gtk.TextView(self.buffer) - self.text_view.set_editable(False) - self.window.add(self.scroll) - self.scroll.add(self.text_view) - - gobject.timeout_add(10, self.get_output) - - self.handle = os.popen(command, "r",1) - self.add(self.handle.readlines()) - def get_output(self): - self.add(self.handle.read()) - - def show(self): - self.window.show_all() - - def hide(self): - self.window.hide_all() - - def add(self, string): - self.buffer.insert_at_cursor(string) - -myshit = shit("fceu-server", "THE StatUZ") -myshit.show() -gtk.main() From 763a886c745f3147681bc5c119a7e6694e7fa758 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Jun 2008 16:04:14 +0000 Subject: [PATCH 19/94] ocd --- gfceu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfceu b/gfceu index bd492a6a..88cc72c5 100644 --- a/gfceu +++ b/gfceu @@ -2,7 +2,7 @@ # gfceu - Graphical launcher for FCE Ultra. # Designed on Ubuntu, with platfrom independence in mind. version = "0.7svn" -title = "gfceux" +title = "gfceu" # Copyright (C) 2006 Lukas Sabota ## """ From a5d1f30977e5636b1f305b7e21fe221d4b894fa5 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Jun 2008 17:33:48 +0000 Subject: [PATCH 20/94] updated setup files to reflect glade->builder change --- MANIFEST | 2 +- gfceu | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MANIFEST b/MANIFEST index 493dbe58..15a8e5c0 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4,7 +4,7 @@ COPYING ChangeLog INSTALL TODO -gfceu.glade +gfceu.xml gfceu.desktop gfceu.png gfceu_big.png diff --git a/gfceu b/gfceu index 88cc72c5..69da9b8e 100644 --- a/gfceu +++ b/gfceu @@ -293,7 +293,7 @@ class GfceuApp: glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.xml') else: print 'ERROR.' - print 'Could not find the glade interface file.' + print 'Could not find the glade.xml file.' print 'Try reinstalling the application.' sys.exit(1) diff --git a/setup.py b/setup.py index 24b04f49..19cd503e 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from distutils.core import setup setup(name="gfceu", version="0.7svn", scripts = ['gfceu'], - data_files=[('share/gfceu/',['gfceu.glade', 'gfceu_big.png', 'gfceu.png']), + data_files=[('share/gfceu/',['gfceu.xml', 'gfceu_big.png', 'gfceu.png']), ('share/pixmaps/', ['gfceu.png']), ('share/man/man1/', ['gfceu.1']), ('share/applications/', ['gfceu.desktop'])], From 427c7ad721d9a0c3d45ad4d6803ac4b0b7ee53cf Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Jun 2008 17:36:01 +0000 Subject: [PATCH 21/94] fixed gamepad config issue --- gfceu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfceu b/gfceu index 69da9b8e..c0c2e35c 100644 --- a/gfceu +++ b/gfceu @@ -507,7 +507,7 @@ class GfceuApp: 'gp3_button' : '3', 'gp4_button' : '4'} command = '-inputcfg gamepad' + d[widget.name] + ' /dev/null' - launch(command, True) + self.launch(command, True) def config_help_button_clicked(self, menuitem, data=None): msgbox = gtk.MessageDialog(parent=None, flags=0, From 8cd90d3352bb057dcaef6213749a5ea0506cbed5 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 18 Jun 2008 01:46:02 +0000 Subject: [PATCH 22/94] added support for sound buffer size also created a script to generate the gfceu.xml file --- generate_ui.sh | 3 +++ gfceu | 51 +++++++++++++++++++++++++++++--------------------- gfceu.glade | 32 +++++++++++++++++++++++++++++++ gfceu.xml | 32 +++++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 21 deletions(-) create mode 100644 generate_ui.sh diff --git a/generate_ui.sh b/generate_ui.sh new file mode 100644 index 00000000..fe4862e8 --- /dev/null +++ b/generate_ui.sh @@ -0,0 +1,3 @@ +#!/bin/sh +gtk-builder-convert gfceu.glade gfceu.xml + diff --git a/gfceu b/gfceu index c0c2e35c..5df29922 100644 --- a/gfceu +++ b/gfceu @@ -63,6 +63,7 @@ class game_options: sound_check = True soundq_check = True soundrate_entry = "11000" + soundbufsize_entry = "48" # video fullscreen_check = False @@ -116,7 +117,9 @@ def give_widgets(): widgets.get_object("sound_check").set_active(options.sound_check) widgets.get_object("soundq_check").set_active(options.soundq_check) widgets.get_object("soundrate_entry").set_text(options.soundrate_entry) + widgets.get_object("soundbufsize_entry").set_text(options.soundbufsize_entry) + # video widgets.get_object("fullscreen_check").set_active(options.fullscreen_check) widgets.get_object("opengl_check").set_active(options.opengl_check) widgets.get_object("xscale_spin").set_value(options.xscale_spin) @@ -137,10 +140,11 @@ def give_widgets(): widgets.get_object("host_pass").set_text(options.host_pass) except AttributeError: - # When new widgets are added, old pickle files might break. + # When new widgets are added, old pickle files might break. options = game_options() give_widgets() - + except RuntimeError: + print "shit" def set_options(): """ @@ -155,6 +159,7 @@ def set_options(): options.sound_check = widgets.get_object("sound_check").get_active() options.soundq_check = widgets.get_object("soundq_check").get_active() options.soundrate_entry = widgets.get_object("soundrate_entry").get_text() + options.soundbufsize_entry = widgets.get_object("soundbufsize_entry").get_text() # video options.fullscreen_check = widgets.get_object("fullscreen_check").get_active() @@ -168,7 +173,7 @@ def set_options(): options.host_radio = widgets.get_object("host_radio").get_active() options.no_network_radio = widgets.get_object("no_network_radio").get_active() options.join_add = widgets.get_object("join_add").get_text() - options.join_port = widgets.get_object("join_port").get_value() + options.join_port = int(widgets.get_object("join_port").get_value()) options.join_pass = widgets.get_object("join_pass").get_text() options.host_port = widgets.get_object("host_port").get_value() options.host_pass = widgets.get_object("host_pass").get_text() @@ -297,13 +302,13 @@ class GfceuApp: print 'Try reinstalling the application.' sys.exit(1) - try: - print "Using: " + glade_file - widgets = gtk.Builder() - widgets.add_from_file(glade_file) - widgets.connect_signals(self) - except: - self.print_error("Couldn't load the glade UI file", 24) + #try: + print "Using: " + glade_file + widgets = gtk.Builder() + widgets.add_from_file(glade_file) + widgets.connect_signals(self) + #except: + # self.print_error("Couldn't load the glade UI file", 24) widgets.get_object("main_window").show_all() @@ -325,8 +330,9 @@ class GfceuApp: if options.soundrate_entry: sound_options += '--soundrate ' + options.soundrate_entry + ' ' - else: - soundrate = ' ' + + if options.soundbufsize_entry: + sound_options += '--soundbufsize ' + options.soundbufsize_entry + ' ' # video video_options = '' @@ -346,36 +352,39 @@ class GfceuApp: # Netplay is fucked right now - """ + if options.join_radio: if options.join_pass == '': netpass = '' else: - netpass = '--pass ' + '"' + options.join_pass + '" ' - network = '-net "' + options.join_add + '"'\ + netpass = '--pass ' + options.join_pass + network = '--net ' + options.join_add +\ ' --port '+ str(options.join_port) + ' ' + netpass else: network = '' - + if options.host_radio: + """ if options.host_pass == '': netpass = ' ' else: - netpass = ' --pass ' + '"' + options.host_pass + '" ' +# netpass = ' --pass ' + '"' + options.host_pass + '" ' + netpass = ' --pass ' + options.host_pass network = '--net localhost --port '+\ str(options.host_port) + netpass + ' ' + """ + network = '' if local: network = '' - """ - network = '' + command = self.fceux_binary + ' ' + sound_options + video_options +\ network + options.extra_entry + ' '+ rom_name self.msg('Command: ' + command) # more code to disable because netplay is fucked - """ + """ if options.host_radio: xterm_binary = find_binary("xterm") if xterm_binary == None: @@ -406,7 +415,7 @@ class GfceuApp: if options.host_radio: os.kill(pid, 9) """ - + ### Callbacks def launch_button_clicked(self, arg1): diff --git a/gfceu.glade b/gfceu.glade index 57d03c28..a3d8e35b 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -527,6 +527,38 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 2 + + + True + + + True + Buffer size (ms): + + + False + False + 5 + + + + + True + True + 48 + + + False + False + 1 + + + + + False + 3 + + 4 diff --git a/gfceu.xml b/gfceu.xml index 1a090d39..5f64bb63 100644 --- a/gfceu.xml +++ b/gfceu.xml @@ -535,6 +535,38 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 2 + + + True + + + True + Buffer size (ms): + + + False + False + 5 + + + + + True + True + 48 + + + False + False + 1 + + + + + False + 3 + + 4 From 0c521a6327fa2472465294a02a2b686074c7180e Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 24 Jun 2008 04:41:05 +0000 Subject: [PATCH 23/94] No longer requires gnome-vfs to play games over the network --- ChangeLog | 1 + INSTALL | 2 -- gfceu | 45 ++------------------------------------------- 3 files changed, 3 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2dac599..877407c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* No longer requires GnomeVFS * Major code cleanup * Now requires pygtk >= 2.12 * Transitioned from gtk.glade to gtk.Builder. diff --git a/INSTALL b/INSTALL index eb210c0a..86a50427 100644 --- a/INSTALL +++ b/INSTALL @@ -9,5 +9,3 @@ Python (tested with 2.5); (Ubuntu package name: python) PyGTK, and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) FCE UltraX - You're going to need the latest fceux for gfceu .7 to work -Optional: -GnomeVFS 2 (tested with 2.14.1) (Ubuntu package name libgnomevfs2-0 ) diff --git a/gfceu b/gfceu index 5df29922..b8e7df9c 100644 --- a/gfceu +++ b/gfceu @@ -41,17 +41,6 @@ except ImportError: On Debian based systems (like Ubuntu), try this command:\n\ sudo apt-get install python-gtk2 libgtk2.0-0" -try: - import gnomevfs - have_gnomevfs = True -except ImportError: - print "The gnomevfs libraries cannot be found.\n\ - To enable ROM loading over the network, ensure that gnomevfs is installed on\ - this system.\n\ - On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install python-gtk2 libgnomevfs2-0" - have_gnomevfs = False - @@ -424,34 +413,8 @@ class GfceuApp: if widgets.get_object("rom_entry").get_text() == '': self.msg('Please specify a ROM to open in the main tab.', True) return - if options.network_rom: - try: - myvfs = gnomevfs.Handle(options.romfile) - # FIXME - # Smarter way of handling this? Copying direct error information? - except gnomevfs.HostNotFoundError: - gfceu_error("Remote ROM host not found.", 7, True, False) - return - except: - gfceu_error("Failed to open the network ROM.", 6, True, False) - return - myfile = file('/tmp/gfceu.nes', 'wb') - while 1: - try: - myfile.write(myvfs.read(1024)) - except gnomevfs.EOFError: - break - except: - gfceu_error("Failed to open the network ROM.", 10, True, False) - return - myvfs.close() - myfile.close() - romfile = '/tmp/gfceu.nes' - else: - romfile = options.romfile - - self.launch('"'+romfile+'"') + self.launch('"'+ options.romfile +'"') def about_button_clicked(self, menuitem, data=None): widgets.get_object("about_dialog").set_name('GNOME FCE Ultra '+version) @@ -465,11 +428,7 @@ class GfceuApp: gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - if have_gnomevfs: - chooser.set_property("local-only", False) - else: - chooser.set_property("local-only", True) - + chooser.set_property("local-only", False) chooser.set_default_response(gtk.RESPONSE_OK) filter=gtk.FileFilter() From 656d98c45bfb1195c22dc1fbdeae5be9ad15b510 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 24 Jun 2008 04:43:47 +0000 Subject: [PATCH 24/94] code cleanup --- gfceu | 1 - 1 file changed, 1 deletion(-) diff --git a/gfceu b/gfceu index b8e7df9c..13b02259 100644 --- a/gfceu +++ b/gfceu @@ -72,7 +72,6 @@ class game_options: host_port = 4046 host_pass = '' no_network_radio = True - network_rom = False def load_options(): From b2ef9985fb8743c8226ac4a16e07d972f5a3ff34 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 24 Jun 2008 16:43:26 +0000 Subject: [PATCH 25/94] code cleanup --- gfceu | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/gfceu b/gfceu index 13b02259..d53d179a 100644 --- a/gfceu +++ b/gfceu @@ -29,7 +29,7 @@ import os import pickle import shutil from optparse import OptionParser -from subprocess import Popen +#from subprocess import Popen try: import pygtk @@ -44,9 +44,6 @@ except ImportError: - # # # # # # # # -# GFCEU Functions - class game_options: # sound sound_check = True @@ -194,7 +191,7 @@ def find_binary(file): return None -############################################################################## +# # # # # # # # # # # # # # # # # # Globals options = None appconfigdir = os.getenv('HOME') + '/.'+ title @@ -290,13 +287,13 @@ class GfceuApp: print 'Try reinstalling the application.' sys.exit(1) - #try: - print "Using: " + glade_file - widgets = gtk.Builder() - widgets.add_from_file(glade_file) - widgets.connect_signals(self) - #except: - # self.print_error("Couldn't load the glade UI file", 24) + try: + print "Using: " + glade_file + widgets = gtk.Builder() + widgets.add_from_file(glade_file) + widgets.connect_signals(self) + except: + self.print_error("Couldn't load the UI data.", 24) widgets.get_object("main_window").show_all() @@ -534,13 +531,8 @@ class GfceuApp: if __name__ == '__main__': - - parser = OptionParser(version='%prog '+ version) parser.parse_args() - - - app = GfceuApp() From 9bc3055053337fe81d2c04a2057fa36c77b606df Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 25 Jun 2008 16:34:39 +0000 Subject: [PATCH 26/94] updated ui --- gfceu.glade | 1953 ++++++++++++++++++++++++++------------------------- gfceu.xml | 674 +++++++++--------- 2 files changed, 1319 insertions(+), 1308 deletions(-) diff --git a/gfceu.glade b/gfceu.glade index a3d8e35b..c3478d33 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -1,959 +1,6 @@ - - - + - - True - GFCE Ultra - 442 - gfceu.png - - - - True - 1 - - - True - True - 3 - - - True - 5 - 5 - - - True - 5 - - - True - 5 - ROM Filename: - - - False - False - - - - - True - True - - - 1 - - - - - True - True - _Browse... - True - 0 - - - - False - False - 2 - - - - - False - False - - - - - - - True - Main - - - tab - False - - - - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - - - - - True - Select an NES gamepad to configure. - True - - - False - False - 7 - 1 - - - - - False - False - - - - - True - 2 - 2 - 5 - 5 - - - True - True - Gamepad _3 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _4 - True - 0 - - - - 1 - 2 - 1 - 2 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _1 - True - 0 - - - - - - - - - False - False - 1 - - - - - True - True - gtk-help - True - 0 - - - - False - False - 5 - GTK_PACK_END - 2 - - - - - 1 - - - - - True - Input - - - tab - 1 - False - - - - - True - 5 - 5 - - - True - True - Enable _OpenGL Rendering - True - 0 - True - - - False - False - - - - - True - True - Enable _Full Screen - True - 0 - True - - - False - False - 1 - - - - - True - - - True - X scale: - - - False - 5 - - - - - True - True - 2 1 10 0.5 1 10 - 1 - True - - - False - 1 - - - - - False - 2 - - - - - True - - - True - Y scale: - - - False - 5 - - - - - True - True - 2 1 10 0.5 1 10 - 1 - True - GTK_UPDATE_IF_VALID - - - False - 1 - - - - - False - 3 - - - - - True - - - True - Bits per pixel: - - - False - 5 - - - - - - - - False - 4 - - - - - True - <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> - True - True - - - False - False - 5 - - - - - 2 - - - - - True - Video - - - tab - 2 - False - - - - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - - - - - True - If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. - -Invalid options may cause GFCE Ultra to perform incorrectly. - - True - - - False - False - 1 - - - - - False - False - 5 - - - - - True - - - True - Extra Parameters: - - - False - False - 5 - - - - - True - True - - - 5 - 1 - - - - - False - 1 - - - - - 3 - - - - - True - Advanced - - - tab - 3 - False - - - - - True - 5 - - - True - True - Enable _Sound - True - 0 - True - True - - - False - 5 - - - - - True - True - Extra _Quaility - True - 0 - True - True - - - False - 5 - 1 - - - - - True - - - True - Sample rate: - - - False - False - 5 - - - - - True - True - 11000 - - - False - False - 1 - - - - - False - 5 - 2 - - - - - True - - - True - Buffer size (ms): - - - False - False - 5 - - - - - True - True - 48 - - - False - False - 1 - - - - - False - 3 - - - - - 4 - False - - - - - True - Sound - - - tab - 4 - False - - - - - True - False - 5 - 5 - - - True - True - _Host Game - True - 0 - True - - - - False - False - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 19 - - - True - 2 - 2 - 5 - 5 - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - True - True - 4046 1 65536 1 10 10 - 1 - - - 1 - 2 - - - - - - True - 0 - Password: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Port: - - - GTK_FILL - - - - - - - - - - False - False - 1 - - - - - True - True - _Join Game - True - 0 - True - host_radio - - - - False - False - 2 - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 0 - 19 - - - True - 5 - 3 - 2 - 3 - 5 - - - True - True - 4046 1 65536 1 10 10 - 1 - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - True - False - * - - - 1 - 2 - 2 - 3 - - - - - - True - True - - - 1 - 2 - - - - - - - - - - False - False - 3 - - - - - True - True - _No Network - True - 0 - True - True - host_radio - - - - False - False - 4 - - - - - 5 - - - - - True - False - Network - - - tab - 5 - False - - - - - 10 - - - - - True - True - - - True - 3 - - - True - True - True - True - True - gtk-execute - True - 0 - - - - False - - - - - True - True - gtk-about - True - 0 - - - - False - False - 1 - - - - - True - True - gtk-quit - True - 0 - - - - False - 2 - - - - - - - False - False - 1 - - - - - - - GDK_WINDOW_TYPE_HINT_NORMAL - (C) Copyright 2006 - A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator - http://dietschnitzel.com/gfceu/ - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Lukas Sabota -<ltsmooth42@gmail.comt> - -Patch writers: -Scott Brown - translator-credits - Sketching: - J. Sammer -Digital Manipulation: - C. Kontros - -Artwork for old versions (< 0.2.7): - Jimmy Angelakos - <vyruss000@gmail.com> - gfceu_big.png - - - True - - - - - - True - - - False - GTK_PACK_END - - - - - + @@ -988,27 +35,16 @@ Artwork for old versions (< 0.2.7): - + True True True - Up - 0 - - - 1 - 2 - - - - - True - True - True - Left + Right 0 + 2 + 3 1 2 @@ -1029,20 +65,31 @@ Artwork for old versions (< 0.2.7): - + True True True - Right + Left 0 - 2 - 3 1 2 + + + True + True + True + Up + 0 + + + 1 + 2 + + @@ -1166,4 +213,962 @@ Artwork for old versions (< 0.2.7): + + GDK_WINDOW_TYPE_HINT_NORMAL + (C) Copyright 2006 + A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator + http://dietschnitzel.com/gfceu/ + This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + Lukas Sabota +<ltsmooth42@gmail.comt> + +Patch writers: +Scott Brown + translator-credits + Sketching: + J. Sammer +Digital Manipulation: + C. Kontros + +Artwork for old versions (< 0.2.7): + Jimmy Angelakos + <vyruss000@gmail.com> + gfceu_big.png + + + True + + + + + + True + + + False + GTK_PACK_END + + + + + + + True + GFCE Ultra + 442 + gfceu.png + + + + True + 1 + + + True + True + 3 + + + True + 5 + 5 + + + True + 5 + + + True + 5 + ROM Filename: + + + False + False + + + + + True + True + + + 1 + + + + + True + True + _Browse... + True + 0 + + + + False + False + 2 + + + + + False + False + + + + + + + True + Main + + + False + tab + + + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + Select an NES gamepad to configure. + True + + + False + False + 7 + 1 + + + + + False + False + + + + + True + 2 + 2 + 5 + 5 + + + True + True + Gamepad _1 + True + 0 + + + + + + + + + True + True + Gamepad _2 + True + 0 + + + + 1 + 2 + + + + + + True + True + Gamepad _4 + True + 0 + + + + 1 + 2 + 1 + 2 + + + + + + True + True + Gamepad _3 + True + 0 + + + + 1 + 2 + + + + + + False + False + 1 + + + + + True + True + gtk-help + True + 0 + + + + False + False + 5 + GTK_PACK_END + 2 + + + + + 1 + + + + + True + Input + + + 1 + False + tab + + + + + True + 5 + 5 + + + True + True + Enable _OpenGL Rendering + True + 0 + True + + + False + False + + + + + True + True + Enable _Full Screen + True + 0 + True + + + False + False + 1 + + + + + True + + + True + X scale: + + + False + 5 + + + + + True + True + 2 1 10 0.5 1 10 + 1 + True + + + False + 1 + + + + + False + 2 + + + + + True + + + True + Y scale: + + + False + 5 + + + + + True + True + 2 1 10 0.5 1 10 + 1 + True + GTK_UPDATE_IF_VALID + + + False + 1 + + + + + False + 3 + + + + + True + + + True + Bits per pixel: + + + False + 5 + + + + + True + True + + + 1 + + + + + False + 4 + + + + + True + <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> + True + True + + + False + False + 5 + + + + + 2 + + + + + True + Video + + + 2 + False + tab + + + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. + +Invalid options may cause GFCE Ultra to perform incorrectly. + + True + + + False + False + 1 + + + + + False + False + 5 + + + + + True + + + True + Extra Parameters: + + + False + False + 5 + + + + + True + True + + + 5 + 1 + + + + + False + 1 + + + + + 3 + + + + + True + Advanced + + + 3 + False + tab + + + + + True + 5 + + + True + True + Enable _Sound + True + 0 + True + True + + + False + 5 + + + + + True + True + Extra _Quaility + True + 0 + True + True + + + False + 5 + 1 + + + + + True + + + True + Sample rate: + + + False + False + 5 + + + + + True + True + 11000 + + + False + False + 1 + + + + + False + 5 + 2 + + + + + True + + + True + Buffer size (ms): + + + False + False + 5 + + + + + True + True + 48 + + + False + False + 1 + + + + + False + 3 + + + + + 4 + False + + + + + True + Sound + + + 4 + False + tab + + + + + True + False + 5 + 5 + + + True + True + _Host Game + True + 0 + True + + + + False + False + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 19 + + + True + 2 + 2 + 5 + 5 + + + True + 0 + Port: + + + GTK_FILL + + + + + + True + 0 + Password: + + + 1 + 2 + GTK_FILL + + + + + + True + True + 4046 1 65536 1 10 10 + 1 + + + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 + + + + + + + + + + False + False + 1 + + + + + True + True + _Join Game + True + 0 + True + host_radio + + + + False + False + 2 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 0 + 19 + + + True + 5 + 3 + 2 + 3 + 5 + + + True + True + + + 1 + 2 + + + + + + True + True + False + * + + + 1 + 2 + 2 + 3 + + + + + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + True + 4046 1 65536 1 10 10 + 1 + + + 1 + 2 + 1 + 2 + + + + + + + + + + False + False + 3 + + + + + True + True + _No Network + True + 0 + True + True + host_radio + + + + False + False + 4 + + + + + 5 + + + + + True + False + Network + + + 5 + False + tab + + + + + 10 + + + + + True + True + + + True + 3 + + + True + True + True + True + True + gtk-execute + True + 0 + + + + False + + + + + True + True + gtk-about + True + 0 + + + + False + False + 1 + + + + + True + True + gtk-quit + True + 0 + + + + False + 2 + + + + + + + False + False + 1 + + + + + diff --git a/gfceu.xml b/gfceu.xml index 5f64bb63..13e40e52 100644 --- a/gfceu.xml +++ b/gfceu.xml @@ -1,5 +1,4 @@ - 10 @@ -33,6 +32,253 @@ 10 4046 + + + + + True + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + 3 + 3 + + + + + + + + + + + + + + + + + + True + True + True + Right + + + 2 + 3 + 1 + 2 + + + + + True + True + True + Down + + + 1 + 2 + 2 + 3 + + + + + True + True + True + Left + + + 1 + 2 + + + + + True + True + True + Up + + + 1 + 2 + + + + + + + + + True + <b>D-Pad</b> + True + + + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + True + Select + + + + + True + True + True + Start + + + 1 + + + + + + + + + True + <b>Essentials</b> + True + + + + + 1 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + True + B + + + + + True + True + True + A + + + 1 + + + + + + + + + True + <b>Alpha and Beta</b> + True + + + + + 2 + + + + + + + GDK_WINDOW_TYPE_HINT_NORMAL + (C) Copyright 2006 + A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator + http://dietschnitzel.com/gfceu/ + This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + Lukas Sabota +<ltsmooth42@gmail.comt> + +Patch writers: +Scott Brown + translator-credits + Sketching: + J. Sammer +Digital Manipulation: + C. Kontros + +Artwork for old versions (< 0.2.7): + Jimmy Angelakos + <vyruss000@gmail.com> + gfceu_big.png + + + True + + + + + + True + + + False + GTK_PACK_END + + + + + True GFCE Ultra @@ -153,16 +399,28 @@ 5 5 - + True True - Gamepad _3 + Gamepad _1 True - 1 - 2 + + + + + + True + True + Gamepad _2 + True + + + + 1 + 2 @@ -183,28 +441,16 @@ - + True True - Gamepad _2 - True - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True + 1 + 2 @@ -354,7 +600,13 @@ - + + True + True + + + 1 + @@ -620,28 +872,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - adjustment3 - 1 - - - 1 - 2 + GTK_FILL @@ -659,13 +896,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - 0 - Port: + True + adjustment3 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -715,54 +967,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True - adjustment4 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -782,13 +993,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + adjustment4 + 1 1 2 + 1 + 2 @@ -900,250 +1152,4 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - GDK_WINDOW_TYPE_HINT_NORMAL - (C) Copyright 2006 - A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator - http://dietschnitzel.com/gfceu/ - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Lukas Sabota -<ltsmooth42@gmail.comt> - -Patch writers: -Scott Brown - translator-credits - Sketching: - J. Sammer -Digital Manipulation: - C. Kontros - -Artwork for old versions (< 0.2.7): - Jimmy Angelakos - <vyruss000@gmail.com> - gfceu_big.png - - - True - - - - - - True - - - False - GTK_PACK_END - - - - - - - - - True - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - 3 - 3 - - - - - - - - - - - - - - - - - - True - True - True - Up - - - 1 - 2 - - - - - True - True - True - Left - - - 1 - 2 - - - - - True - True - True - Down - - - 1 - 2 - 2 - 3 - - - - - True - True - True - Right - - - 2 - 3 - 1 - 2 - - - - - - - - - True - <b>D-Pad</b> - True - - - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - - - True - True - True - Select - - - - - True - True - True - Start - - - 1 - - - - - - - - - True - <b>Essentials</b> - True - - - - - 1 - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - - - True - True - True - B - - - - - True - True - True - A - - - 1 - - - - - - - - - True - <b>Alpha and Beta</b> - True - - - - - 2 - - - - - From ac2abd91f101930ea8da1b2d19d3c97e07a9b5ea Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sat, 28 Jun 2008 01:56:25 +0000 Subject: [PATCH 27/94] code cleanup --- gfceu | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gfceu b/gfceu index d53d179a..89213a72 100644 --- a/gfceu +++ b/gfceu @@ -457,12 +457,6 @@ class GfceuApp: x = chooser.get_filename() widgets.get_object("rom_entry").set_text(x) options.romfile = x - options.network_rom = False - elif chooser.get_uri(): - x = chooser.get_uri() - widgets.get_object("rom_entry").set_text(x) - options.romfile = x - options.network_rom = True def gamepad_clicked(self, widget, data=None): From 2db6590fbd1058e6cd7db3a0968e48b165e380a6 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sat, 28 Jun 2008 19:13:37 +0000 Subject: [PATCH 28/94] added a new module that creates a sdl window and gets a key from the user this can be used so that hotkeys and input can be controlled from the GUI directly this module however adds an additional depenency to the program: pygame i might just rewrite this in c so gfceu doesn't have another dependency --- get_key.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 get_key.py diff --git a/get_key.py b/get_key.py new file mode 100755 index 00000000..268964bb --- /dev/null +++ b/get_key.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +import pygame +import sys +from pygame.locals import * + +pygame.init() +width = 300 +height = 100 +screen = pygame.display.set_mode((width, height)) +pygame.display.set_caption("Press any key. . .") + +while 1: + for event in pygame.event.get(): + if event.type == KEYDOWN: + print event.key + sys.exit(event.key) + From 508734aee6b18ab27ac621734cac8627309f3234 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sat, 28 Jun 2008 19:19:06 +0000 Subject: [PATCH 29/94] Modularized the sdl KeyGrabber --- get_key.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/get_key.py b/get_key.py index 268964bb..efbbb593 100755 --- a/get_key.py +++ b/get_key.py @@ -3,15 +3,23 @@ import pygame import sys from pygame.locals import * -pygame.init() -width = 300 -height = 100 -screen = pygame.display.set_mode((width, height)) -pygame.display.set_caption("Press any key. . .") -while 1: - for event in pygame.event.get(): - if event.type == KEYDOWN: - print event.key - sys.exit(event.key) +class KeyGrabber: + """ KeyGrabber is a wrapper that gets an SDL key from the user using pygame """ + def __init__(self, width=300, height=100): + pygame.init() + screen = pygame.display.set_mode((width, height)) + pygame.display.set_caption("Press any key. . .") + + def get_key(self): + while 1: + for event in pygame.event.get(): + if event.type == KEYDOWN: + #print event.key + pygame.display.quit() + return event.key + +if __name__ == "__main__": + kg = KeyGrabber() + print kg.get_key() From e560984671c8f3af1b98a98168cf5ff54902f880 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 29 Jun 2008 01:12:28 +0000 Subject: [PATCH 30/94] code cleanup fixed some stupid bugs with the saving of options --- gfceu | 40 ++++++++++------------------------------ gfceu.xml | 2 -- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/gfceu b/gfceu index 89213a72..b1ba0ab9 100644 --- a/gfceu +++ b/gfceu @@ -82,7 +82,7 @@ def load_options(): ifile.close() def save_options(): - global options, optionsfile, appconfigdir + global options, optionsfile ofile = file(optionsfile, 'w') pickle.dump(options, ofile) ofile.close() @@ -194,15 +194,13 @@ def find_binary(file): # # # # # # # # # # # # # # # # # # Globals options = None -appconfigdir = os.getenv('HOME') + '/.'+ title -optionsfile = appconfigdir + 'gfceu_options.dat' +optionsfile = os.getenv('HOME') + '/gfceu_options.dat' widgets = None class GfceuApp: def __init__(self): self.fceux_binary = self.find_fceu() self.load_ui() - self.setup_environment() options = game_options() load_options() @@ -242,24 +240,7 @@ class GfceuApp: msgbox.destroy() if fatal: sys.exit(code) - - def setup_environment (self): - """ - Configures the environment if this is the first time the application - has been run. For instance, it checks for the options file and creates - it if it doesn't exist. It also converts between the old version and - the new version of this application, which stores the options file in - a separate directory. - """ - - global appconfigdir, optionsfile - - if not os.path.exists(appconfigdir): - # this is the first time the application is run. - # create the directory - self.msg("Creating application settings directory") - os.mkdir(appconfigdir) - + def find_fceu(self): bin = find_binary('fceux') if bin == None: @@ -287,13 +268,13 @@ class GfceuApp: print 'Try reinstalling the application.' sys.exit(1) - try: - print "Using: " + glade_file - widgets = gtk.Builder() - widgets.add_from_file(glade_file) - widgets.connect_signals(self) - except: - self.print_error("Couldn't load the UI data.", 24) + #try: + print "Using: " + glade_file + widgets = gtk.Builder() + widgets.add_from_file(glade_file) + widgets.connect_signals(self) + #except: + # self.print_error("Couldn't load the UI data.", 24) widgets.get_object("main_window").show_all() @@ -517,7 +498,6 @@ class GfceuApp: options.no_network_radio = True def end(self, menuitem, data=None): - global options, optionsfile set_options() save_options() gtk.main_quit() diff --git a/gfceu.xml b/gfceu.xml index 13e40e52..671b14b8 100644 --- a/gfceu.xml +++ b/gfceu.xml @@ -1,4 +1,3 @@ - 10 @@ -32,7 +31,6 @@ 10 4046 - From 2ebe9a8a46f40606ea8dbc257d875ac4095a3b5b Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 29 Jun 2008 01:13:50 +0000 Subject: [PATCH 31/94] oops --- gfceu | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gfceu b/gfceu index b1ba0ab9..8ab336d0 100644 --- a/gfceu +++ b/gfceu @@ -268,13 +268,13 @@ class GfceuApp: print 'Try reinstalling the application.' sys.exit(1) - #try: - print "Using: " + glade_file - widgets = gtk.Builder() - widgets.add_from_file(glade_file) - widgets.connect_signals(self) - #except: - # self.print_error("Couldn't load the UI data.", 24) + try: + print "Using: " + glade_file + widgets = gtk.Builder() + widgets.add_from_file(glade_file) + widgets.connect_signals(self) + except: + self.print_error("Couldn't load the UI data.", 24) widgets.get_object("main_window").show_all() From ebadaa21a7b1c528bbd8886ed952ae5f49ff5b38 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 2 Jul 2008 05:58:29 +0000 Subject: [PATCH 32/94] gfceu now supports autoscaling --- gfceu | 21 +++-- gfceu.glade | 243 ++++++++++++++++++++++++++++------------------------ gfceu.xml | 223 +++++++++++++++++++++++++---------------------- 3 files changed, 262 insertions(+), 225 deletions(-) diff --git a/gfceu b/gfceu index 8ab336d0..abfc1b54 100644 --- a/gfceu +++ b/gfceu @@ -44,7 +44,7 @@ except ImportError: -class game_options: +class GameOptions: # sound sound_check = True soundq_check = True @@ -59,6 +59,7 @@ class game_options: extra_entry = '' romfile = '' opengl_check = False + autoscale_check = True # network join_radio = False @@ -107,6 +108,7 @@ def give_widgets(): # video widgets.get_object("fullscreen_check").set_active(options.fullscreen_check) widgets.get_object("opengl_check").set_active(options.opengl_check) + widgets.get_object("autoscale_check").set_active(options.autoscale_check) widgets.get_object("xscale_spin").set_value(options.xscale_spin) widgets.get_object("yscale_spin").set_value(options.yscale_spin) @@ -126,10 +128,8 @@ def give_widgets(): except AttributeError: # When new widgets are added, old pickle files might break. - options = game_options() - give_widgets() - except RuntimeError: - print "shit" + options = GameOptions() + give_widgets() def set_options(): """ @@ -149,6 +149,8 @@ def set_options(): # video options.fullscreen_check = widgets.get_object("fullscreen_check").get_active() options.opengl_check = widgets.get_object("opengl_check").get_active() + options.autoscale_check = widgets.get_object("autoscale_check").get_active() + options.xscale_spin = widgets.get_object("xscale_spin").get_value() options.yscale_spin = widgets.get_object("yscale_spin").get_value() @@ -194,7 +196,7 @@ def find_binary(file): # # # # # # # # # # # # # # # # # # Globals options = None -optionsfile = os.getenv('HOME') + '/gfceu_options.dat' +optionsfile = os.getenv('HOME') + '/.gfceu_options.dat' widgets = None class GfceuApp: @@ -202,7 +204,7 @@ class GfceuApp: self.fceux_binary = self.find_fceu() self.load_ui() - options = game_options() + options = GameOptions() load_options() give_widgets() try: @@ -311,6 +313,11 @@ class GfceuApp: video_options += '--opengl 1 ' else: video_options += '--opengl 0 ' + + if options.autoscale_check: + video_options += '--autoscale 1 ' + else: + video_options += '--autoscale 0 ' video_options += ' --xscale ' + str(options.xscale_spin) video_options += ' --yscale ' + str(options.yscale_spin) diff --git a/gfceu.glade b/gfceu.glade index c3478d33..d2a3582a 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -1,6 +1,7 @@ - + + + - @@ -35,16 +36,27 @@ - + True True True - Right + Up + 0 + + + 1 + 2 + + + + + True + True + True + Left 0 - 2 - 3 1 2 @@ -65,31 +77,20 @@ - + True True True - Left + Right 0 + 2 + 3 1 2 - - - True - True - True - Up - 0 - - - 1 - 2 - - @@ -337,8 +338,8 @@ Artwork for old versions (< 0.2.7): Main - False tab + False @@ -386,30 +387,17 @@ Artwork for old versions (< 0.2.7): 5 5 - + True True - Gamepad _1 + Gamepad _3 True 0 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 + 1 + 2 @@ -431,17 +419,30 @@ Artwork for old versions (< 0.2.7): - + True True - Gamepad _3 + Gamepad _2 + True + 0 + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True 0 - 1 - 2 @@ -480,9 +481,9 @@ Artwork for old versions (< 0.2.7): Input + tab 1 False - tab @@ -519,6 +520,20 @@ Artwork for old versions (< 0.2.7): 1 + + + True + True + _Autoscale Fullscreen + True + 0 + True + + + False + 2 + + True @@ -548,7 +563,7 @@ Artwork for old versions (< 0.2.7): False - 2 + 3 @@ -581,7 +596,7 @@ Artwork for old versions (< 0.2.7): False - 3 + 4 @@ -609,7 +624,7 @@ Artwork for old versions (< 0.2.7): False - 4 + 5 @@ -622,7 +637,7 @@ Artwork for old versions (< 0.2.7): False False - 5 + 6 @@ -636,9 +651,9 @@ Artwork for old versions (< 0.2.7): Video + tab 2 False - tab @@ -722,9 +737,9 @@ Invalid options may cause GFCE Ultra to perform incorrectly. Advanced + tab 3 False - tab @@ -839,9 +854,9 @@ Invalid options may cause GFCE Ultra to perform incorrectly. Sound + tab 4 False - tab @@ -882,26 +897,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -919,15 +923,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -978,13 +993,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -1004,54 +1060,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 @@ -1096,9 +1111,9 @@ Invalid options may cause GFCE Ultra to perform incorrectly. Network + tab 5 False - tab diff --git a/gfceu.xml b/gfceu.xml index 671b14b8..496f7fbe 100644 --- a/gfceu.xml +++ b/gfceu.xml @@ -1,3 +1,5 @@ + + 10 @@ -65,15 +67,25 @@ - + True True True - Right + Up + + + 1 + 2 + + + + + True + True + True + Left - 2 - 3 1 2 @@ -93,29 +105,19 @@ - + True True True - Left + Right + 2 + 3 1 2 - - - True - True - True - Up - - - 1 - 2 - - @@ -397,28 +399,16 @@ Artwork for old versions (< 0.2.7): 5 5 - + True True - Gamepad _1 + Gamepad _3 True - - - - - - True - True - Gamepad _2 - True - - - - 1 - 2 + 1 + 2 @@ -439,16 +429,28 @@ Artwork for old versions (< 0.2.7): - + True True - Gamepad _3 + Gamepad _2 + True + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True - 1 - 2 @@ -519,6 +521,19 @@ Artwork for old versions (< 0.2.7): 1 + + + True + True + _Autoscale Fullscreen + True + True + + + False + 2 + + True @@ -548,7 +563,7 @@ Artwork for old versions (< 0.2.7): False - 2 + 3 @@ -581,7 +596,7 @@ Artwork for old versions (< 0.2.7): False - 3 + 4 @@ -609,7 +624,7 @@ Artwork for old versions (< 0.2.7): False - 4 + 5 @@ -622,7 +637,7 @@ Artwork for old versions (< 0.2.7): False False - 5 + 6 @@ -870,26 +885,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -907,15 +911,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -965,13 +980,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True + adjustment4 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -991,54 +1047,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - adjustment4 - 1 1 2 - 1 - 2 From ee1e742261d543cd8d1a6f83d774d9e8972e944e Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 2 Jul 2008 17:30:06 +0000 Subject: [PATCH 33/94] gfceu now looks in the script directory for fceux this will make it easy to pump out (g)fceux sdl builds for testing --- ChangeLog | 2 ++ gfceu | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 877407c4..de742509 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ +* Supports autoscale * No longer requires GnomeVFS * Major code cleanup +* Supports fceux command line options (different syntax from fceu) * Now requires pygtk >= 2.12 * Transitioned from gtk.glade to gtk.Builder. * Changed some strings to reflect new email and website diff --git a/gfceu b/gfceu index abfc1b54..accaaf03 100644 --- a/gfceu +++ b/gfceu @@ -166,12 +166,12 @@ def set_options(): options.host_pass = widgets.get_object("host_pass").get_text() - - - - def find_binary(file): + # first check the script directory + if os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]),file)): + return os.path.join(os.path.dirname(sys.argv[0]), file) + # if not in the script directory, check the $PATH path = os.getenv('PATH') directories= [] directory = '' @@ -187,8 +187,7 @@ def find_binary(file): if os.path.isfile(os.path.join(x, file)): return os.path.join(x,file) - if os.path.isfile(os.path.join(os.curdir,file)): - return os.path.join(os.curdir, file) + return None From 6785d6708ab36dc3373a69a5417436c3c070e6b3 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 16 Jul 2008 05:58:39 +0000 Subject: [PATCH 34/94] Wrote the get key program. This program creates an SDL window and waits for user input. It then will print the button type, device number, and button number. Some of the code was derived straight from the fceu codebase to ensure full compatibility. I want gfceux to be able to directly modify the button configuration. With fceux new config file system, gfceux will be able to rewrite values based on user input. This would be a much friendlier option than the whole "titlebar" input sytem. I wrote this in C, because I didn't want another bullshit dependency to get gfceux to run right (pygame sdl bindings) --- get_key/build.sh | 2 ++ get_key/main.cpp | 88 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100755 get_key/build.sh create mode 100644 get_key/main.cpp diff --git a/get_key/build.sh b/get_key/build.sh new file mode 100755 index 00000000..2c4f69db --- /dev/null +++ b/get_key/build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +g++ `sdl-config --cflags --libs` main.cpp diff --git a/get_key/main.cpp b/get_key/main.cpp new file mode 100644 index 00000000..05e6386d --- /dev/null +++ b/get_key/main.cpp @@ -0,0 +1,88 @@ +#include +#include + +const int WIDTH = 640; +const int HEIGHT = 480; +const int BPP = 4; +const int DEPTH = 32; + + +using namespace std; + +int main(int argc, char* argv[]) +{ + SDL_WM_SetCaption("Press any key. . .", NULL); + SDL_Surface *screen; + SDL_Event event; + + // open any joysticks + for(int i = 0; i < SDL_NumJoysticks(); i++) + SDL_JoystickOpen(i); + + if (!(screen = SDL_SetVideoMode(WIDTH, HEIGHT, DEPTH, SDL_SWSURFACE))) + { + SDL_Quit(); + return 1; + } + + while(1) + { + while(SDL_PollEvent(&event)) + { + switch (event.type) + { + case SDL_QUIT: + return 0; + case SDL_KEYDOWN: + cout << "BUTTC_KEYBOARD" << endl; + cout << 0 << endl; + cout << event.key.keysym.sym << endl; + return 1; + case SDL_JOYBUTTONDOWN: + cout << "BUTTC_JOYSTICK" << endl; + cout << event.jbutton.which << endl; + cout << event.jbutton.button << endl; + return 1; + case SDL_JOYHATMOTION: + if(event.jhat.value != SDL_HAT_CENTERED) { + cout << "BUTTC_JOYSTICK" << endl; + cout << event.jhat.which << endl; + cout << (0x2000 | ((event.jhat.hat & 0x1F) << 8) | + event.jhat.value) << endl; + return 1; + } + break; +/* case SDL_JOYAXISMOTION: + if(LastAx[event.jaxis.which][event.jaxis.axis] == 0x100000) { + if(abs(event.jaxis.value) < 1000) { + LastAx[event.jaxis.which][event.jaxis.axis] = event.jaxis.value; + } + } else { + if(abs(LastAx[event.jaxis.which][event.jaxis.axis] - event.jaxis.value) >= 8192) { + bc->ButtType[wb] = BUTTC_JOYSTICK; + bc->DeviceNum[wb] = event.jaxis.which; + bc->ButtonNum[wb] = (0x8000 | event.jaxis.axis | + ((event.jaxis.value < 0) + ? 0x4000 : 0)); + return(1); + } + } + break; + case SDL_KEYDOWN: + keypress = 1; + cout << (int)event.key.keysym.sym; + break; + case SDL_JOYAXISMOTION: + if ( (event.jaxis.value < -3200 ) | | (event.jaxis.value > 3200) ) + { + if (event.jaxis == 0) + { +*/ + + + } + } + } + return 0; +} + From 1bfa59edd65fd1bc9be15c6c0ae0ea1ae43e606f Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 16 Jul 2008 06:06:04 +0000 Subject: [PATCH 35/94] code cleanup and build script update --- get_key/build.sh | 2 +- get_key/main.cpp | 56 ++++++++++++++++++------------------------------ 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/get_key/build.sh b/get_key/build.sh index 2c4f69db..10fefdb5 100755 --- a/get_key/build.sh +++ b/get_key/build.sh @@ -1,2 +1,2 @@ #!/bin/sh -g++ `sdl-config --cflags --libs` main.cpp +g++ `sdl-config --cflags --libs` main.cpp -o get_fceu_key; diff --git a/get_key/main.cpp b/get_key/main.cpp index 05e6386d..c9a77845 100644 --- a/get_key/main.cpp +++ b/get_key/main.cpp @@ -1,17 +1,29 @@ +// main.cpp +// get_fceu_key +// this program opens an SDL window and gets an input event from the user. +// it than prints the values that are needed in the fceux config +// this was written to be used with gfceux, the GTK frontend for gfceu + +// Lukas Sabota +// Licensed under the GPL v2 +// July 16, 2008 + #include #include -const int WIDTH = 640; -const int HEIGHT = 480; +const int WIDTH = 300; +const int HEIGHT = 300; const int BPP = 4; const int DEPTH = 32; - using namespace std; int main(int argc, char* argv[]) { - SDL_WM_SetCaption("Press any key. . .", NULL); + // the caption doesn't set on intrepid + // TODO: test on ubuntu 8.04 + SDL_WM_SetCaption("Press any key. . .", 0); + SDL_Surface *screen; SDL_Event event; @@ -33,6 +45,8 @@ int main(int argc, char* argv[]) { case SDL_QUIT: return 0; + // this code was modified from drivers/sdl/input.cpp in fceu so + // that the same values will be written in the config as fceux --inputcfg case SDL_KEYDOWN: cout << "BUTTC_KEYBOARD" << endl; cout << 0 << endl; @@ -52,37 +66,9 @@ int main(int argc, char* argv[]) return 1; } break; -/* case SDL_JOYAXISMOTION: - if(LastAx[event.jaxis.which][event.jaxis.axis] == 0x100000) { - if(abs(event.jaxis.value) < 1000) { - LastAx[event.jaxis.which][event.jaxis.axis] = event.jaxis.value; - } - } else { - if(abs(LastAx[event.jaxis.which][event.jaxis.axis] - event.jaxis.value) >= 8192) { - bc->ButtType[wb] = BUTTC_JOYSTICK; - bc->DeviceNum[wb] = event.jaxis.which; - bc->ButtonNum[wb] = (0x8000 | event.jaxis.axis | - ((event.jaxis.value < 0) - ? 0x4000 : 0)); - return(1); - } - } - break; - case SDL_KEYDOWN: - keypress = 1; - cout << (int)event.key.keysym.sym; - break; - case SDL_JOYAXISMOTION: - if ( (event.jaxis.value < -3200 ) | | (event.jaxis.value > 3200) ) - { - if (event.jaxis == 0) - { -*/ - - - } - } - } + } + } + } return 0; } From eb54d81e5e74dc5bdb0eff04e7d281f5a6a7bd54 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 16 Jul 2008 06:47:42 +0000 Subject: [PATCH 36/94] started work on the python config parser --- config_parse.py | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 config_parse.py diff --git a/config_parse.py b/config_parse.py new file mode 100755 index 00000000..74f3a52d --- /dev/null +++ b/config_parse.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python + +#TODO: fix writing + +import re +import os + +class ConfigParser: + def __init__(self, filename): + try: + f = open(filename, "rw"); + except: + print "Can't open config." + + self.f = f + + def readKey(self, keyname): + self.f.seek(0) + # do some lines + while 1: + line = self.f.readline() + if line == 0: + break + if re.search(keyname, line): + return line + + # key not found + return 0 + + def writeKey(self, keyname, value): + self.f.seek(0) + + cursor = 0 + # find the key + while 1: + line = self.f.readline() + if line == 0: + return 0 + if re.search(keyname, line): + cursor = self.f.tell() + break + + self.f.seek(cursor) + while 1: + c = self.f.read(1) +# self.f.seek(5, 1) + print c, + + if c == '=': + self.f.seek(1, os.SEEK_CUR) + #self.f.write(value) + self.f.flush() + + + +cp = ConfigParser("/home/lukas/.fceultra/fceu.cfg") +cp.writeKey("Fullscreen", 1) +#print cp.readKey("Fullscreen") + + + + + From 5db27f23fd55a8c7a3c303caced9922c79772cfc Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Thu, 17 Jul 2008 04:39:28 +0000 Subject: [PATCH 37/94] code cleanup --- get_key/main.cpp | 67 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/get_key/main.cpp b/get_key/main.cpp index c9a77845..bb52f03b 100644 --- a/get_key/main.cpp +++ b/get_key/main.cpp @@ -22,53 +22,54 @@ int main(int argc, char* argv[]) { // the caption doesn't set on intrepid // TODO: test on ubuntu 8.04 - SDL_WM_SetCaption("Press any key. . .", 0); + SDL_WM_SetCaption("Press any key. . .", 0); - SDL_Surface *screen; - SDL_Event event; + SDL_Surface *screen; + SDL_Event event; - // open any joysticks - for(int i = 0; i < SDL_NumJoysticks(); i++) - SDL_JoystickOpen(i); + // open any joysticks + for(int i = 0; i < SDL_NumJoysticks(); i++) + SDL_JoystickOpen(i); - if (!(screen = SDL_SetVideoMode(WIDTH, HEIGHT, DEPTH, SDL_SWSURFACE))) + if (!(screen = SDL_SetVideoMode(WIDTH, HEIGHT, DEPTH, SDL_SWSURFACE))) { SDL_Quit(); return 1; } - while(1) - { - while(SDL_PollEvent(&event)) - { - switch (event.type) - { - case SDL_QUIT: - return 0; + while(1) + { + while(SDL_PollEvent(&event)) + { + switch (event.type) + { + case SDL_QUIT: + return 0; // this code was modified from drivers/sdl/input.cpp in fceu so // that the same values will be written in the config as fceux --inputcfg - case SDL_KEYDOWN: - cout << "BUTTC_KEYBOARD" << endl; - cout << 0 << endl; - cout << event.key.keysym.sym << endl; - return 1; - case SDL_JOYBUTTONDOWN: + case SDL_KEYDOWN: + cout << "BUTTC_KEYBOARD" << endl; + cout << 0 << endl; + cout << event.key.keysym.sym << endl; + return 1; + case SDL_JOYBUTTONDOWN: + cout << "BUTTC_JOYSTICK" << endl; + cout << event.jbutton.which << endl; + cout << event.jbutton.button << endl; + return 1; + case SDL_JOYHATMOTION: + if(event.jhat.value != SDL_HAT_CENTERED) + { cout << "BUTTC_JOYSTICK" << endl; - cout << event.jbutton.which << endl; - cout << event.jbutton.button << endl; + cout << event.jhat.which << endl; + cout << (0x2000 | ((event.jhat.hat & 0x1F) << 8) | + event.jhat.value) << endl; return 1; - case SDL_JOYHATMOTION: - if(event.jhat.value != SDL_HAT_CENTERED) { - cout << "BUTTC_JOYSTICK" << endl; - cout << event.jhat.which << endl; - cout << (0x2000 | ((event.jhat.hat & 0x1F) << 8) | - event.jhat.value) << endl; - return 1; - } + } break; - } } - } + } + } return 0; } From 3be144b23074e1dd113dcead2890e49ec437fe25 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 23 Jul 2008 02:12:11 +0000 Subject: [PATCH 38/94] made default bpp in gfceux to be 32 --- gfceu.glade | 215 ++++++++++++++++++++++++++-------------------------- gfceu.xml | 211 ++++++++++++++++++++++++++------------------------- 2 files changed, 214 insertions(+), 212 deletions(-) diff --git a/gfceu.glade b/gfceu.glade index d2a3582a..b1c7ee9c 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -1,6 +1,6 @@ - + @@ -36,27 +36,16 @@ - + True True True - Up - 0 - - - 1 - 2 - - - - - True - True - True - Left + Right 0 + 2 + 3 1 2 @@ -77,20 +66,31 @@ - + True True True - Right + Left 0 - 2 - 3 1 2 + + + True + True + True + Up + 0 + + + 1 + 2 + + @@ -387,17 +387,30 @@ Artwork for old versions (< 0.2.7): 5 5 - + True True - Gamepad _3 + Gamepad _1 True 0 - 1 - 2 + + + + + + True + True + Gamepad _2 + True + 0 + + + + 1 + 2 @@ -419,30 +432,17 @@ Artwork for old versions (< 0.2.7): - + True True - Gamepad _2 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True 0 + 1 + 2 @@ -616,6 +616,7 @@ Artwork for old versions (< 0.2.7): True True + 32 1 @@ -897,28 +898,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - 4046 1 65536 1 10 10 - 1 - - - 1 - 2 + GTK_FILL @@ -936,13 +922,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - 0 - Port: + True + 4046 1 65536 1 10 10 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -993,54 +994,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -1060,13 +1020,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 diff --git a/gfceu.xml b/gfceu.xml index 496f7fbe..7e7f22bb 100644 --- a/gfceu.xml +++ b/gfceu.xml @@ -1,5 +1,5 @@ - + 10 @@ -67,25 +67,15 @@ - + True True True - Up - - - 1 - 2 - - - - - True - True - True - Left + Right + 2 + 3 1 2 @@ -105,19 +95,29 @@ - + True True True - Right + Left - 2 - 3 1 2 + + + True + True + True + Up + + + 1 + 2 + + @@ -399,16 +399,28 @@ Artwork for old versions (< 0.2.7): 5 5 - + True True - Gamepad _3 + Gamepad _1 True - 1 - 2 + + + + + + True + True + Gamepad _2 + True + + + + 1 + 2 @@ -429,28 +441,16 @@ Artwork for old versions (< 0.2.7): - + True True - Gamepad _2 - True - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True + 1 + 2 @@ -616,6 +616,7 @@ Artwork for old versions (< 0.2.7): True True + 32 1 @@ -885,28 +886,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - adjustment3 - 1 - - - 1 - 2 + GTK_FILL @@ -924,13 +910,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - 0 - Port: + True + adjustment3 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -980,54 +981,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True - adjustment4 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -1047,13 +1007,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + adjustment4 + 1 1 2 + 1 + 2 From 1d063028cfa89038d3f398835f6155931ae247f0 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 3 Aug 2008 00:40:46 +0000 Subject: [PATCH 39/94] Added support for lua scripts and movie playback from the linux GUI --- ChangeLog | 3 + INSTALL | 4 +- gfceu | 108 +++++++++++++++++-- gfceu.glade | 298 ++++++++++++++++++++++++++++++++++------------------ gfceu.xml | 292 ++++++++++++++++++++++++++++++++------------------ setup.py | 2 +- 6 files changed, 492 insertions(+), 215 deletions(-) diff --git a/ChangeLog b/ChangeLog index de742509..30ce55f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +================== version 2.0.0 ================================ +* Supports movie playback +* Support lua script loading * Supports autoscale * No longer requires GnomeVFS * Major code cleanup diff --git a/INSTALL b/INSTALL index 86a50427..5fbbcb52 100644 --- a/INSTALL +++ b/INSTALL @@ -7,5 +7,7 @@ You can change the prefix to whatever you like. Requirements: Python (tested with 2.5); (Ubuntu package name: python) PyGTK, and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) -FCE UltraX - You're going to need the latest fceux for gfceu .7 to work +FceuX 2.0 + +NOTE: fceu 1.x is no longer supported in the gfceu 2.x series. if you still want/need a front-end for gfceu use gfceu .7 diff --git a/gfceu b/gfceu index accaaf03..11d6b49d 100644 --- a/gfceu +++ b/gfceu @@ -1,7 +1,7 @@ #!/usr/bin/python # gfceu - Graphical launcher for FCE Ultra. # Designed on Ubuntu, with platfrom independence in mind. -version = "0.7svn" +version = "2.0.0" title = "gfceu" # Copyright (C) 2006 Lukas Sabota ## @@ -56,11 +56,17 @@ class GameOptions: xscale_spin = 2 yscale_spin = 2 bpp_combo = 32 - extra_entry = '' - romfile = '' + opengl_check = False autoscale_check = True + # main + extra_entry = '' + romfile = '' + moviefile = '' + luafile = '' + + # network join_radio = False join_add = '' @@ -98,6 +104,8 @@ def give_widgets(): global options, widgets try: widgets.get_object("rom_entry").set_text(options.romfile) + widgets.get_object("movie_entry").set_text(options.moviefile) + widgets.get_object("lua_entry").set_text(options.luafile) # sound widgets.get_object("sound_check").set_active(options.sound_check) @@ -139,6 +147,8 @@ def set_options(): and stores it in the options object. """ options.romfile = widgets.get_object("rom_entry").get_text() + options.moviefile = widgets.get_object("movie_entry").get_text() + options.luafile = widgets.get_object("lua_entry").get_text() # sound options.sound_check = widgets.get_object("sound_check").get_active() @@ -321,7 +331,14 @@ class GfceuApp: video_options += ' --xscale ' + str(options.xscale_spin) video_options += ' --yscale ' + str(options.yscale_spin) video_options += ' ' - + + # lua/movie + other_options = '' + if options.luafile: + other_options += '--loadlua ' + options.luafile + ' ' + if options.moviefile: + other_options += '--playmov ' + options.moviefile + ' ' + # Netplay is fucked right now @@ -352,7 +369,7 @@ class GfceuApp: command = self.fceux_binary + ' ' + sound_options + video_options +\ - network + options.extra_entry + ' '+ rom_name + network + other_options + options.extra_entry + ' '+ rom_name self.msg('Command: ' + command) # more code to disable because netplay is fucked @@ -403,8 +420,80 @@ class GfceuApp: widgets.get_object("about_dialog").set_name('GNOME FCE Ultra '+version) widgets.get_object("about_dialog").run() widgets.get_object("about_dialog").hide() - - def browse_button_clicked(self, menuitem, data=None): + + def lua_browse_button_clicked(self, menuitem, data=None): + global options + set_options() + chooser = gtk.FileChooserDialog("Open...", None, + gtk.FILE_CHOOSER_ACTION_OPEN, + (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, + gtk.STOCK_OPEN, gtk.RESPONSE_OK)) + chooser.set_property("local-only", False) + chooser.set_default_response(gtk.RESPONSE_OK) + + filter=gtk.FileFilter() + filter.set_name("Lua scripts") + filter.add_pattern("*.lua") + chooser.add_filter(filter) + + filter = gtk.FileFilter() + filter.set_name("All files") + filter.add_pattern("*") + chooser.add_filter(filter) + + if options.luafile == '': + folder = os.getenv('HOME') + else: + folder = os.path.split(options.luafile)[0] + + chooser.set_current_folder (folder) + + response = chooser.run() + chooser.hide() + + if response == gtk.RESPONSE_OK: + if chooser.get_filename(): + x = chooser.get_filename() + widgets.get_object("lua_entry").set_text(x) + options.luafile = x + + def movie_browse_button_clicked(self, menuitem, data=None): + global options + set_options() + chooser = gtk.FileChooserDialog("Open...", None, + gtk.FILE_CHOOSER_ACTION_OPEN, + (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, + gtk.STOCK_OPEN, gtk.RESPONSE_OK)) + chooser.set_property("local-only", False) + chooser.set_default_response(gtk.RESPONSE_OK) + + filter=gtk.FileFilter() + filter.set_name("FM2 movies") + filter.add_pattern("*.fm2") + chooser.add_filter(filter) + + filter = gtk.FileFilter() + filter.set_name("All files") + filter.add_pattern("*") + chooser.add_filter(filter) + + if options.moviefile == '': + folder = os.getenv('HOME') + else: + folder = os.path.split(options.moviefile)[0] + + chooser.set_current_folder (folder) + + response = chooser.run() + chooser.hide() + + if response == gtk.RESPONSE_OK: + if chooser.get_filename(): + x = chooser.get_filename() + widgets.get_object("movie_entry").set_text(x) + options.moviefile = x + + def rom_browse_button_clicked(self, menuitem, data=None): global options set_options() chooser = gtk.FileChooserDialog("Open...", None, @@ -427,8 +516,6 @@ class GfceuApp: filter.add_pattern("*") chooser.add_filter(filter) - - if options.romfile == '': folder = os.getenv('HOME') else: @@ -443,6 +530,9 @@ class GfceuApp: if chooser.get_filename(): x = chooser.get_filename() widgets.get_object("rom_entry").set_text(x) + # reset lua and movie entries on rom change + widgets.get_object("movie_entry").set_text("") + widgets.get_object("lua_entry").set_text("") options.romfile = x def gamepad_clicked(self, widget, data=None): diff --git a/gfceu.glade b/gfceu.glade index b1c7ee9c..c7989a55 100644 --- a/gfceu.glade +++ b/gfceu.glade @@ -1,6 +1,6 @@ - + @@ -36,16 +36,27 @@ - + True True True - Right + Up + 0 + + + 1 + 2 + + + + + True + True + True + Left 0 - 2 - 3 1 2 @@ -66,31 +77,20 @@ - + True True True - Left + Right 0 + 2 + 3 1 2 - - - True - True - True - Up - 0 - - - 1 - 2 - - @@ -330,6 +330,98 @@ Artwork for old versions (< 0.2.7): False + + + True + 5 + + + True + 5 + Movie Filename: + + + False + False + + + + + True + True + + + 1 + + + + + True + True + _Browse... + True + 0 + + + + False + False + 2 + + + + + False + False + 1 + + + + + True + 5 + + + True + 5 + Lua Script: + + + False + False + + + + + True + True + + + 1 + + + + + True + True + _Browse... + True + 0 + + + + False + False + 2 + + + + + False + False + 2 + + @@ -387,30 +479,17 @@ Artwork for old versions (< 0.2.7): 5 5 - + True True - Gamepad _1 + Gamepad _3 True 0 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 + 1 + 2 @@ -432,17 +511,30 @@ Artwork for old versions (< 0.2.7): - + True True - Gamepad _3 + Gamepad _2 + True + 0 + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True 0 - 1 - 2 @@ -898,26 +990,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -935,15 +1016,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -994,13 +1086,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -1020,54 +1153,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 diff --git a/gfceu.xml b/gfceu.xml index 7e7f22bb..0a849508 100644 --- a/gfceu.xml +++ b/gfceu.xml @@ -1,5 +1,5 @@ - + 10 @@ -67,15 +67,25 @@ - + True True True - Right + Up + + + 1 + 2 + + + + + True + True + True + Left - 2 - 3 1 2 @@ -95,29 +105,19 @@ - + True True True - Left + Right + 2 + 3 1 2 - - - True - True - True - Up - - - 1 - 2 - - @@ -343,6 +343,96 @@ Artwork for old versions (< 0.2.7): False + + + True + 5 + + + True + 5 + Movie Filename: + + + False + False + + + + + True + True + + + 1 + + + + + True + True + _Browse... + True + + + + False + False + 2 + + + + + False + False + 1 + + + + + True + 5 + + + True + 5 + Lua Script: + + + False + False + + + + + True + True + + + 1 + + + + + True + True + _Browse... + True + + + + False + False + 2 + + + + + False + False + 2 + + @@ -399,28 +489,16 @@ Artwork for old versions (< 0.2.7): 5 5 - + True True - Gamepad _1 + Gamepad _3 True - - - - - - True - True - Gamepad _2 - True - - - - 1 - 2 + 1 + 2 @@ -441,16 +519,28 @@ Artwork for old versions (< 0.2.7): - + True True - Gamepad _3 + Gamepad _2 + True + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True - 1 - 2 @@ -886,26 +976,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -923,15 +1002,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -981,13 +1071,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True + adjustment4 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -1007,54 +1138,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - adjustment4 - 1 1 2 - 1 - 2 diff --git a/setup.py b/setup.py index 19cd503e..2ce7d910 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python from distutils.core import setup setup(name="gfceu", - version="0.7svn", + version="2.0.0", scripts = ['gfceu'], data_files=[('share/gfceu/',['gfceu.xml', 'gfceu_big.png', 'gfceu.png']), ('share/pixmaps/', ['gfceu.png']), From 12450a8819dab1125718d254bbc63f79ba3a6174 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 3 Aug 2008 00:50:40 +0000 Subject: [PATCH 40/94] Prepare gfceux for release --- INSTALL | 2 +- generate_ui.sh | 2 +- gfceu.1 | 19 ------------------- gfceu_big_old.png | Bin 9492 -> 0 bytes gfceu_old.png | Bin 1697 -> 0 bytes gfceu => gfceux | 16 ++++++++-------- gfceu.desktop => gfceux.desktop | 6 +++--- gfceu.glade => gfceux.glade | 8 ++++---- gfceu.png => gfceux.png | Bin gfceu.xml => gfceux.xml | 8 ++++---- gfceu_big.png => gfceux_big.png | Bin setup.py | 15 +++++++-------- 12 files changed, 28 insertions(+), 48 deletions(-) delete mode 100644 gfceu.1 delete mode 100644 gfceu_big_old.png delete mode 100644 gfceu_old.png rename gfceu => gfceux (98%) rename gfceu.desktop => gfceux.desktop (73%) rename gfceu.glade => gfceux.glade (99%) rename gfceu.png => gfceux.png (100%) rename gfceu.xml => gfceux.xml (99%) rename gfceu_big.png => gfceux_big.png (100%) diff --git a/INSTALL b/INSTALL index 5fbbcb52..3507d0fd 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -You can install gfceu with setup.py: +You can install gfceux with setup.py: $ sudo ./setup.py install --prefix=/usr/local diff --git a/generate_ui.sh b/generate_ui.sh index fe4862e8..908db51c 100644 --- a/generate_ui.sh +++ b/generate_ui.sh @@ -1,3 +1,3 @@ #!/bin/sh -gtk-builder-convert gfceu.glade gfceu.xml +gtk-builder-convert gfceux.glade gfceux.xml diff --git a/gfceu.1 b/gfceu.1 deleted file mode 100644 index 74543b99..00000000 --- a/gfceu.1 +++ /dev/null @@ -1,19 +0,0 @@ -.TH gfceu 1 "July 17 2006" "Lukas Sabota" -.SH NAME -GNOME FCE Ultra - A graphical front-end for FCE Ultra -.SH SYNOPSIS -.B gfceu -.BR [options] -.PP -.SH DESCRIPTION -GFCE Ultra is a graphical front-end for FCE Ultra, an advanced Nintendo Entertainment System emulator. The program allows easy control over various options including input, network, video, and sound. It uses the GTK+2 library and optionally GNOMEVFS. -.SH OPTIONS -.TP -.B --version -Displays the version number of the application -.TP -.B --help -Displays a help message displaying options -.SH AUTHOR -.TP -Written for Ubuntu/Debian by Lukas Sabota. diff --git a/gfceu_big_old.png b/gfceu_big_old.png deleted file mode 100644 index 24ecfa2662c13ea98d75664d3163d895f5edc1f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9492 zcmV+vCF|OWP)Tux!^=-+ycGbGmQ$ z9o{@h4-K{@WZ9CCjE#jcwg?GeXD}2HAS59vQmNzvRiRQzDkPOkrSgeps1E-ymb=1T29{Zi&NQj`KfFLTMVy7#l1o;uD=KI#6C@L{ORs}8hiYoSZLd&^!UP=iS zA*!R}YYwa|AkOpc-|@j+zvtKMQMCl`T92iz5NSQNzOltuAAgGN;h3nAqzP3e#6V~Q zNwXMZjHu@Os7gvoOc6~9O$sV#N{BdOiuwGa)0qEGBv9q>@&SJ2hd#vOVxKqKQ54|p zvA5e)86wisj_~|Tr}@>7{1zLd35b9y-aABu$)q7^LcBwhPG6g1UhPf*5kv$Lm!&O2 zN---1(3C*1*XP$9US47_8nL*v_=Z$~2Wp_xx)nuC&5M}HX<}fU662JRB#0_8LRHtK zB*Y{TvtU&df*_KzsX?f`2US7}roX&91kjjGQ4HB+dFK#Uk<9Ellu`vxaC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Zngs2sAGHJ>O2AW4Xc3IsxXy-rv;vE zHyX%I68?OZYmHa4li$z^D3I$0v*PwPv)TEt6|UU~1!xPuZ_jbwyk4a7>qP-gO99y5 z3%g(>++;HpTDxF_*&yxzFBCAazsI)n+J$Uxq6yj!*B`fh(Vpfnf4wUpv;~Ti` diff --git a/gfceu_old.png b/gfceu_old.png deleted file mode 100644 index ab5144d937c337c3be13d38f94f688638ea9e532..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1697 zcmV;S244AzP)yNXjFeXu$A9NOGdnZP z%?%eag=lswA zoGX9>l7RgE`M=Bz3=Z-3xp#?tL>Prc-V^x<^@{gO6h%Z)#OL<)@{L2^7XHtX06Kwn zK)Vyidl&mT{M-vTafD%nb3))8BH(>Q-Fwt~wr|_atr!Vl4e(juP6X6@qA0@S0Z@g& z!Rp((&?tgrg6V4`ByqO{fCI7yVk5)=u!&_Ns488B0zd5C!($V}Joc#`))m?bR6mM6 zX?kt|5FoGzwTTX(pdLX9P~590$@gC(dF&WNE}$w)8gaJ8ZlKNf&H~$jKLDe^EbzE% z`Qwe(iYlRks^V3c>D^0l%O-03_k)1Sq9N@9x`CI06To+XmB2pWS>S87CIuW!EPMo^ z4Nskze5G=k=SHs++`SWhzn@I0Oxn*mtpn}{?gQR5PHngCK4J6U2iCWkdNHw}{{lh6 z_>_WBDCGH)3s`yd2>O)+{5YS-#~w%mw;N>+o7*3^@5UGd_5ydcn5qCjokL~y9k%P9RdQkB;-m(?<}6=(kT&nVM#Ba1h{OJNY}n?}6um z<3Jub2b7E(8?a1bo@D;Wo1~3LFK_17*wjxc~$qmrb)~RVN7t%hD+dm1#yY zDSGzq;jc%J(Y<*CubntSy7nlz~;xH&45sANp07U3$&$HvM zt)w$4ve_(KyEiugbOXNuw%(*1|J$-;J^(?$)K67Gm1;Ik-3cA}b`BjpKr)#i(Uu^W z%L1$bz7E`MX`BGQ3q%V7&_-Yy66}@K^ehsEl*%Q3_vBO5>mjO2sayuw3EXpච zfzz$kZ~-lh$)JGx2#q|Gr84KUt6+7$sd&t*0}b~B z1fe1dorMk_=-Evo5JZJ)wTh8xW(nh0fnQth_uE=s5n4GTi zkK?bC&9`%=?;Xa9Q`Eu`i{*7-Q=^H;E4r15Vs>DaWGUpD_3-~ zdU+17%1qVs!IfbIC6~`)Ze4F1b~fd=01ui-?E)TXGBRsiSSSRhLK3Ir+Epv)YH#P% zTYZ4CuXiu?Fk;}^FqupS;H(jGnYntqy#ss`__P(G=JNc6RY(?5LO~Ejgk%6`&z}c` zYPH6R({GbYB}k{*XiFvm-nFjhvekos*?Xh2+i0O_^iMAWKWff|M5_aYxD8jJHd|w+ zT4VY0P6h`mOjRn>!!QQvT%*}IX>qPwd;cbI0oVY1%xsJS&j3HS3b}X|G=TWXBW-E! zy=NyUPrX5AS&GkmvWKzK6xDhR!i-+Cn3jPZ#)%m-8UjNG>NQ&%Ev*BA!->O-a&>qV z5VmakIL-;f6Gbjw88L~tk2Y@Y&OX?zP)!h8D5o(}S*FWmruxxR{+_n^e86#Eo!%p_U r+|@cwC~^x|M_OY&W~7_B6(IftNzQYNJE)a600000NkvXXu0mjfZ3qz5 diff --git a/gfceu b/gfceux similarity index 98% rename from gfceu rename to gfceux index 11d6b49d..831b23b7 100644 --- a/gfceu +++ b/gfceux @@ -1,9 +1,9 @@ #!/usr/bin/python -# gfceu - Graphical launcher for FCE Ultra. +# gfceux - Graphical launcher for fceux. # Designed on Ubuntu, with platfrom independence in mind. version = "2.0.0" -title = "gfceu" -# Copyright (C) 2006 Lukas Sabota +title = "gfceux" +# Copyright (C) 2008 Lukas Sabota ## """ This program is free software; you can redistribute it and/or @@ -205,7 +205,7 @@ def find_binary(file): # # # # # # # # # # # # # # # # # # Globals options = None -optionsfile = os.getenv('HOME') + '/.gfceu_options.dat' +optionsfile = os.getenv('HOME') + '/.gfceux_options.dat' widgets = None class GfceuApp: @@ -268,11 +268,11 @@ class GfceuApp: global widgets """ Search for the glade XML file and load it """ # Check first in the directory of this script. - if os.path.isfile('gfceu.xml'): - glade_file = 'gfceu.xml' + if os.path.isfile('gfceux.xml'): + glade_file = 'gfceux.xml' # Then check to see if its installed on a *nix system - elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.xml')): - glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceu/gfceu.xml') + elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml')): + glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml') else: print 'ERROR.' print 'Could not find the glade.xml file.' diff --git a/gfceu.desktop b/gfceux.desktop similarity index 73% rename from gfceu.desktop rename to gfceux.desktop index 37cc8e87..fe60738b 100644 --- a/gfceu.desktop +++ b/gfceux.desktop @@ -1,10 +1,10 @@ [Desktop Entry] Encoding=UTF-8 -Name=GFCE Ultra NES Emulator +Name=FCEUX NES Emulator Comment=Play Nintendo ROM files -Exec=gfceu +Exec=gfceux Terminal=false Type=Application StartupNotify=true -Icon=gfceu +Icon=gfceux Categories=GNOME;GTK;Game; diff --git a/gfceu.glade b/gfceux.glade similarity index 99% rename from gfceu.glade rename to gfceux.glade index c7989a55..1fc65e2d 100644 --- a/gfceu.glade +++ b/gfceux.glade @@ -246,7 +246,7 @@ Digital Manipulation: Artwork for old versions (< 0.2.7): Jimmy Angelakos <vyruss000@gmail.com> - gfceu_big.png + gfceux_big.png True @@ -267,9 +267,9 @@ Artwork for old versions (< 0.2.7): True - GFCE Ultra + GFCE UltraX 442 - gfceu.png + gfceux.png @@ -316,7 +316,7 @@ Artwork for old versions (< 0.2.7): _Browse... True 0 - + False diff --git a/gfceu.png b/gfceux.png similarity index 100% rename from gfceu.png rename to gfceux.png diff --git a/gfceu.xml b/gfceux.xml similarity index 99% rename from gfceu.xml rename to gfceux.xml index 0a849508..bdeb92b5 100644 --- a/gfceu.xml +++ b/gfceux.xml @@ -260,7 +260,7 @@ Digital Manipulation: Artwork for old versions (< 0.2.7): Jimmy Angelakos <vyruss000@gmail.com> - gfceu_big.png + gfceux_big.png True @@ -281,9 +281,9 @@ Artwork for old versions (< 0.2.7): True - GFCE Ultra + GFCE UltraX 442 - gfceu.png + gfceux.png @@ -329,7 +329,7 @@ Artwork for old versions (< 0.2.7): True _Browse... True - + False diff --git a/gfceu_big.png b/gfceux_big.png similarity index 100% rename from gfceu_big.png rename to gfceux_big.png diff --git a/setup.py b/setup.py index 2ce7d910..047f752c 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,14 @@ #!/usr/bin/env python from distutils.core import setup -setup(name="gfceu", +setup(name="gfceux", version="2.0.0", scripts = ['gfceu'], - data_files=[('share/gfceu/',['gfceu.xml', 'gfceu_big.png', 'gfceu.png']), - ('share/pixmaps/', ['gfceu.png']), - ('share/man/man1/', ['gfceu.1']), - ('share/applications/', ['gfceu.desktop'])], + data_files=[('share/gfceux/',['gfceux.xml', 'gfceux_big.png', 'gfceux.png']), + ('share/pixmaps/', ['gfceux.png']), + ('share/man/man1/', ['gfceux.1']), + ('share/applications/', ['gfceux.desktop'])], author = "Lukas Sabota", - author_email = "punkrockguy318@comcast.net", - url = "http://punkrockguy318.no-ip.org" - + author_email = "ltsmooth42 _at_ gmail.com", + url = "http://dietschnitzel.com/gfceu" ) From 96dce16bad5d05f3d7b27b4862b3651c99d0f124 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 3 Aug 2008 00:55:21 +0000 Subject: [PATCH 41/94] Fixed some build issues and updated man page --- MANIFEST | 11 +++++------ gfceux.1 | 19 +++++++++++++++++++ setup.py | 2 +- 3 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 gfceux.1 diff --git a/MANIFEST b/MANIFEST index 15a8e5c0..c4ecd8d3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,11 +1,10 @@ -gfceu +gfceux setup.py COPYING ChangeLog INSTALL TODO -gfceu.xml -gfceu.desktop -gfceu.png -gfceu_big.png -gfceu.1 +gfceux.xml +gfceux.desktop +gfceux.png +gfceux_big.png diff --git a/gfceux.1 b/gfceux.1 new file mode 100644 index 00000000..d330e121 --- /dev/null +++ b/gfceux.1 @@ -0,0 +1,19 @@ +.TH gfceux 1 "August 2, 2008" "Lukas Sabota" +.SH NAME +GNOME FCE UltraX - A graphical front-end for fceux +.SH SYNOPSIS +.B gfceux +.BR [options] +.PP +.SH DESCRIPTION +GFCE UltraX is a graphical front-end for fceux, an advanced Nintendo Entertainment System emulator. The program allows easy control over various options including input, network, video, and sound. It uses the GTK+2 library and optionally GNOMEVFS. +.SH OPTIONS +.TP +.B --version +Displays the version number of the application +.TP +.B --help +Displays a help message displaying options +.SH AUTHOR +.TP +Written for Ubuntu/Debian by Lukas Sabota. diff --git a/setup.py b/setup.py index 047f752c..2bf9e54a 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup setup(name="gfceux", version="2.0.0", - scripts = ['gfceu'], + scripts = ['gfceux'], data_files=[('share/gfceux/',['gfceux.xml', 'gfceux_big.png', 'gfceux.png']), ('share/pixmaps/', ['gfceux.png']), ('share/man/man1/', ['gfceux.1']), From 8495f6d77aa3019d353868325f128c4ee86023d2 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 3 Aug 2008 00:58:29 +0000 Subject: [PATCH 42/94] Made install instructions more cross platform --- INSTALL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index 3507d0fd..54241d0b 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ You can install gfceux with setup.py: -$ sudo ./setup.py install --prefix=/usr/local +$ sudo python setup.py install --prefix=/usr/local You can change the prefix to whatever you like. From 63c939c8f5ae3e235ba603b0a5e5fa9474d0f13a Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 10 Aug 2008 10:56:55 +0000 Subject: [PATCH 43/94] Numerious bugfixes and improvements, see changelogs for details [[Split portion of a mixed commit.]] --- ChangeLog | 2 ++ gfceux | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30ce55f3..0ff9ff48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +================== version 2.0.2 ================================ +* Now stores config file in .fceultra ================== version 2.0.0 ================================ * Supports movie playback * Support lua script loading diff --git a/gfceux b/gfceux index 831b23b7..a2fcdb66 100644 --- a/gfceux +++ b/gfceux @@ -1,7 +1,7 @@ #!/usr/bin/python # gfceux - Graphical launcher for fceux. # Designed on Ubuntu, with platfrom independence in mind. -version = "2.0.0" +version = "2.0.2" title = "gfceux" # Copyright (C) 2008 Lukas Sabota ## @@ -205,7 +205,7 @@ def find_binary(file): # # # # # # # # # # # # # # # # # # Globals options = None -optionsfile = os.getenv('HOME') + '/.gfceux_options.dat' +optionsfile = os.getenv('HOME') + '/.fceultra/gfceux_options.dat' widgets = None class GfceuApp: From eec4472c7b284199e12d1a6a946166a13e912230 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 11 Aug 2008 03:16:46 +0000 Subject: [PATCH 44/94] Gfceux bugfixes and sdl fceux bugfixes [[Split portion of a mixed commit.]] --- ChangeLog | 2 ++ gfceux | 7 ++++--- gfceux.glade | 7 ++++--- gfceux.xml | 9 +++++---- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ff9ff48..ef6d6aa0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ ================== version 2.0.2 ================================ * Now stores config file in .fceultra +* If the .fceultra config directory doesn't exist yet, gfceux will + now create it. ================== version 2.0.0 ================================ * Supports movie playback * Support lua script loading diff --git a/gfceux b/gfceux index a2fcdb66..a40b939d 100644 --- a/gfceux +++ b/gfceux @@ -42,8 +42,6 @@ except ImportError: sudo apt-get install python-gtk2 libgtk2.0-0" - - class GameOptions: # sound sound_check = True @@ -90,7 +88,9 @@ def load_options(): def save_options(): global options, optionsfile - ofile = file(optionsfile, 'w') + if os.path.exists(os.path.dirname(optionsfile)) == 0: + os.mkdir(os.path.dirname(optionsfile)) + ofile = open(optionsfile, 'w') pickle.dump(options, ofile) ofile.close() @@ -162,6 +162,7 @@ def set_options(): options.autoscale_check = widgets.get_object("autoscale_check").get_active() options.xscale_spin = widgets.get_object("xscale_spin").get_value() + print options.xscale_spin options.yscale_spin = widgets.get_object("yscale_spin").get_value() options.extra_entry = widgets.get_object("extra_entry").get_text() diff --git a/gfceux.glade b/gfceux.glade index 1fc65e2d..21620750 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + @@ -619,6 +619,7 @@ Artwork for old versions (< 0.2.7): _Autoscale Fullscreen True 0 + True True @@ -643,7 +644,7 @@ Artwork for old versions (< 0.2.7): True True - 2 1 10 0.5 1 10 + -5 1 5 0.5 1 10 1 True @@ -675,7 +676,7 @@ Artwork for old versions (< 0.2.7): True True - 2 1 10 0.5 1 10 + 0 1 10 0.5 1 10 1 True GTK_UPDATE_IF_VALID diff --git a/gfceux.xml b/gfceux.xml index bdeb92b5..5a643bba 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,13 +1,13 @@ - + - 10 + 5 1 1 0.5 10 - 2 + -5 10 @@ -15,7 +15,7 @@ 1 0.5 10 - 2 + 0 65536 @@ -617,6 +617,7 @@ Artwork for old versions (< 0.2.7): True _Autoscale Fullscreen True + True True From d96331c6d32645bbd106d99e85d132ae63170a7f Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 11 Aug 2008 03:27:11 +0000 Subject: [PATCH 45/94] Permissions update and man page update on gfceux [[Split portion of a mixed commit.]] --- generate_ui.sh | 0 gfceux | 0 gfceux.1 | 7 ++++--- 3 files changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 generate_ui.sh mode change 100644 => 100755 gfceux diff --git a/generate_ui.sh b/generate_ui.sh old mode 100644 new mode 100755 diff --git a/gfceux b/gfceux old mode 100644 new mode 100755 diff --git a/gfceux.1 b/gfceux.1 index d330e121..851b5601 100644 --- a/gfceux.1 +++ b/gfceux.1 @@ -1,12 +1,13 @@ -.TH gfceux 1 "August 2, 2008" "Lukas Sabota" +.TH gfceux 1 "August 10, 2008" "Lukas Sabota" .SH NAME -GNOME FCE UltraX - A graphical front-end for fceux +GFCE UltraX - A GTK2 graphical front-end for fceux .SH SYNOPSIS .B gfceux .BR [options] .PP .SH DESCRIPTION -GFCE UltraX is a graphical front-end for fceux, an advanced Nintendo Entertainment System emulator. The program allows easy control over various options including input, network, video, and sound. It uses the GTK+2 library and optionally GNOMEVFS. +Gfceux is a graphical front-end for fceux, an advanced Nintendo Entertainment System emulator. +It allows easy control over various options including input, network, video, and sound. .SH OPTIONS .TP .B --version From ebe632f2c3b899162026f2ca7bbaf0b392b82e19 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 11 Aug 2008 03:31:23 +0000 Subject: [PATCH 46/94] More permissions setup and svn cleanup [[Split portion of a mixed commit.]] --- setup.py | 0 status_window.py | 40 ---------------------------------------- 2 files changed, 40 deletions(-) mode change 100644 => 100755 setup.py delete mode 100644 status_window.py diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 diff --git a/status_window.py b/status_window.py deleted file mode 100644 index 4970cc84..00000000 --- a/status_window.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python -# A cool thing that i don't feel like explaining -import gtk -import gobject -import os -class shit: - def __init__(self, command, title="Status Window"): - self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) - self.window.set_default_size(400,300) - self.window.set_title(title) - - self.scroll = gtk.ScrolledWindow() - self.scroll.set_property("hscrollbar-policy", gtk.POLICY_NEVER) - - self.buffer = gtk.TextBuffer() - - self.text_view = gtk.TextView(self.buffer) - self.text_view.set_editable(False) - self.window.add(self.scroll) - self.scroll.add(self.text_view) - - gobject.timeout_add(10, self.get_output) - - self.handle = os.popen(command, "r",1) - self.add(self.handle.readlines()) - def get_output(self): - self.add(self.handle.read()) - - def show(self): - self.window.show_all() - - def hide(self): - self.window.hide_all() - - def add(self, string): - self.buffer.insert_at_cursor(string) - -myshit = shit("fceu-server", "THE StatUZ") -myshit.show() -gtk.main() From a66f6d2ba6312c0a29bfbc3ac3fd8c859b42a500 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 11 Aug 2008 04:26:37 +0000 Subject: [PATCH 47/94] fceux now writes config direcoty as soon as it starts whether a rom is loaded or not [[Split portion of a mixed commit.]] --- config_parse.py | 16 +++++----------- gfceux | 9 +++------ mockup_test.py | 17 ++++++----------- 3 files changed, 14 insertions(+), 28 deletions(-) diff --git a/config_parse.py b/config_parse.py index 74f3a52d..8c79e108 100755 --- a/config_parse.py +++ b/config_parse.py @@ -39,17 +39,11 @@ class ConfigParser: if re.search(keyname, line): cursor = self.f.tell() break - - self.f.seek(cursor) - while 1: - c = self.f.read(1) -# self.f.seek(5, 1) - print c, - - if c == '=': - self.f.seek(1, os.SEEK_CUR) - #self.f.write(value) - self.f.flush() + + newline = line.split('=')[0] + '=' + str(value) + self.f.seek(os.SEEK_CUR, -line.split('=')[0].__len__) + + diff --git a/gfceux b/gfceux index a40b939d..4b771152 100755 --- a/gfceux +++ b/gfceux @@ -162,7 +162,6 @@ def set_options(): options.autoscale_check = widgets.get_object("autoscale_check").get_active() options.xscale_spin = widgets.get_object("xscale_spin").get_value() - print options.xscale_spin options.yscale_spin = widgets.get_object("yscale_spin").get_value() options.extra_entry = widgets.get_object("extra_entry").get_text() @@ -256,10 +255,8 @@ class GfceuApp: def find_fceu(self): bin = find_binary('fceux') if bin == None: - gfceu_error('Could not find the fceu binary.\n\ - Ensure that FCE Ultra is installed and in the $PATH.\n\ - On Debian based systems (like Ubuntu), try the following command:\n\ - sudo apt-get install fceu', 4, True) + gfceu_error('Could not find the fceux binary.\n\ + Ensure that fceux is installed and in the $PATH.\n', 4, True) else: self.msg('Using: ' + bin) @@ -276,7 +273,7 @@ class GfceuApp: glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml') else: print 'ERROR.' - print 'Could not find the glade.xml file.' + print 'Could not find the ' + glade_file + ' file.' print 'Try reinstalling the application.' sys.exit(1) diff --git a/mockup_test.py b/mockup_test.py index 3eb75e94..c29b0bb7 100644 --- a/mockup_test.py +++ b/mockup_test.py @@ -1,17 +1,12 @@ #!/usr/bin/env python # displays mockup of gamepad config -import gtk, gtk.glade +import gtk -class WidgetsWrapper: - def __init__(self): - self.widgets = gtk.glade.XML ('gfceu.glade', "gamepad_config_window") - self.widgets.signal_autoconnect(GladeHandlers.__dict__) - # Gives us the ability to do: widgets['widget_name'].action() - def __getitem__(self, key): - return self.widgets.get_widget(key) +glade_file = 'gfceux.xml' +print "Using: " + glade_file +widgets = gtk.Builder() +widgets.add_from_file(glade_file) -widgets = WidgetsWrapper() - -widgets['gamepad_config_window'].show_all() +widgets.get_object('gamepad_config_window').show_all() gtk.main () From bb1c02ef09ad49168f71367d7afd45afbaf1fdfb Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 13 Aug 2008 23:45:12 +0000 Subject: [PATCH 48/94] string changes for 2.0.2 --- gfceux | 2 +- gfceux.glade | 320 +++++++++++++++++++++++++-------------------------- gfceux.xml | 316 +++++++++++++++++++++++++------------------------- 3 files changed, 319 insertions(+), 319 deletions(-) diff --git a/gfceux b/gfceux index 4b771152..8c7003e5 100755 --- a/gfceux +++ b/gfceux @@ -415,7 +415,7 @@ class GfceuApp: self.launch('"'+ options.romfile +'"') def about_button_clicked(self, menuitem, data=None): - widgets.get_object("about_dialog").set_name('GNOME FCE Ultra '+version) + widgets.get_object("about_dialog").set_name('GFCE UltraX '+version) widgets.get_object("about_dialog").run() widgets.get_object("about_dialog").hide() diff --git a/gfceux.glade b/gfceux.glade index 21620750..e637986e 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + @@ -36,27 +36,16 @@ - + True True True - Up - 0 - - - 1 - 2 - - - - - True - True - True - Left + Right 0 + 2 + 3 1 2 @@ -77,20 +66,31 @@ - + True True True - Right + Left 0 - 2 - 3 1 2 + + + True + True + True + Up + 0 + + + 1 + 2 + + @@ -214,57 +214,6 @@ - - GDK_WINDOW_TYPE_HINT_NORMAL - (C) Copyright 2006 - A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator - http://dietschnitzel.com/gfceu/ - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Lukas Sabota -<ltsmooth42@gmail.comt> - -Patch writers: -Scott Brown - translator-credits - Sketching: - J. Sammer -Digital Manipulation: - C. Kontros - -Artwork for old versions (< 0.2.7): - Jimmy Angelakos - <vyruss000@gmail.com> - gfceux_big.png - - - True - - - - - - True - - - False - GTK_PACK_END - - - - - True GFCE UltraX @@ -479,17 +428,30 @@ Artwork for old versions (< 0.2.7): 5 5 - + True True - Gamepad _3 + Gamepad _1 True 0 - 1 - 2 + + + + + + True + True + Gamepad _2 + True + 0 + + + + 1 + 2 @@ -511,30 +473,17 @@ Artwork for old versions (< 0.2.7): - + True True - Gamepad _2 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True 0 + 1 + 2 @@ -644,7 +593,7 @@ Artwork for old versions (< 0.2.7): True True - -5 1 5 0.5 1 10 + 1 1 5 0.5 1 10 1 True @@ -676,7 +625,7 @@ Artwork for old versions (< 0.2.7): True True - 0 1 10 0.5 1 10 + 1 1 10 0.5 1 10 1 True GTK_UPDATE_IF_VALID @@ -991,28 +940,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - 4046 1 65536 1 10 10 - 1 - - - 1 - 2 + GTK_FILL @@ -1030,13 +964,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - 0 - Port: + True + 4046 1 65536 1 10 10 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -1087,54 +1036,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -1154,13 +1062,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 @@ -1280,4 +1229,55 @@ Invalid options may cause GFCE Ultra to perform incorrectly. + + GDK_WINDOW_TYPE_HINT_NORMAL + (C) Copyright 2006 + A GTK2 front-end end for the fceux Nintendo Entertainment System emulator. + http://dietschnitzel.com/gfceu/ + This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + Lukas Sabota +<ltsmooth42@gmail.comt> + +Patch writers: +Scott Brown + translator-credits + Sketching: + J. Sammer +Digital Manipulation: + C. Kontros + +Artwork for old versions (< 0.2.7): + Jimmy Angelakos + <vyruss000@gmail.com> + gfceux_big.png + + + True + + + + + + True + + + False + GTK_PACK_END + + + + + diff --git a/gfceux.xml b/gfceux.xml index 5a643bba..71174be6 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -7,7 +7,7 @@ 1 0.5 10 - -5 + 1 10 @@ -15,7 +15,7 @@ 1 0.5 10 - 0 + 1 65536 @@ -67,25 +67,15 @@ - + True True True - Up - - - 1 - 2 - - - - - True - True - True - Left + Right + 2 + 3 1 2 @@ -105,19 +95,29 @@ - + True True True - Right + Left - 2 - 3 1 2 + + + True + True + True + Up + + + 1 + 2 + + @@ -228,57 +228,6 @@ - - GDK_WINDOW_TYPE_HINT_NORMAL - (C) Copyright 2006 - A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator - http://dietschnitzel.com/gfceu/ - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Lukas Sabota -<ltsmooth42@gmail.comt> - -Patch writers: -Scott Brown - translator-credits - Sketching: - J. Sammer -Digital Manipulation: - C. Kontros - -Artwork for old versions (< 0.2.7): - Jimmy Angelakos - <vyruss000@gmail.com> - gfceux_big.png - - - True - - - - - - True - - - False - GTK_PACK_END - - - - - True GFCE UltraX @@ -489,16 +438,28 @@ Artwork for old versions (< 0.2.7): 5 5 - + True True - Gamepad _3 + Gamepad _1 True - 1 - 2 + + + + + + True + True + Gamepad _2 + True + + + + 1 + 2 @@ -519,28 +480,16 @@ Artwork for old versions (< 0.2.7): - + True True - Gamepad _2 - True - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True + 1 + 2 @@ -977,28 +926,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - adjustment3 - 1 - - - 1 - 2 + GTK_FILL @@ -1016,13 +950,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - 0 - Port: + True + adjustment3 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -1072,54 +1021,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True - adjustment4 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -1139,13 +1047,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + adjustment4 + 1 1 2 + 1 + 2 @@ -1257,4 +1206,55 @@ Invalid options may cause GFCE Ultra to perform incorrectly. + + GDK_WINDOW_TYPE_HINT_NORMAL + (C) Copyright 2006 + A GTK2 front-end end for the fceux Nintendo Entertainment System emulator. + http://dietschnitzel.com/gfceu/ + This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + Lukas Sabota +<ltsmooth42@gmail.comt> + +Patch writers: +Scott Brown + translator-credits + Sketching: + J. Sammer +Digital Manipulation: + C. Kontros + +Artwork for old versions (< 0.2.7): + Jimmy Angelakos + <vyruss000@gmail.com> + gfceux_big.png + + + True + + + + + + True + + + False + GTK_PACK_END + + + + + From 3d7536ceb2cf281f531d3df6fe1d283d89133e61 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Thu, 14 Aug 2008 00:04:42 +0000 Subject: [PATCH 49/94] string change --- gfceux.glade | 208 +++++++++++++++++++++++++-------------------------- gfceux.xml | 204 +++++++++++++++++++++++++------------------------- 2 files changed, 206 insertions(+), 206 deletions(-) diff --git a/gfceux.glade b/gfceux.glade index e637986e..cea91a3b 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + @@ -36,16 +36,27 @@ - + True True True - Right + Up + 0 + + + 1 + 2 + + + + + True + True + True + Left 0 - 2 - 3 1 2 @@ -66,31 +77,20 @@ - + True True True - Left + Right 0 + 2 + 3 1 2 - - - True - True - True - Up - 0 - - - 1 - 2 - - @@ -428,30 +428,17 @@ 5 5 - + True True - Gamepad _1 + Gamepad _3 True 0 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 + 1 + 2 @@ -473,17 +460,30 @@ - + True True - Gamepad _3 + Gamepad _2 + True + 0 + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True 0 - 1 - 2 @@ -940,26 +940,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -977,15 +966,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -1036,13 +1036,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -1062,54 +1103,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 @@ -1231,7 +1231,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. GDK_WINDOW_TYPE_HINT_NORMAL - (C) Copyright 2006 + (C) Copyright 2008 A GTK2 front-end end for the fceux Nintendo Entertainment System emulator. http://dietschnitzel.com/gfceu/ This program is free software; you can redistribute it and/or diff --git a/gfceux.xml b/gfceux.xml index 71174be6..505ce305 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -67,15 +67,25 @@ - + True True True - Right + Up + + + 1 + 2 + + + + + True + True + True + Left - 2 - 3 1 2 @@ -95,29 +105,19 @@ - + True True True - Left + Right + 2 + 3 1 2 - - - True - True - True - Up - - - 1 - 2 - - @@ -438,28 +438,16 @@ 5 5 - + True True - Gamepad _1 + Gamepad _3 True - - - - - - True - True - Gamepad _2 - True - - - - 1 - 2 + 1 + 2 @@ -480,16 +468,28 @@ - + True True - Gamepad _3 + Gamepad _2 + True + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True - 1 - 2 @@ -926,26 +926,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -963,15 +952,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -1021,13 +1021,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True + adjustment4 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -1047,54 +1088,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - adjustment4 - 1 1 2 - 1 - 2 @@ -1208,7 +1208,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. GDK_WINDOW_TYPE_HINT_NORMAL - (C) Copyright 2006 + (C) Copyright 2008 A GTK2 front-end end for the fceux Nintendo Entertainment System emulator. http://dietschnitzel.com/gfceu/ This program is free software; you can redistribute it and/or From 70213ada5da057ff94d9c9c218b50d7e154f468a Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Thu, 21 Aug 2008 05:07:56 +0000 Subject: [PATCH 50/94] preliminary gamepad config --- ChangeLog | 3 +++ gfceux | 34 ++++++++++++++++++++++++++++++++-- gfceux.glade | 28 ++++++++++++++++++---------- gfceux.xml | 28 ++++++++++++++++++---------- 4 files changed, 71 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef6d6aa0..9275fc6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +* Working on new config system for input. you can try by configuring + the third gamepad. It's not functional yet, but it's a start on more + intuitive gamepad configuration for sdl ================== version 2.0.2 ================================ * Now stores config file in .fceultra * If the .fceultra config directory doesn't exist yet, gfceux will diff --git a/gfceux b/gfceux index 8c7003e5..d79d3a8a 100755 --- a/gfceux +++ b/gfceux @@ -40,7 +40,7 @@ except ImportError: Ensure that PyGTK (>=2.12) is installed on this system.\n\ On Debian based systems (like Ubuntu), try this command:\n\ sudo apt-get install python-gtk2 libgtk2.0-0" - + class GameOptions: # sound @@ -532,7 +532,37 @@ class GfceuApp: widgets.get_object("movie_entry").set_text("") widgets.get_object("lua_entry").set_text("") options.romfile = x - + # fix this global its ugly + gamepad_config = "0" + + def gamepad_clicked_new(self, widget, data=None): + widgets.get_object("gamepad_config_window").show_all() + d = {'gp1_button' : "0", + 'gp2_button' : "1", + 'gp3_button' : "2", + 'gp4_button' : "3"} + self.gamepad_config = d[widget.name] + + def right_button_clicked(self, widget, data=None): + print "right!" + def left_button_clicked(self, widget, data=None): + print "left!" + def down_button_clicked(self, widget, data=None): + print "down!" + def up_button_clicked(self, widget, data=None): + print "up!" + def button_clicked(self, widget, data=None): + d = {'right_button' : "SDL.Input.GamePad." + self.gamepad_config + "Right", + 'left_button' : "SDL.Input.GamePad." + self.gamepad_config + "Left", + 'up_button' : "SDL.Input.GamePad." + self.gamepad_config + "Up", + 'down_button' : "SDL.Input.GamePad." + self.gamepad_config + "Down", + 'select_button' : "SDL.Input.GamePad." + self.gamepad_config + "Select", + 'start_button' : "SDL.Input.GamePad." + self.gamepad_config + "Start", + 'a_button' : "SDL.Input.GamePad." + self.gamepad_config + "A", + 'b_button' : "SDL.Input.GamePad." + self.gamepad_config + "B"} + print d[widget.name] + + def gamepad_clicked(self, widget, data=None): d = {'gp1_button' : '1', diff --git a/gfceux.glade b/gfceux.glade index cea91a3b..28a59107 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + @@ -36,12 +36,13 @@ - + True True True Up 0 + 1 @@ -49,12 +50,13 @@ - + True True True Left 0 + 1 @@ -62,12 +64,13 @@ - + True True True Down 0 + 1 @@ -77,12 +80,13 @@ - + True True True Right 0 + 2 @@ -120,21 +124,23 @@ True - + True True True Select 0 + - + True True True Start 0 + 1 @@ -172,21 +178,23 @@ True - + True True True B 0 + - + True True True A 0 + 1 @@ -434,7 +442,7 @@ Gamepad _3 True 0 - + 1 diff --git a/gfceux.xml b/gfceux.xml index 505ce305..0e0dc0f7 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -67,11 +67,12 @@ - + True True True Up + 1 @@ -79,11 +80,12 @@ - + True True True Left + 1 @@ -91,11 +93,12 @@ - + True True True Down + 1 @@ -105,11 +108,12 @@ - + True True True Right + 2 @@ -144,19 +148,21 @@ True - + True True True Select + - + True True True Start + 1 @@ -191,19 +197,21 @@ True - + True True True B + - + True True True A + 1 @@ -487,7 +495,7 @@ True Gamepad _1 True - + From 67212a759bafcc81633318955ee50edce080d2d7 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 22 Aug 2008 17:26:41 +0000 Subject: [PATCH 51/94] GUI cleanup for GTK inputcfg --- gfceux.glade | 230 +++++++++++++++++++++++++++------------------------ gfceux.xml | 222 +++++++++++++++++++++++++------------------------ 2 files changed, 236 insertions(+), 216 deletions(-) diff --git a/gfceux.glade b/gfceux.glade index 28a59107..7713367d 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + @@ -36,29 +36,17 @@ - + True True True - Up - 0 - - - - 1 - 2 - - - - - True - True - True - Left + Right 0 + 2 + 3 1 2 @@ -80,21 +68,33 @@ - + True True True - Right + Left 0 - 2 - 3 1 2 + + + True + True + True + Up + 0 + + + + 1 + 2 + + @@ -110,6 +110,10 @@ + + False + False + @@ -132,6 +136,10 @@ 0 + + False + False + @@ -143,6 +151,8 @@ + False + False 1 @@ -436,17 +446,30 @@ 5 5 - + True True - Gamepad _3 + Gamepad _1 True 0 - + - 1 - 2 + + + + + + True + True + Gamepad _2 + True + 0 + + + + 1 + 2 @@ -468,30 +491,17 @@ - + True True - Gamepad _2 + Gamepad _3 True 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _1 - True - 0 - + + 1 + 2 @@ -948,28 +958,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - 4046 1 65536 1 10 10 - 1 - - - 1 - 2 + GTK_FILL @@ -987,13 +982,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - 0 - Port: + True + 4046 1 65536 1 10 10 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -1044,54 +1054,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -1111,13 +1080,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 diff --git a/gfceux.xml b/gfceux.xml index 0e0dc0f7..3fb1f252 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -67,27 +67,16 @@ - + True True True - Up - - - - 1 - 2 - - - - - True - True - True - Left + Right + 2 + 3 1 2 @@ -108,20 +97,31 @@ - + True True True - Right + Left - 2 - 3 1 2 + + + True + True + True + Up + + + + 1 + 2 + + @@ -134,6 +134,10 @@ + + False + False + @@ -155,6 +159,10 @@ Select + + False + False + @@ -165,6 +173,8 @@ + False + False 1 @@ -446,16 +456,28 @@ 5 5 - + True True - Gamepad _3 + Gamepad _1 True - 1 - 2 + + + + + + True + True + Gamepad _2 + True + + + + 1 + 2 @@ -476,28 +498,16 @@ - + True True - Gamepad _2 - True - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True + 1 + 2 @@ -934,28 +944,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - adjustment3 - 1 - - - 1 - 2 + GTK_FILL @@ -973,13 +968,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + True - 0 - Port: + True + adjustment3 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -1029,54 +1039,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly. 3 5 - + True True - adjustment4 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -1096,13 +1065,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + adjustment4 + 1 1 2 + 1 + 2 From b531d9c16deb1382ebc4051a819bab6740d3a158 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 24 Aug 2008 07:23:24 +0000 Subject: [PATCH 52/94] fixed typo --- gfceux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfceux b/gfceux index d79d3a8a..abbcc437 100755 --- a/gfceux +++ b/gfceux @@ -255,7 +255,7 @@ class GfceuApp: def find_fceu(self): bin = find_binary('fceux') if bin == None: - gfceu_error('Could not find the fceux binary.\n\ + self.print_error('Could not find the fceux binary.\n\ Ensure that fceux is installed and in the $PATH.\n', 4, True) else: self.msg('Using: ' + bin) From 9befb65786e39888dc7de97a1d247852f1cb5d74 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 14 Sep 2008 22:31:53 +0000 Subject: [PATCH 53/94] Made error message of missing fceux binary more elegant --- gfceux | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfceux b/gfceux index abbcc437..aeba1dfe 100755 --- a/gfceux +++ b/gfceux @@ -238,7 +238,7 @@ class GfceuApp: def print_error(self, message, code, use_gtk=True, fatal=True): """ - GfceuApp.error() + GfceuApp.print_error() Presents the user with an error message and optionally quits the program. """ @@ -597,11 +597,11 @@ class GfceuApp: if self.server_binary == None: if os.name == 'nt': - gfceu_error("The fceu server software cannot be found. \n\ + self.print_error("The fceu server software cannot be found. \n\ Ensure that it is installed in the same directory as \n\ GFCE Ultra.", 102, True, False) else: - gfceu_error("The fceu server software cannot be found on \n\ + self.print_error("The fceu server software cannot be found on \n\ this system. Ensure that it is installed and in your path.", 101, True, False) widgets.get_object("no_network_radio").set_active(True) From cf4a00e60235c1dbecc9678cd4bb0fc8ca7d2542 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 14 Sep 2008 22:47:07 +0000 Subject: [PATCH 54/94] Added bugfix to changelog --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9275fc6b..525eca73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +* Fixed error in which gfceux would display an ugly error message if + the fceux binary could not be found. * Working on new config system for input. you can try by configuring the third gamepad. It's not functional yet, but it's a start on more intuitive gamepad configuration for sdl From 7205b82ad9abb002a2947dee16b1bb6ae2cb5511 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 22 Sep 2008 08:17:49 +0000 Subject: [PATCH 55/94] UI improvements and code cleanup; changelog for details --- ChangeLog | 4 + gfceux | 21 +++- gfceux.glade | 340 ++++++++++++++++++++++++++++----------------------- gfceux.xml | 339 +++++++++++++++++++++++++++----------------------- 4 files changed, 394 insertions(+), 310 deletions(-) diff --git a/ChangeLog b/ChangeLog index 525eca73..6a898e9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +* Updated UI slightly. Moved sound and advanced tabs; made autoscaling + configuration a bit more intuitive; rearranged some items; made some + text more clear +* Changed gfceu code references to gfceux * Fixed error in which gfceux would display an ugly error message if the fceux binary could not be found. * Working on new config system for input. you can try by configuring diff --git a/gfceux b/gfceux index aeba1dfe..520fe23b 100755 --- a/gfceux +++ b/gfceux @@ -1,7 +1,7 @@ #!/usr/bin/python # gfceux - Graphical launcher for fceux. # Designed on Ubuntu, with platfrom independence in mind. -version = "2.0.2" +version = "2.0.2svn" title = "gfceux" # Copyright (C) 2008 Lukas Sabota ## @@ -117,6 +117,11 @@ def give_widgets(): widgets.get_object("fullscreen_check").set_active(options.fullscreen_check) widgets.get_object("opengl_check").set_active(options.opengl_check) widgets.get_object("autoscale_check").set_active(options.autoscale_check) + # set/unset sensitivity on manual scaling + if widgets.get_object("autoscale_check").get_active(): + widgets.get_object("scaling_frame").set_sensitive(False) + else: + widgets.get_object("scaling_frame").set_sensitive(True) widgets.get_object("xscale_spin").set_value(options.xscale_spin) widgets.get_object("yscale_spin").set_value(options.yscale_spin) @@ -208,9 +213,9 @@ options = None optionsfile = os.getenv('HOME') + '/.fceultra/gfceux_options.dat' widgets = None -class GfceuApp: +class GfceuxApp: def __init__(self): - self.fceux_binary = self.find_fceu() + self.fceux_binary = self.find_fceux() self.load_ui() options = GameOptions() @@ -252,7 +257,7 @@ class GfceuApp: if fatal: sys.exit(code) - def find_fceu(self): + def find_fceux(self): bin = find_binary('fceux') if bin == None: self.print_error('Could not find the fceux binary.\n\ @@ -413,6 +418,12 @@ class GfceuApp: return self.launch('"'+ options.romfile +'"') + + def autoscale_check_toggled(self, menuitem, data=None): + if widgets.get_object("autoscale_check").get_active(): + widgets.get_object("scaling_frame").set_sensitive(False) + else: + widgets.get_object("scaling_frame").set_sensitive(True) def about_button_clicked(self, menuitem, data=None): widgets.get_object("about_dialog").set_name('GFCE UltraX '+version) @@ -632,5 +643,5 @@ if __name__ == '__main__': parser = OptionParser(version='%prog '+ version) parser.parse_args() - app = GfceuApp() + app = GfceuxApp() diff --git a/gfceux.glade b/gfceux.glade index 7713367d..fd6c5fc0 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + @@ -579,6 +579,19 @@ 1 + + + True + <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> + True + True + + + False + False + 2 + + True @@ -588,38 +601,7 @@ 0 True True - - - False - 2 - - - - - True - - - True - X scale: - - - False - 5 - - - - - True - True - 1 1 5 0.5 1 10 - 1 - True - - - False - 1 - - + False @@ -627,35 +609,97 @@ - + True + 0 + GTK_SHADOW_NONE - + True - Y scale: + 12 + + + True + + + True + + + True + X scale: + + + False + 5 + + + + + True + True + 2 1 5 0.5 1 10 + 1 + True + + + False + 1 + + + + + False + + + + + True + + + True + Y scale: + + + False + 5 + + + + + True + True + 2 1 10 0.5 1 10 + 1 + True + GTK_UPDATE_IF_VALID + + + False + 1 + + + + + False + 1 + + + + - - False - 5 - - + True - True - 1 1 10 0.5 1 10 - 1 - True - GTK_UPDATE_IF_VALID + <b>Manual Scaling</b> + True - False - 1 + label_item - False 4 @@ -676,34 +720,26 @@ True True + 2 32 + False + False 1 - - False - 5 - - - - - True - <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> - True - True - False False - 6 + 5 2 + False @@ -718,93 +754,7 @@ - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - - - - - True - If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. - -Invalid options may cause GFCE Ultra to perform incorrectly. - - True - - - False - False - 1 - - - - - False - False - 5 - - - - - True - - - True - Extra Parameters: - - - False - False - 5 - - - - - True - True - - - 5 - 1 - - - - - False - 1 - - - - - 3 - - - - - True - Advanced - - - tab - 3 - False - - - - + True 5 @@ -856,6 +806,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. True True + 6 11000 @@ -889,6 +840,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. True True + 3 48 @@ -905,14 +857,99 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - 4 + 3 + + + + + True + Sound + + + tab + 3 False + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + If you would like to specify any command line options to FCE UltraX, specify them below. For a complete option reference, visit http://fceux.com . + +Invalid options may cause GFCE UltraX to behave incorrectly. + + True + + + False + False + 1 + + + + + False + False + 5 + + + + + True + + + True + Extra Parameters: + + + False + False + 5 + + + + + True + True + + + 5 + 1 + + + + + False + 1 + + + + + 4 + + True - Sound + Advanced tab @@ -1167,7 +1204,6 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - True False Network diff --git a/gfceux.xml b/gfceux.xml index 3fb1f252..b6be8ccd 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -7,7 +7,7 @@ 1 0.5 10 - 1 + 2 10 @@ -15,7 +15,7 @@ 1 0.5 10 - 1 + 2 65536 @@ -578,6 +578,19 @@ 1 + + + True + <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> + True + True + + + False + False + 2 + + True @@ -586,38 +599,7 @@ True True True - - - False - 2 - - - - - True - - - True - X scale: - - - False - 5 - - - - - True - True - adjustment1 - 1 - True - - - False - 1 - - + False @@ -625,35 +607,94 @@ - + True + 0 + GTK_SHADOW_NONE - + True - Y scale: + 12 + + + True + + + True + + + True + X scale: + + + False + 5 + + + + + True + True + adjustment1 + 1 + True + + + False + 1 + + + + + False + + + + + True + + + True + Y scale: + + + False + 5 + + + + + True + True + adjustment2 + 1 + True + GTK_UPDATE_IF_VALID + + + False + 1 + + + + + False + 1 + + + + - - False - 5 - - - + + True - True - adjustment2 - 1 - True - GTK_UPDATE_IF_VALID + <b>Manual Scaling</b> + True - - False - 1 - - False 4 @@ -674,32 +715,27 @@ True True + 2 32 + False + False 1 False + False 5 - - - True - <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> - True - True - - - False - False - 6 - - + + 2 + False + @@ -712,89 +748,7 @@ - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - - - - - True - If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. - -Invalid options may cause GFCE Ultra to perform incorrectly. - - True - - - False - False - 1 - - - - - False - False - 5 - - - - - True - - - True - Extra Parameters: - - - False - False - 5 - - - - - True - True - - - 5 - 1 - - - - - False - 1 - - - - - - - True - Advanced - - - 3 - False - - - - + True 5 @@ -844,6 +798,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. True True + 6 11000 @@ -877,6 +832,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. True True + 3 48 @@ -892,15 +848,93 @@ Invalid options may cause GFCE Ultra to perform incorrectly. + + + + True + Sound + - 4 + 3 False + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + If you would like to specify any command line options to FCE UltraX, specify them below. For a complete option reference, visit http://fceux.com . + +Invalid options may cause GFCE UltraX to behave incorrectly. + + True + + + False + False + 1 + + + + + False + False + 5 + + + + + True + + + True + Extra Parameters: + + + False + False + 5 + + + + + True + True + + + 5 + 1 + + + + + False + 1 + + + + True - Sound + Advanced 4 @@ -1148,7 +1182,6 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - True False Network From addf44fd1145e310245dae277136abfd359d7fc8 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 24 Sep 2008 07:07:17 +0000 Subject: [PATCH 56/94] added uninstall script for gfceux --- uninstall.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 uninstall.py diff --git a/uninstall.py b/uninstall.py new file mode 100755 index 00000000..423963df --- /dev/null +++ b/uninstall.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# uninstall script for gfceux +# if gfceux was installed in an non-default prefix, you can specify it +# as an argument +# +# sudo ./uninstall.py [prefix] +# + +import os +import dircache +prefix = "/usr/" +if sys.argv[1]: + prefix == sys.argv[1] + +files = ['share/pixmaps/gfceux.png', 'share/man/man1/gfceux.1', + 'share/applications/gfceux.desktop', 'bin/gfceux'] +for x in dircache.listdir(prefix+"share/gfceux"): + files.append("share/gfceux/"+x) + +for x in files: + os.remove(prefix+x) + +os.rmdir(prefix+"share/gfceux") From 9da46b197c2a692289c91db39f3f7c01f313df29 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 10 Nov 2008 05:01:58 +0000 Subject: [PATCH 57/94] version bump and moved options into new fceux dir (.fceux) --- ChangeLog | 2 ++ gfceux | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a898e9c..6cf928f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +* Moved gfceu options data file into .fceux instead of .fceultra +================= version 2.0.3 ================================= * Updated UI slightly. Moved sound and advanced tabs; made autoscaling configuration a bit more intuitive; rearranged some items; made some text more clear diff --git a/gfceux b/gfceux index 520fe23b..26515ab7 100755 --- a/gfceux +++ b/gfceux @@ -1,7 +1,7 @@ #!/usr/bin/python # gfceux - Graphical launcher for fceux. # Designed on Ubuntu, with platfrom independence in mind. -version = "2.0.2svn" +version = "2.0.4svn" title = "gfceux" # Copyright (C) 2008 Lukas Sabota ## @@ -210,7 +210,7 @@ def find_binary(file): # # # # # # # # # # # # # # # # # # Globals options = None -optionsfile = os.getenv('HOME') + '/.fceultra/gfceux_options.dat' +optionsfile = os.getenv('HOME') + '/.fceux/gfceux_options.dat' widgets = None class GfceuxApp: From 1e7a87f370dfc263c90472207726084f5b943197 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 2 Dec 2008 09:02:57 +0000 Subject: [PATCH 58/94] New python object: FceuxConfigParser. This will be used by gfceux to map different things in the config. --- config_parse.py | 63 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/config_parse.py b/config_parse.py index 8c79e108..9899d475 100755 --- a/config_parse.py +++ b/config_parse.py @@ -5,51 +5,78 @@ import re import os -class ConfigParser: +class FceuxConfigParser: def __init__(self, filename): try: - f = open(filename, "rw"); + f = open(filename, "r+") except: print "Can't open config." - self.f = f + self.fn = filename + def _open(self): + try: + self.f = open(self.fn, "r+") + return 1 + except: + print "Can't open config." + return 0 + + def _close(self): + self.f.close() + + + def readKey(self, keyname): - self.f.seek(0) - # do some lines + self._open() + # do some lines while 1: line = self.f.readline() if line == 0: break if re.search(keyname, line): + self._close() return line # key not found + self._close() return 0 def writeKey(self, keyname, value): - self.f.seek(0) + self._open() cursor = 0 # find the key while 1: - line = self.f.readline() - if line == 0: + key = self.f.read(keyname.__len__()) + if key == "": return 0 - if re.search(keyname, line): - cursor = self.f.tell() + if key == keyname: + print key break - - newline = line.split('=')[0] + '=' + str(value) - self.f.seek(os.SEEK_CUR, -line.split('=')[0].__len__) + else: + self.f.readline() + # move back until we find a = + #while self.f.read(1) != '=': + # self.f.seek(1, -2) - + print self.f.read(3) + + self.f.write(value) + + self._close() + + + def close(self): + self.f.close() + print "hey" - -cp = ConfigParser("/home/lukas/.fceultra/fceu.cfg") -cp.writeKey("Fullscreen", 1) -#print cp.readKey("Fullscreen") +cp = FceuxConfigParser("/home/lukas/.fceux/fceux.cfg") +cp.writeKey("SDL.Fullscreen", "1") + + + From ab899d720eba97faae37ef5346ab68403903e6fd Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 2 Dec 2008 19:31:04 +0000 Subject: [PATCH 59/94] config parser now works a lot better --- config_parse.py | 59 ++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/config_parse.py b/config_parse.py index 9899d475..4fae7eaf 100755 --- a/config_parse.py +++ b/config_parse.py @@ -1,29 +1,22 @@ #!/usr/bin/env python #TODO: fix writing +#TODO import re import os class FceuxConfigParser: def __init__(self, filename): - try: - f = open(filename, "r+") - except: - print "Can't open config." - self.fn = filename def _open(self): try: - self.f = open(self.fn, "r+") + self.f = open(self.fn, "r") return 1 except: print "Can't open config." return 0 - - def _close(self): - self.f.close() @@ -39,41 +32,51 @@ class FceuxConfigParser: return line # key not found - self._close() + self.f.close() return 0 def writeKey(self, keyname, value): self._open() + buf = "" + cursor = 0 # find the key while 1: - key = self.f.read(keyname.__len__()) - if key == "": + data = self.f.read(keyname.__len__()) + buf += data + if data == "": return 0 - if key == keyname: - print key + if data == keyname: break else: - self.f.readline() - # move back until we find a = - #while self.f.read(1) != '=': - # self.f.seek(1, -2) + buf += self.f.readline() + print value + + buf += self.f.read(3) - print self.f.read(3) + buf += str(value) + buf += '\n' + + # ignore the rest of the old line + self.f.readline() + + # read the rest of the file + while 1: + data = self.f.readline() + if data == "": + break + buf += data - self.f.write(value) - - self._close() + self.f.close() + + # write the buffer to the config file + self.f = open(self.fn, 'w') + self.f.write(buf) + self.f.close() - def close(self): - self.f.close() - print "hey" - -cp = FceuxConfigParser("/home/lukas/.fceux/fceux.cfg") -cp.writeKey("SDL.Fullscreen", "1") From b0d4eb70358f7a83d24c9b8d3cc2283e9e5c97fb Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 2 Dec 2008 20:40:23 +0000 Subject: [PATCH 60/94] initiual GUI for gamepad config (currently only works with keyboards, joystick support to come) --- ChangeLog | 1 + gfceux | 26 ++++--- gfceux.glade | 213 ++++++++++++++++++++++++++------------------------- gfceux.xml | 209 +++++++++++++++++++++++++------------------------- 4 files changed, 231 insertions(+), 218 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6cf928f2..fe068a12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* Added initial support for a graphical UI for configuring gamepads * Moved gfceu options data file into .fceux instead of .fceultra ================= version 2.0.3 ================================= * Updated UI slightly. Moved sound and advanced tabs; made autoscaling diff --git a/gfceux b/gfceux index 26515ab7..9253f8fd 100755 --- a/gfceux +++ b/gfceux @@ -29,6 +29,8 @@ import os import pickle import shutil from optparse import OptionParser +from config_parse import FceuxConfigParser +from get_key import KeyGrabber #from subprocess import Popen try: @@ -210,6 +212,7 @@ def find_binary(file): # # # # # # # # # # # # # # # # # # Globals options = None +configfile = os.getenv('HOME') + '/.fceux/fceux.cfg' optionsfile = os.getenv('HOME') + '/.fceux/gfceux_options.dat' widgets = None @@ -291,6 +294,7 @@ class GfceuxApp: self.print_error("Couldn't load the UI data.", 24) widgets.get_object("main_window").show_all() + def launch(self, rom_name, local=False): global options @@ -546,22 +550,16 @@ class GfceuxApp: # fix this global its ugly gamepad_config = "0" - def gamepad_clicked_new(self, widget, data=None): + def gamepad_clicked(self, widget, data=None): widgets.get_object("gamepad_config_window").show_all() + d = {'gp1_button' : "0", 'gp2_button' : "1", 'gp3_button' : "2", 'gp4_button' : "3"} self.gamepad_config = d[widget.name] - def right_button_clicked(self, widget, data=None): - print "right!" - def left_button_clicked(self, widget, data=None): - print "left!" - def down_button_clicked(self, widget, data=None): - print "down!" - def up_button_clicked(self, widget, data=None): - print "up!" + def button_clicked(self, widget, data=None): d = {'right_button' : "SDL.Input.GamePad." + self.gamepad_config + "Right", 'left_button' : "SDL.Input.GamePad." + self.gamepad_config + "Left", @@ -571,10 +569,14 @@ class GfceuxApp: 'start_button' : "SDL.Input.GamePad." + self.gamepad_config + "Start", 'a_button' : "SDL.Input.GamePad." + self.gamepad_config + "A", 'b_button' : "SDL.Input.GamePad." + self.gamepad_config + "B"} + kg = KeyGrabber() + key = kg.get_key() + cp = FceuxConfigParser(configfile) + cp.writeKey(d[widget.name], key) print d[widget.name] - def gamepad_clicked(self, widget, data=None): + def gamepad_clicked_old(self, widget, data=None): d = {'gp1_button' : '1', 'gp2_button' : '2', @@ -582,6 +584,10 @@ class GfceuxApp: 'gp4_button' : '4'} command = '-inputcfg gamepad' + d[widget.name] + ' /dev/null' self.launch(command, True) + + def gamepad_window_close(self, widget, data=None): + widgets.get_object("gamepad_config_window").hide() + return True def config_help_button_clicked(self, menuitem, data=None): msgbox = gtk.MessageDialog(parent=None, flags=0, diff --git a/gfceux.glade b/gfceux.glade index fd6c5fc0..f97cf66e 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,8 +1,11 @@ - + + + + True @@ -36,17 +39,29 @@ - + True True True - Right + Up + 0 + + + + 1 + 2 + + + + + True + True + True + Left 0 - 2 - 3 1 2 @@ -68,33 +83,21 @@ - + True True True - Left + Right 0 + 2 + 3 1 2 - - - True - True - True - Up - 0 - - - - 1 - 2 - - @@ -446,30 +449,17 @@ 5 5 - + True True - Gamepad _1 + Gamepad _3 True 0 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 + 1 + 2 @@ -491,17 +481,30 @@ - + True True - Gamepad _3 + Gamepad _2 True 0 - + + + + 1 + 2 + + + + + + True + True + Gamepad _1 + True + 0 + - 1 - 2 @@ -995,26 +998,15 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -1032,15 +1024,26 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -1091,13 +1094,54 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 3 5 - + True True + 4046 1 65536 1 10 10 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -1117,54 +1161,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - 4046 1 65536 1 10 10 - 1 1 2 - 1 - 2 diff --git a/gfceux.xml b/gfceux.xml index b6be8ccd..c8ff013e 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -34,6 +34,9 @@ 4046 + + + True @@ -67,16 +70,27 @@ - + True True True - Right + Up + + + + 1 + 2 + + + + + True + True + True + Left - 2 - 3 1 2 @@ -97,31 +111,20 @@ - + True True True - Left + Right + 2 + 3 1 2 - - - True - True - True - Up - - - - 1 - 2 - - @@ -456,28 +459,16 @@ 5 5 - + True True - Gamepad _1 + Gamepad _3 True - - - - - - True - True - Gamepad _2 - True - - - - 1 - 2 + 1 + 2 @@ -498,16 +489,28 @@ - + True True - Gamepad _3 + Gamepad _2 True - + + + + 1 + 2 + + + + + + True + True + Gamepad _1 + True + - 1 - 2 @@ -978,26 +981,15 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -1015,15 +1007,26 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -1073,13 +1076,54 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 3 5 - + True True + adjustment4 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -1099,54 +1143,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - adjustment4 - 1 1 2 - 1 - 2 From a006cb249a263e95c8875b9caf51ca82fb126c7d Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 07:00:09 +0000 Subject: [PATCH 61/94] changed coding style to 4 spaces for indent (from 2). note to self: never use two spaces again its impossible to read --- gfceux | 938 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 466 insertions(+), 472 deletions(-) diff --git a/gfceux b/gfceux index 9253f8fd..9a5a946e 100755 --- a/gfceux +++ b/gfceux @@ -34,179 +34,179 @@ from get_key import KeyGrabber #from subprocess import Popen try: - import pygtk - pygtk.require("2.0") - import gtk + import pygtk + pygtk.require("2.0") + import gtk except ImportError: - print "The PyGTK libraries cannot be found.\n\ - Ensure that PyGTK (>=2.12) is installed on this system.\n\ - On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install python-gtk2 libgtk2.0-0" + print "The PyGTK libraries cannot be found.\n\ + Ensure that PyGTK (>=2.12) is installed on this system.\n\ + On Debian based systems (like Ubuntu), try this command:\n\ + sudo apt-get install python-gtk2 libgtk2.0-0" class GameOptions: - # sound - sound_check = True - soundq_check = True - soundrate_entry = "11000" - soundbufsize_entry = "48" + # sound + sound_check = True + soundq_check = True + soundrate_entry = "11000" + soundbufsize_entry = "48" - # video - fullscreen_check = False - xscale_spin = 2 - yscale_spin = 2 - bpp_combo = 32 + # video + fullscreen_check = False + xscale_spin = 2 + yscale_spin = 2 + bpp_combo = 32 - opengl_check = False - autoscale_check = True + opengl_check = False + autoscale_check = True - # main - extra_entry = '' - romfile = '' - moviefile = '' - luafile = '' - - - # network - join_radio = False - join_add = '' - join_port = 4046 - join_pass = '' - host_radio = False - host_port = 4046 - host_pass = '' - no_network_radio = True + # main + extra_entry = '' + romfile = '' + moviefile = '' + luafile = '' + + # network + join_radio = False + join_add = '' + join_port = 4046 + join_pass = '' + host_radio = False + host_port = 4046 + host_pass = '' + no_network_radio = True + def load_options(): - global options, optionsfile - try: - ifile = file(optionsfile, 'r') - options = pickle.load(ifile) - pickle.load(ifile) - except: - return - ifile.close() + global options, optionsfile + try: + ifile = file(optionsfile, 'r') + options = pickle.load(ifile) + pickle.load(ifile) + except: + return + ifile.close() def save_options(): - global options, optionsfile - if os.path.exists(os.path.dirname(optionsfile)) == 0: - os.mkdir(os.path.dirname(optionsfile)) - ofile = open(optionsfile, 'w') - pickle.dump(options, ofile) - ofile.close() + global options, optionsfile + if os.path.exists(os.path.dirname(optionsfile)) == 0: + os.mkdir(os.path.dirname(optionsfile)) + ofile = open(optionsfile, 'w') + pickle.dump(options, ofile) + ofile.close() def give_widgets(): - """ - give_widgets() - - This function takes data from the options struct and relays it to - the GTK window - """ - global options, widgets - try: - widgets.get_object("rom_entry").set_text(options.romfile) - widgets.get_object("movie_entry").set_text(options.moviefile) - widgets.get_object("lua_entry").set_text(options.luafile) + """ + give_widgets() - # sound - widgets.get_object("sound_check").set_active(options.sound_check) - widgets.get_object("soundq_check").set_active(options.soundq_check) - widgets.get_object("soundrate_entry").set_text(options.soundrate_entry) - widgets.get_object("soundbufsize_entry").set_text(options.soundbufsize_entry) + This function takes data from the options struct and relays it to + the GTK window + """ + global options, widgets + try: + widgets.get_object("rom_entry").set_text(options.romfile) + widgets.get_object("movie_entry").set_text(options.moviefile) + widgets.get_object("lua_entry").set_text(options.luafile) - # video - widgets.get_object("fullscreen_check").set_active(options.fullscreen_check) - widgets.get_object("opengl_check").set_active(options.opengl_check) - widgets.get_object("autoscale_check").set_active(options.autoscale_check) - # set/unset sensitivity on manual scaling - if widgets.get_object("autoscale_check").get_active(): - widgets.get_object("scaling_frame").set_sensitive(False) - else: - widgets.get_object("scaling_frame").set_sensitive(True) - widgets.get_object("xscale_spin").set_value(options.xscale_spin) - widgets.get_object("yscale_spin").set_value(options.yscale_spin) + # sound + widgets.get_object("sound_check").set_active(options.sound_check) + widgets.get_object("soundq_check").set_active(options.soundq_check) + widgets.get_object("soundrate_entry").set_text(options.soundrate_entry) + widgets.get_object("soundbufsize_entry").set_text(options.soundbufsize_entry) - widgets.get_object("extra_entry").set_text(options.extra_entry) + # video + widgets.get_object("fullscreen_check").set_active(options.fullscreen_check) + widgets.get_object("opengl_check").set_active(options.opengl_check) + widgets.get_object("autoscale_check").set_active(options.autoscale_check) - # Usability point: - # Users will probably not want to remember their previous network setting. - # Users may accidently be connecting to a remote server/hosting a game when - # they were unaware. - # No network is being set by default - widgets.get_object("no_network_radio").set_active(True) - widgets.get_object("join_add").set_text(options.join_add) - widgets.get_object("join_port").set_value(float(options.join_port)) - widgets.get_object("join_pass").set_text(options.join_pass) - widgets.get_object("host_port").set_value(float(options.host_port)) - widgets.get_object("host_pass").set_text(options.host_pass) + # set/unset sensitivity on manual scaling + # TODO: idk if i like this really + #if widgets.get_object("autoscale_check").get_active(): + # widgets.get_object("scaling_frame").set_sensitive(False) + #else: + # widgets.get_object("scaling_frame").set_sensitive(True) + widgets.get_object("xscale_spin").set_value(options.xscale_spin) + widgets.get_object("yscale_spin").set_value(options.yscale_spin) + + widgets.get_object("extra_entry").set_text(options.extra_entry) + + # Usability point: + # Users will probably not want to remember their previous network setting. + # Users may accidently be connecting to a remote server/hosting a game when + # they were unaware. + # No network is being set by default + widgets.get_object("no_network_radio").set_active(True) + widgets.get_object("join_add").set_text(options.join_add) + widgets.get_object("join_port").set_value(float(options.join_port)) + widgets.get_object("join_pass").set_text(options.join_pass) + widgets.get_object("host_port").set_value(float(options.host_port)) + widgets.get_object("host_pass").set_text(options.host_pass) - except AttributeError: - # When new widgets are added, old pickle files might break. - options = GameOptions() - give_widgets() + except AttributeError: + # When new widgets are added, old pickle files might break. + options = GameOptions() + give_widgets() def set_options(): - """ - set_options() + """ + set_options() - This function grabs all of the data from the GTK widgets - and stores it in the options object. - """ - options.romfile = widgets.get_object("rom_entry").get_text() - options.moviefile = widgets.get_object("movie_entry").get_text() - options.luafile = widgets.get_object("lua_entry").get_text() + This function grabs all of the data from the GTK widgets + and stores it in the options object. + """ + options.romfile = widgets.get_object("rom_entry").get_text() + options.moviefile = widgets.get_object("movie_entry").get_text() + options.luafile = widgets.get_object("lua_entry").get_text() - # sound - options.sound_check = widgets.get_object("sound_check").get_active() - options.soundq_check = widgets.get_object("soundq_check").get_active() - options.soundrate_entry = widgets.get_object("soundrate_entry").get_text() - options.soundbufsize_entry = widgets.get_object("soundbufsize_entry").get_text() + # sound + options.sound_check = widgets.get_object("sound_check").get_active() + options.soundq_check = widgets.get_object("soundq_check").get_active() + options.soundrate_entry = widgets.get_object("soundrate_entry").get_text() + options.soundbufsize_entry = widgets.get_object("soundbufsize_entry").get_text() - # video - options.fullscreen_check = widgets.get_object("fullscreen_check").get_active() - options.opengl_check = widgets.get_object("opengl_check").get_active() - options.autoscale_check = widgets.get_object("autoscale_check").get_active() + # video + options.fullscreen_check = widgets.get_object("fullscreen_check").get_active() + options.opengl_check = widgets.get_object("opengl_check").get_active() + options.autoscale_check = widgets.get_object("autoscale_check").get_active() - options.xscale_spin = widgets.get_object("xscale_spin").get_value() - options.yscale_spin = widgets.get_object("yscale_spin").get_value() + options.xscale_spin = widgets.get_object("xscale_spin").get_value() + options.yscale_spin = widgets.get_object("yscale_spin").get_value() - options.extra_entry = widgets.get_object("extra_entry").get_text() + options.extra_entry = widgets.get_object("extra_entry").get_text() - options.join_radio = widgets.get_object("join_radio").get_active() - options.host_radio = widgets.get_object("host_radio").get_active() - options.no_network_radio = widgets.get_object("no_network_radio").get_active() - options.join_add = widgets.get_object("join_add").get_text() - options.join_port = int(widgets.get_object("join_port").get_value()) - options.join_pass = widgets.get_object("join_pass").get_text() - options.host_port = widgets.get_object("host_port").get_value() - options.host_pass = widgets.get_object("host_pass").get_text() + options.join_radio = widgets.get_object("join_radio").get_active() + options.host_radio = widgets.get_object("host_radio").get_active() + options.no_network_radio = widgets.get_object("no_network_radio").get_active() + options.join_add = widgets.get_object("join_add").get_text() + options.join_port = int(widgets.get_object("join_port").get_value()) + options.join_pass = widgets.get_object("join_pass").get_text() + options.host_port = widgets.get_object("host_port").get_value() + options.host_pass = widgets.get_object("host_pass").get_text() def find_binary(file): - # first check the script directory - if os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]),file)): - return os.path.join(os.path.dirname(sys.argv[0]), file) + # first check the script directory + if os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]),file)): + return os.path.join(os.path.dirname(sys.argv[0]), file) - # if not in the script directory, check the $PATH - path = os.getenv('PATH') - directories= [] - directory = '' - # check for '$' so last entry is processed - for x in path + '$': - if x != ':' and x != '$': - directory = directory + x - else: - directories.append(directory) - directory = '' + # if not in the script directory, check the $PATH + path = os.getenv('PATH') + directories= [] + directory = '' + # check for '$' so last entry is processed + for x in path + '$': + if x != ':' and x != '$': + directory = directory + x + else: + directories.append(directory) + directory = '' - for x in directories: - if os.path.isfile(os.path.join(x, file)): - return os.path.join(x,file) + for x in directories: + if os.path.isfile(os.path.join(x, file)): + return os.path.join(x,file) - - - return None + return None # # # # # # # # # # # # # # # # # @@ -217,170 +217,167 @@ optionsfile = os.getenv('HOME') + '/.fceux/gfceux_options.dat' widgets = None class GfceuxApp: - def __init__(self): - self.fceux_binary = self.find_fceux() - self.load_ui() + def __init__(self): + self.fceux_binary = self.find_fceux() + self.load_ui() - options = GameOptions() - load_options() - give_widgets() - try: - gtk.main() - except KeyboardInterrupt: - sys.exit(0) + options = GameOptions() + load_options() + give_widgets() + try: + gtk.main() + except KeyboardInterrupt: + sys.exit(0) - def msg(self, text, use_gtk=False): - """ - GfceuApp.msg() + def msg(self, text, use_gtk=False): + """ + GfceuApp.msg() - This function prints messages to the user. This is generally used for status - messages. If a GTK message_box is requried, the use_gtk flag can be enabled. - """ - print text - if use_gtk: - msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, - buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(text) - msgbox.run() - msgbox.destroy() + This function prints messages to the user. This is generally used for status + messages. If a GTK message_box is requried, the use_gtk flag can be enabled. + """ + print text + if use_gtk: + msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, + buttons=gtk.BUTTONS_CLOSE) + msgbox.set_markup(text) + msgbox.run() + msgbox.destroy() - def print_error(self, message, code, use_gtk=True, fatal=True): - """ - GfceuApp.print_error() + def print_error(self, message, code, use_gtk=True, fatal=True): + """ + GfceuApp.print_error() - Presents the user with an error message and optionally quits the program. - """ - print title + ' error code '+str(code)+': ' + message - if use_gtk: - msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, - buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(title + ' ERROR Code '+str(code)+':\n'+message) - msgbox.run() - msgbox.destroy() - if fatal: - sys.exit(code) + Presents the user with an error message and optionally quits the program. + """ + print title + ' error code '+str(code)+': ' + message + if use_gtk: + msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, + buttons=gtk.BUTTONS_CLOSE) + msgbox.set_markup(title + ' ERROR Code '+str(code)+':\n'+message) + msgbox.run() + msgbox.destroy() + if fatal: + sys.exit(code) - def find_fceux(self): - bin = find_binary('fceux') - if bin == None: - self.print_error('Could not find the fceux binary.\n\ - Ensure that fceux is installed and in the $PATH.\n', 4, True) - else: - self.msg('Using: ' + bin) + def find_fceux(self): + bin = find_binary('fceux') + if bin == None: + self.print_error('Could not find the fceux binary.\n\ + Ensure that fceux is installed and in the $PATH.\n', 4, True) + else: + self.msg('Using: ' + bin) - return bin + return bin - def load_ui(self): - global widgets - """ Search for the glade XML file and load it """ - # Check first in the directory of this script. - if os.path.isfile('gfceux.xml'): - glade_file = 'gfceux.xml' - # Then check to see if its installed on a *nix system - elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml')): - glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml') - else: - print 'ERROR.' - print 'Could not find the ' + glade_file + ' file.' - print 'Try reinstalling the application.' - sys.exit(1) + def load_ui(self): + global widgets + """ Search for the glade XML file and load it """ + # Check first in the directory of this script. + if os.path.isfile('gfceux.xml'): + glade_file = 'gfceux.xml' + # Then check to see if its installed on a *nix system + elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml')): + glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml') + else: + print 'ERROR.' + print 'Could not find the ' + glade_file + ' file.' + print 'Try reinstalling the application.' + sys.exit(1) - try: - print "Using: " + glade_file - widgets = gtk.Builder() - widgets.add_from_file(glade_file) - widgets.connect_signals(self) - except: - self.print_error("Couldn't load the UI data.", 24) + try: + print "Using: " + glade_file + widgets = gtk.Builder() + widgets.add_from_file(glade_file) + widgets.connect_signals(self) + except: + self.print_error("Couldn't load the UI data.", 24) - widgets.get_object("main_window").show_all() + widgets.get_object("main_window").show_all() - def launch(self, rom_name, local=False): - global options - set_options() + def launch(self, rom_name, local=False): + global options + set_options() - sound_options = '' + sound_options = '' - if options.sound_check: - sound_options += '--sound 1 ' - else: - sound_options += '--sound 0 ' + if options.sound_check: + sound_options += '--sound 1 ' + else: + sound_options += '--sound 0 ' - if options.soundq_check: - sound_options += '--soundq 1 ' - else: - sound_options += '--soundq 0 ' + if options.soundq_check: + sound_options += '--soundq 1 ' + else: + sound_options += '--soundq 0 ' - if options.soundrate_entry: - sound_options += '--soundrate ' + options.soundrate_entry + ' ' + if options.soundrate_entry: + sound_options += '--soundrate ' + options.soundrate_entry + ' ' - if options.soundbufsize_entry: - sound_options += '--soundbufsize ' + options.soundbufsize_entry + ' ' + if options.soundbufsize_entry: + sound_options += '--soundbufsize ' + options.soundbufsize_entry + ' ' - # video - video_options = '' - if options.fullscreen_check: - video_options += '--fullscreen 1 ' - else: - video_options += '--fullscreen 0 ' + # video + video_options = '' + if options.fullscreen_check: + video_options += '--fullscreen 1 ' + else: + video_options += '--fullscreen 0 ' - if options.opengl_check: - video_options += '--opengl 1 ' - else: - video_options += '--opengl 0 ' + if options.opengl_check: + video_options += '--opengl 1 ' + else: + video_options += '--opengl 0 ' - if options.autoscale_check: - video_options += '--autoscale 1 ' - else: - video_options += '--autoscale 0 ' + if options.autoscale_check: + video_options += '--autoscale 1 ' + else: + video_options += '--autoscale 0 ' - video_options += ' --xscale ' + str(options.xscale_spin) - video_options += ' --yscale ' + str(options.yscale_spin) - video_options += ' ' + video_options += ' --xscale ' + str(options.xscale_spin) + video_options += ' --yscale ' + str(options.yscale_spin) + video_options += ' ' - # lua/movie - other_options = '' - if options.luafile: - other_options += '--loadlua ' + options.luafile + ' ' - if options.moviefile: - other_options += '--playmov ' + options.moviefile + ' ' + # lua/movie + other_options = '' + if options.luafile: + other_options += '--loadlua ' + options.luafile + ' ' + if options.moviefile: + other_options += '--playmov ' + options.moviefile + ' ' - # Netplay is fucked right now + # Netplay is fucked right now + if options.join_radio: + if options.join_pass == '': + netpass = '' + else: + netpass = '--pass ' + options.join_pass + network = '--net ' + options.join_add +\ + ' --port '+ str(options.join_port) + ' ' + netpass + else: + network = '' - if options.join_radio: - if options.join_pass == '': - netpass = '' - else: - netpass = '--pass ' + options.join_pass - network = '--net ' + options.join_add +\ - ' --port '+ str(options.join_port) + ' ' + netpass - else: - network = '' - - if options.host_radio: - """ - if options.host_pass == '': - netpass = ' ' - else: -# netpass = ' --pass ' + '"' + options.host_pass + '" ' - netpass = ' --pass ' + options.host_pass - network = '--net localhost --port '+\ - str(options.host_port) + netpass + ' ' - """ - network = '' + if options.host_radio: + """ + if options.host_pass == '': + netpass = ' ' + else: + netpass = ' --pass ' + '"' + options.host_pass + '" ' + network = '--net localhost --port '+\ + str(options.host_port) + netpass + ' '""" + network = '' - if local: - network = '' + if local: + network = '' - command = self.fceux_binary + ' ' + sound_options + video_options +\ - network + other_options + options.extra_entry + ' '+ rom_name - self.msg('Command: ' + command) + command = self.fceux_binary + ' ' + sound_options + video_options +\ + network + other_options + options.extra_entry + ' '+ rom_name + self.msg('Command: ' + command) - # more code to disable because netplay is fucked - """ + # more code to disable because netplay is fucked + """ if options.host_radio: xterm_binary = find_binary("xterm") if xterm_binary == None: @@ -395,173 +392,173 @@ class GfceuxApp: args.append("--password") args.append(options.host_pass) pid = Popen(args).pid - """ - widgets.get_object("main_window").hide() + """ + widgets.get_object("main_window").hide() - # os.system() is a blocker, so we must force - # gtk to process our events. - while gtk.events_pending(): - gtk.main_iteration_do() + # os.system() is a blocker, so we must force + # gtk to process our events. + while gtk.events_pending(): + gtk.main_iteration_do() - os.system(command) - widgets.get_object("main_window").show() + os.system(command) + widgets.get_object("main_window").show() - # another part of netplay code - """ - if options.host_radio: - os.kill(pid, 9) - """ - - ### Callbacks - def launch_button_clicked(self, arg1): - - global options - options.romfile = widgets.get_object("rom_entry").get_text() - if widgets.get_object("rom_entry").get_text() == '': - self.msg('Please specify a ROM to open in the main tab.', True) - return + # another part of netplay code + """ + if options.host_radio: + os.kill(pid, 9) + """ + + ### Callbacks + def launch_button_clicked(self, arg1): + global options + options.romfile = widgets.get_object("rom_entry").get_text() + if widgets.get_object("rom_entry").get_text() == '': + self.msg('Please specify a ROM to open in the main tab.', True) + return - self.launch('"'+ options.romfile +'"') + self.launch('"'+ options.romfile +'"') - def autoscale_check_toggled(self, menuitem, data=None): - if widgets.get_object("autoscale_check").get_active(): - widgets.get_object("scaling_frame").set_sensitive(False) - else: - widgets.get_object("scaling_frame").set_sensitive(True) + def autoscale_check_toggled(self, menuitem, data=None): + if widgets.get_object("autoscale_check").get_active(): + widgets.get_object("scaling_frame").set_sensitive(False) + else: + widgets.get_object("scaling_frame").set_sensitive(True) - def about_button_clicked(self, menuitem, data=None): - widgets.get_object("about_dialog").set_name('GFCE UltraX '+version) - widgets.get_object("about_dialog").run() - widgets.get_object("about_dialog").hide() + def about_button_clicked(self, menuitem, data=None): + widgets.get_object("about_dialog").set_name('GFCE UltraX '+version) + widgets.get_object("about_dialog").run() + widgets.get_object("about_dialog").hide() - def lua_browse_button_clicked(self, menuitem, data=None): - global options - set_options() - chooser = gtk.FileChooserDialog("Open...", None, - gtk.FILE_CHOOSER_ACTION_OPEN, + def lua_browse_button_clicked(self, menuitem, data=None): + global options + set_options() + chooser = gtk.FileChooserDialog("Open...", None, + gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - chooser.set_property("local-only", False) - chooser.set_default_response(gtk.RESPONSE_OK) + chooser.set_property("local-only", False) + chooser.set_default_response(gtk.RESPONSE_OK) - filter=gtk.FileFilter() - filter.set_name("Lua scripts") - filter.add_pattern("*.lua") - chooser.add_filter(filter) + filter=gtk.FileFilter() + filter.set_name("Lua scripts") + filter.add_pattern("*.lua") + chooser.add_filter(filter) - filter = gtk.FileFilter() - filter.set_name("All files") - filter.add_pattern("*") - chooser.add_filter(filter) + filter = gtk.FileFilter() + filter.set_name("All files") + filter.add_pattern("*") + chooser.add_filter(filter) - if options.luafile == '': - folder = os.getenv('HOME') - else: - folder = os.path.split(options.luafile)[0] + if options.luafile == '': + folder = os.getenv('HOME') + else: + folder = os.path.split(options.luafile)[0] - chooser.set_current_folder (folder) + chooser.set_current_folder (folder) - response = chooser.run() - chooser.hide() + response = chooser.run() + chooser.hide() - if response == gtk.RESPONSE_OK: - if chooser.get_filename(): - x = chooser.get_filename() - widgets.get_object("lua_entry").set_text(x) - options.luafile = x + if response == gtk.RESPONSE_OK: + if chooser.get_filename(): + x = chooser.get_filename() + widgets.get_object("lua_entry").set_text(x) + options.luafile = x - def movie_browse_button_clicked(self, menuitem, data=None): - global options - set_options() - chooser = gtk.FileChooserDialog("Open...", None, - gtk.FILE_CHOOSER_ACTION_OPEN, + def movie_browse_button_clicked(self, menuitem, data=None): + global options + set_options() + chooser = gtk.FileChooserDialog("Open...", None, + gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - chooser.set_property("local-only", False) - chooser.set_default_response(gtk.RESPONSE_OK) + chooser.set_property("local-only", False) + chooser.set_default_response(gtk.RESPONSE_OK) - filter=gtk.FileFilter() - filter.set_name("FM2 movies") - filter.add_pattern("*.fm2") - chooser.add_filter(filter) + filter=gtk.FileFilter() + filter.set_name("FM2 movies") + filter.add_pattern("*.fm2") + chooser.add_filter(filter) - filter = gtk.FileFilter() - filter.set_name("All files") - filter.add_pattern("*") - chooser.add_filter(filter) + filter = gtk.FileFilter() + filter.set_name("All files") + filter.add_pattern("*") + chooser.add_filter(filter) - if options.moviefile == '': - folder = os.getenv('HOME') - else: - folder = os.path.split(options.moviefile)[0] + if options.moviefile == '': + folder = os.getenv('HOME') + else: + folder = os.path.split(options.moviefile)[0] - chooser.set_current_folder (folder) + chooser.set_current_folder (folder) - response = chooser.run() - chooser.hide() + response = chooser.run() + chooser.hide() - if response == gtk.RESPONSE_OK: - if chooser.get_filename(): - x = chooser.get_filename() - widgets.get_object("movie_entry").set_text(x) - options.moviefile = x + if response == gtk.RESPONSE_OK: + if chooser.get_filename(): + x = chooser.get_filename() + widgets.get_object("movie_entry").set_text(x) + options.moviefile = x - def rom_browse_button_clicked(self, menuitem, data=None): - global options - set_options() - chooser = gtk.FileChooserDialog("Open...", None, - gtk.FILE_CHOOSER_ACTION_OPEN, + def rom_browse_button_clicked(self, menuitem, data=None): + global options + set_options() + chooser = gtk.FileChooserDialog("Open...", None, + gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - chooser.set_property("local-only", False) - chooser.set_default_response(gtk.RESPONSE_OK) + chooser.set_property("local-only", False) + chooser.set_default_response(gtk.RESPONSE_OK) - filter=gtk.FileFilter() - filter.set_name("NES Roms") - filter.add_mime_type("application/x-nes-rom") - filter.add_mime_type("application/zip") - filter.add_pattern("*.nes") - filter.add_pattern("*.zip") - chooser.add_filter(filter) + filter=gtk.FileFilter() + filter.set_name("NES Roms") + filter.add_mime_type("application/x-nes-rom") + filter.add_mime_type("application/zip") + filter.add_pattern("*.nes") + filter.add_pattern("*.zip") + chooser.add_filter(filter) - filter = gtk.FileFilter() - filter.set_name("All files") - filter.add_pattern("*") - chooser.add_filter(filter) + filter = gtk.FileFilter() + filter.set_name("All files") + filter.add_pattern("*") + chooser.add_filter(filter) - if options.romfile == '': - folder = os.getenv('HOME') - else: - folder = os.path.split(options.romfile)[0] + if options.romfile == '': + folder = os.getenv('HOME') + else: + folder = os.path.split(options.romfile)[0] - chooser.set_current_folder (folder) + chooser.set_current_folder (folder) - response = chooser.run() - chooser.hide() + response = chooser.run() + chooser.hide() - if response == gtk.RESPONSE_OK: - if chooser.get_filename(): - x = chooser.get_filename() - widgets.get_object("rom_entry").set_text(x) - # reset lua and movie entries on rom change - widgets.get_object("movie_entry").set_text("") - widgets.get_object("lua_entry").set_text("") - options.romfile = x - # fix this global its ugly - gamepad_config = "0" + if response == gtk.RESPONSE_OK: + if chooser.get_filename(): + x = chooser.get_filename() + widgets.get_object("rom_entry").set_text(x) + # reset lua and movie entries on rom change + widgets.get_object("movie_entry").set_text("") + widgets.get_object("lua_entry").set_text("") + options.romfile = x + + # fix this global its ugly + gamepad_config = "0" - def gamepad_clicked(self, widget, data=None): - widgets.get_object("gamepad_config_window").show_all() + def gamepad_clicked(self, widget, data=None): + widgets.get_object("gamepad_config_window").show_all() - d = {'gp1_button' : "0", - 'gp2_button' : "1", - 'gp3_button' : "2", - 'gp4_button' : "3"} - self.gamepad_config = d[widget.name] + d = {'gp1_button' : "0", + 'gp2_button' : "1", + 'gp3_button' : "2", + 'gp4_button' : "3"} + self.gamepad_config = d[widget.name] - def button_clicked(self, widget, data=None): - d = {'right_button' : "SDL.Input.GamePad." + self.gamepad_config + "Right", + def button_clicked(self, widget, data=None): + d = {'right_button' : "SDL.Input.GamePad." + self.gamepad_config + "Right", 'left_button' : "SDL.Input.GamePad." + self.gamepad_config + "Left", 'up_button' : "SDL.Input.GamePad." + self.gamepad_config + "Up", 'down_button' : "SDL.Input.GamePad." + self.gamepad_config + "Down", @@ -569,85 +566,82 @@ class GfceuxApp: 'start_button' : "SDL.Input.GamePad." + self.gamepad_config + "Start", 'a_button' : "SDL.Input.GamePad." + self.gamepad_config + "A", 'b_button' : "SDL.Input.GamePad." + self.gamepad_config + "B"} - kg = KeyGrabber() - key = kg.get_key() - cp = FceuxConfigParser(configfile) - cp.writeKey(d[widget.name], key) - print d[widget.name] + kg = KeyGrabber() + key = kg.get_key() + cp = FceuxConfigParser(configfile) + cp.writeKey(d[widget.name], key) - - def gamepad_clicked_old(self, widget, data=None): - - d = {'gp1_button' : '1', + def gamepad_clicked_old(self, widget, data=None): + d = {'gp1_button' : '1', 'gp2_button' : '2', 'gp3_button' : '3', 'gp4_button' : '4'} - command = '-inputcfg gamepad' + d[widget.name] + ' /dev/null' - self.launch(command, True) + command = '-inputcfg gamepad' + d[widget.name] + ' /dev/null' + self.launch(command, True) - def gamepad_window_close(self, widget, data=None): - widgets.get_object("gamepad_config_window").hide() - return True + def gamepad_window_close(self, widget, data=None): + widgets.get_object("gamepad_config_window").hide() + return True - def config_help_button_clicked(self, menuitem, data=None): - msgbox = gtk.MessageDialog(parent=None, flags=0, - type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup("Once a gamepad is seleceted, a titlebar will be displayed\ - indicating a NES button. Press the button or key you would like to have\ - associated with the button indicated on the titlebar. This process\ - will repeat until all buttons on the gamepad are configured.") - msgbox.run() - msgbox.hide() + def config_help_button_clicked(self, menuitem, data=None): + msgbox = gtk.MessageDialog(parent=None, flags=0, + type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE) + msgbox.set_markup("Once a gamepad is seleceted, a titlebar will be displayed\ + indicating a NES button. Press the button or key you would like to have\ + associated with the button indicated on the titlebar. This process\ + will repeat until all buttons on the gamepad are configured.") + msgbox.run() + msgbox.hide() - - def join_radio_clicked(self, menuitem, data=None): - global options - widgets.get_object("join_frame").set_sensitive(True) - widgets.get_object("host_frame").set_sensitive(False) - options.join_radio = True - options.host_radio = False - options.no_network_radio = False + def join_radio_clicked(self, menuitem, data=None): + global options + widgets.get_object("join_frame").set_sensitive(True) + widgets.get_object("host_frame").set_sensitive(False) + options.join_radio = True + options.host_radio = False + options.no_network_radio = False - def host_radio_clicked(self, menuitem, data=None): - if widgets.get_object("host_radio").get_active(): - self.server_binary = find_binary('fceu-server') + def host_radio_clicked(self, menuitem, data=None): + """ + this is broken in fceux right now + if widgets.get_object("host_radio").get_active(): + self.server_binary = find_binary('fceu-server') - if self.server_binary == None: - if os.name == 'nt': - self.print_error("The fceu server software cannot be found. \n\ - Ensure that it is installed in the same directory as \n\ - GFCE Ultra.", 102, True, False) + if self.server_binary == None: + if os.name == 'nt': + self.print_error("The fceu server software cannot be found. \n\ + Ensure that it is installed in the same directory as \n\ + GFCE Ultra.", 102, True, False) else: - self.print_error("The fceu server software cannot be found on \n\ - this system. Ensure that it is installed and in your path.", - 101, True, False) - widgets.get_object("no_network_radio").set_active(True) + self.print_error("The fceu server software cannot be found on \n\ + this system. Ensure that it is installed and in your path.", + 101, True, False) + widgets.get_object("no_network_radio").set_active(True) + options.no_network_radio = True + return False + + widgets.get_object("join_frame").set_sensitive(False) + widgets.get_object("host_frame").set_sensitive(True) + options.join_radio = False + options.host_radio = True + options.no_network_radio = False + """ + pass + + def no_network_radio_clicked(self, menuitem, data=None): + widgets.get_object("join_frame").set_sensitive(False) + widgets.get_object("host_frame").set_sensitive(False) + options.join_radio = False + options.host_radio = False options.no_network_radio = True - return False - - widgets.get_object("join_frame").set_sensitive(False) - widgets.get_object("host_frame").set_sensitive(True) - options.join_radio = False - options.host_radio = True - options.no_network_radio = False - - def no_network_radio_clicked(self, menuitem, data=None): - widgets.get_object("join_frame").set_sensitive(False) - widgets.get_object("host_frame").set_sensitive(False) - options.join_radio = False - options.host_radio = False - options.no_network_radio = True - def end(self, menuitem, data=None): - set_options() - save_options() - gtk.main_quit() - - + def end(self, menuitem, data=None): + set_options() + save_options() + gtk.main_quit() if __name__ == '__main__': - parser = OptionParser(version='%prog '+ version) - parser.parse_args() + parser = OptionParser(version='%prog '+ version) + parser.parse_args() - app = GfceuxApp() - + app = GfceuxApp() From 5eda05d2b41340cb85942f554e548ea4457962db Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 07:09:20 +0000 Subject: [PATCH 62/94] autogen a config file and directory if one doesn't exist --- gfceux | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gfceux b/gfceux index 9a5a946e..93302b56 100755 --- a/gfceux +++ b/gfceux @@ -220,6 +220,7 @@ class GfceuxApp: def __init__(self): self.fceux_binary = self.find_fceux() self.load_ui() + self.create_config() options = GameOptions() load_options() @@ -228,6 +229,11 @@ class GfceuxApp: gtk.main() except KeyboardInterrupt: sys.exit(0) + + def create_config(self): + if os.path.exists(configfile) == False: + # auto generate a default config by running fceux with no options + os.system(find_binary("fceux")) def msg(self, text, use_gtk=False): """ From 1fdb7396198544903b12e211184c88ae4f5d3736 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 07:37:43 +0000 Subject: [PATCH 63/94] turbo a and b support forr GUI --- ChangeLog | 1 + gfceux | 19 +++++++++------- gfceux.glade | 64 ++++++++++++++++++++++++++++++++++++++++------------ gfceux.xml | 58 +++++++++++++++++++++++++++++++++++++---------- 4 files changed, 108 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe068a12..541dfe17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* Turbo A and Turbo B support for gamepad GUI * Added initial support for a graphical UI for configuring gamepads * Moved gfceu options data file into .fceux instead of .fceultra ================= version 2.0.3 ================================= diff --git a/gfceux b/gfceux index 93302b56..281c82c6 100755 --- a/gfceux +++ b/gfceux @@ -564,14 +564,17 @@ class GfceuxApp: def button_clicked(self, widget, data=None): - d = {'right_button' : "SDL.Input.GamePad." + self.gamepad_config + "Right", - 'left_button' : "SDL.Input.GamePad." + self.gamepad_config + "Left", - 'up_button' : "SDL.Input.GamePad." + self.gamepad_config + "Up", - 'down_button' : "SDL.Input.GamePad." + self.gamepad_config + "Down", - 'select_button' : "SDL.Input.GamePad." + self.gamepad_config + "Select", - 'start_button' : "SDL.Input.GamePad." + self.gamepad_config + "Start", - 'a_button' : "SDL.Input.GamePad." + self.gamepad_config + "A", - 'b_button' : "SDL.Input.GamePad." + self.gamepad_config + "B"} + prefix = "SDL.Input.GamePad" + self.gamepad_config + d = {'right_button' : prefix + "Right", + 'left_button' : prefix + "Left", + 'up_button' : prefix + "Up", + 'down_button' : prefix + "Down", + 'select_button' : prefix + "Select", + 'start_button' : prefix + "Start", + 'a_button' : prefix + "A", + 'b_button' : prefix + "B", + 'turbo_a_button' : prefix + "TurboA", + 'turbo_b_button' : prefix + "TurboB"} kg = KeyGrabber() key = kg.get_key() cp = FceuxConfigParser(configfile) diff --git a/gfceux.glade b/gfceux.glade index f97cf66e..f06176aa 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + @@ -188,26 +188,62 @@ True 12 - + True - + True - True - True - B - 0 - + + + True + True + True + B + 0 + + + + + + True + True + True + A + 0 + + + + 1 + + - + True - True - True - A - 0 - + + + True + True + True + Turbo B + 0 + + + + + + True + True + True + Turbo A + 0 + + + + 1 + + 1 diff --git a/gfceux.xml b/gfceux.xml index c8ff013e..ccf2ffcf 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -207,24 +207,58 @@ True 12 - + True - + True - True - True - B - + + + True + True + True + B + + + + + + True + True + True + A + + + + 1 + + - + True - True - True - A - + + + True + True + True + Turbo B + + + + + + True + True + True + Turbo A + + + + 1 + + 1 From 78a310ba093d1457822a2f5589ea78ae78a1e8bf Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 08:18:29 +0000 Subject: [PATCH 64/94] shut up some glade warnings and also made pygame optional, but recommended. Pygame is required for the GUI of the gamepads. if pygame is not found, the old --inputcfg method is used. --- ChangeLog | 2 ++ INSTALL | 17 +++++++++++++---- get_key.py | 38 ++++++++++++++++++++------------------ gfceux | 36 +++++++++++++++++++----------------- gfceux.glade | 12 +++++++----- gfceux.xml | 12 +++++++----- 6 files changed, 68 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index 541dfe17..fb511563 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +* Cleaned up glade file to silence warnings +* Pygame is no longer required for gfceux to run, just for the input GUI * Turbo A and Turbo B support for gamepad GUI * Added initial support for a graphical UI for configuring gamepads * Moved gfceu options data file into .fceux instead of .fceultra diff --git a/INSTALL b/INSTALL index 54241d0b..1cffdc61 100644 --- a/INSTALL +++ b/INSTALL @@ -2,12 +2,21 @@ You can install gfceux with setup.py: $ sudo python setup.py install --prefix=/usr/local +TODO: 12/5/2008 - Work out build system with new modules. + You can change the prefix to whatever you like. Requirements: -Python (tested with 2.5); (Ubuntu package name: python) -PyGTK, and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) -FceuX 2.0 +Python (tested with 2.5); (Ubuntu package name: python) + NOTE: gfceux is not yet compatible with python 3.x +PyGTK and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) +Fceux 2.x + +Recommended dependencies +Pygame (Ubuntu package name: python-pygame) - This will allow graphical conifguraion of input + +NOTE: fceu 1.x is no longer supported in the gfceu 2.x series. + If you still want/need a front-end for gfceu use gfceu 0.x + -NOTE: fceu 1.x is no longer supported in the gfceu 2.x series. if you still want/need a front-end for gfceu use gfceu .7 diff --git a/get_key.py b/get_key.py index efbbb593..2f204d6e 100755 --- a/get_key.py +++ b/get_key.py @@ -1,25 +1,27 @@ -#!/usr/bin/env python -import pygame +#!/usr/bin/env python import sys -from pygame.locals import * - +try: + import pygame + from pygame.locals import * + has_pygame = True +except ImportError: + self.has_pygame = False class KeyGrabber: - """ KeyGrabber is a wrapper that gets an SDL key from the user using pygame """ - def __init__(self, width=300, height=100): - pygame.init() - screen = pygame.display.set_mode((width, height)) - pygame.display.set_caption("Press any key. . .") + """ KeyGrabber is a wrapper that gets an SDL key from the user using pygame """ + def __init__(self, width=300, height=100): + pygame.init() + screen = pygame.display.set_mode((width, height)) + pygame.display.set_caption("Press any key. . .") - def get_key(self): - while 1: - for event in pygame.event.get(): - if event.type == KEYDOWN: - #print event.key - pygame.display.quit() - return event.key + def get_key(self): + while 1: + for event in pygame.event.get(): + if event.type == KEYDOWN: + pygame.display.quit() + return event.key if __name__ == "__main__": - kg = KeyGrabber() - print kg.get_key() + kg = KeyGrabber() + print kg.get_key() diff --git a/gfceux b/gfceux index 281c82c6..158dc046 100755 --- a/gfceux +++ b/gfceux @@ -30,7 +30,7 @@ import pickle import shutil from optparse import OptionParser from config_parse import FceuxConfigParser -from get_key import KeyGrabber +import get_key #from subprocess import Popen try: @@ -551,20 +551,21 @@ class GfceuxApp: options.romfile = x # fix this global its ugly - gamepad_config = "0" + # specifies which NES gamepad we are configuring + gamepad_config_no = "0" def gamepad_clicked(self, widget, data=None): widgets.get_object("gamepad_config_window").show_all() - d = {'gp1_button' : "0", - 'gp2_button' : "1", - 'gp3_button' : "2", - 'gp4_button' : "3"} - self.gamepad_config = d[widget.name] + d = {'gp1_button' : "1", + 'gp2_button' : "2", + 'gp3_button' : "3", + 'gp4_button' : "4"} + self.gamepad_config_no = d[widget.name] def button_clicked(self, widget, data=None): - prefix = "SDL.Input.GamePad" + self.gamepad_config + prefix = "SDL.Input.GamePad" + self.gamepad_config_no d = {'right_button' : prefix + "Right", 'left_button' : prefix + "Left", 'up_button' : prefix + "Up", @@ -575,17 +576,18 @@ class GfceuxApp: 'b_button' : prefix + "B", 'turbo_a_button' : prefix + "TurboA", 'turbo_b_button' : prefix + "TurboB"} - kg = KeyGrabber() - key = kg.get_key() - cp = FceuxConfigParser(configfile) - cp.writeKey(d[widget.name], key) + + if get_key.has_pygame == False: + self.msg("Pygame could not be found on this system. Gfceux will revert to the old configuration routine.", True) + self.gamepad_clicked_old(widget) + else: + kg = get_key.KeyGrabber() + key = kg.get_key() + cp = FceuxConfigParser(configfile) + cp.writeKey(d[widget.name], key) def gamepad_clicked_old(self, widget, data=None): - d = {'gp1_button' : '1', - 'gp2_button' : '2', - 'gp3_button' : '3', - 'gp4_button' : '4'} - command = '-inputcfg gamepad' + d[widget.name] + ' /dev/null' + command = '--inputcfg gamepad' + self.gamepad_config_no self.launch(command, True) def gamepad_window_close(self, widget, data=None): diff --git a/gfceux.glade b/gfceux.glade index f06176aa..d1b10182 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + @@ -676,7 +676,8 @@ True True - 2 1 5 0.5 1 10 + 2 1 5 0.5 1 0 + 0.099999999776482579 1 True @@ -707,7 +708,8 @@ True True - 2 1 10 0.5 1 10 + 2 1 10 0.5 1 0 + 0.10000000000000001 1 True GTK_UPDATE_IF_VALID @@ -1050,7 +1052,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. True True - 4046 1 65536 1 10 10 + 4046 1 65536 1 10 0 1 @@ -1133,7 +1135,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. True True - 4046 1 65536 1 10 10 + 4046 1 65536 1 10 0 1 diff --git a/gfceux.xml b/gfceux.xml index ccf2ffcf..a558d860 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,12 +1,12 @@ - + 5 1 1 0.5 - 10 + 0 2 @@ -14,7 +14,7 @@ 1 1 0.5 - 10 + 0 2 @@ -22,7 +22,7 @@ 1 10 1 - 10 + 0 4046 @@ -30,7 +30,7 @@ 1 10 1 - 10 + 0 4046 @@ -673,6 +673,7 @@ True True adjustment1 + 0.099999999776482579 1 True @@ -704,6 +705,7 @@ True True adjustment2 + 0.10000000000000001 1 True GTK_UPDATE_IF_VALID From 589d939c67a7c0eb789848bf157b4834483d9967 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 08:44:43 +0000 Subject: [PATCH 65/94] UI cleanup and shit --- ChangeLog | 1 + TODO | 5 +- get_key.py | 4 + gfceux | 5 +- gfceux.glade | 489 ++++++++++++++++++++++++++------------------------- gfceux.xml | 449 +++++++++++++++++++++++----------------------- 6 files changed, 495 insertions(+), 458 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb511563..714b47fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* Updated UI, explains joystick support isn't complete yet in the GUI * Cleaned up glade file to silence warnings * Pygame is no longer required for gfceux to run, just for the input GUI * Turbo A and Turbo B support for gamepad GUI diff --git a/TODO b/TODO index af5ab2b7..6c0f209d 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,6 @@ -TODO: -* improve button config now that config system is resolved +TODO: +* joystick input support +* hotkey config * resolution * parse normal options (etc quiet) * Browser diff --git a/get_key.py b/get_key.py index 2f204d6e..0ce84401 100755 --- a/get_key.py +++ b/get_key.py @@ -20,6 +20,10 @@ class KeyGrabber: if event.type == KEYDOWN: pygame.display.quit() return event.key + # TODO: Make work with joystick. Do buttons first. + #if event.type == JOYBUTTONDOWN: + # pygame.display.quit() + # return event.joy, event.button if __name__ == "__main__": kg = KeyGrabber() diff --git a/gfceux b/gfceux index 158dc046..619ce1d5 100755 --- a/gfceux +++ b/gfceux @@ -597,10 +597,7 @@ class GfceuxApp: def config_help_button_clicked(self, menuitem, data=None): msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup("Once a gamepad is seleceted, a titlebar will be displayed\ - indicating a NES button. Press the button or key you would like to have\ - associated with the button indicated on the titlebar. This process\ - will repeat until all buttons on the gamepad are configured.") + msgbox.set_markup("You should be able to figure it out from here.") msgbox.run() msgbox.hide() diff --git a/gfceux.glade b/gfceux.glade index d1b10182..c54410f6 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,176 +1,283 @@ - + - + True - + True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - 3 - 3 - - - - - - - - - - - - - - - - - - True - True - True - Up - 0 - - - - 1 - 2 - - - - - True - True - True - Left - 0 - - - - 1 - 2 - - - - - True - True - True - Down - 0 - - - - 1 - 2 - 2 - 3 - - - - - True - True - True - Right - 0 - - - - 2 - 3 - 1 - 2 - - - - - - - - - True - <b>D-Pad</b> - True - - - label_item - - + <b>NOTE:</b> The below GUI is brand new and currently only works with keyboard input. To configure a joystick, use --inputcfg. + + True + True - - False - False - - + True - 0 - GTK_SHADOW_NONE - + True - 12 + 0 + GTK_SHADOW_NONE - + True + 12 - + True - True - True - Select - 0 - + 3 + 3 + + + + + + + + + + + + + + + + + + True + True + True + Right + 0 + + + + 2 + 3 + 1 + 2 + + + + + True + True + True + Down + 0 + + + + 1 + 2 + 2 + 3 + + + + + True + True + True + Left + 0 + + + + 1 + 2 + + + + + True + True + True + Up + 0 + + + + 1 + 2 + + - - False - False - - - - - True - True - True - Start - 0 - - - - False - False - 1 - - - - - - True - <b>Essentials</b> - True + + + True + <b>D-Pad</b> + True + + + label_item + + - label_item + False + False + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + True + Select + 0 + + + + False + False + + + + + True + True + True + Start + 0 + + + + False + False + 1 + + + + + + + + + True + <b>Essentials</b> + True + + + label_item + + + + + 1 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + + + True + True + True + B + 0 + + + + + + True + True + True + A + 0 + + + + 1 + + + + + + + True + + + True + True + True + Turbo B + 0 + + + + + + True + True + True + Turbo A + 0 + + + + 1 + + + + + 1 + + + + + + + + + True + <b>Alpha and Beta</b> + True + + + label_item + + + + + 2 @@ -178,96 +285,6 @@ 1 - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - - - True - - - True - True - True - B - 0 - - - - - - True - True - True - A - 0 - - - - 1 - - - - - - - True - - - True - True - True - Turbo B - 0 - - - - - - True - True - True - Turbo A - 0 - - - - 1 - - - - - 1 - - - - - - - - - True - <b>Alpha and Beta</b> - True - - - label_item - - - - - 2 - - diff --git a/gfceux.xml b/gfceux.xml index a558d860..91cc649a 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -38,248 +38,265 @@ - + True - + True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - 3 - 3 - - - - - - - - - - - - - - - - - - True - True - True - Up - - - - 1 - 2 - - - - - True - True - True - Left - - - - 1 - 2 - - - - - True - True - True - Down - - - - 1 - 2 - 2 - 3 - - - - - True - True - True - Right - - - - 2 - 3 - 1 - 2 - - - - - - - - - True - <b>D-Pad</b> - True - - + <b>NOTE:</b> The below GUI is brand new and currently only works with keyboard input. To configure a joystick, use --inputcfg. + + True + True - - False - False - - + True - 0 - GTK_SHADOW_NONE - + True - 12 + 0 + GTK_SHADOW_NONE - + True + 12 - + True - True - True - Select - + 3 + 3 + + + + + + + + + + + + + + + + + + True + True + True + Right + + + + 2 + 3 + 1 + 2 + + + + + True + True + True + Down + + + + 1 + 2 + 2 + 3 + + + + + True + True + True + Left + + + + 1 + 2 + + + + + True + True + True + Up + + + + 1 + 2 + + - - False - False - - - - - True - True - True - Start - - - - False - False - 1 - + + + True + <b>D-Pad</b> + True + + + + False + False + - - + + True - <b>Essentials</b> - True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + True + Select + + + + False + False + + + + + True + True + True + Start + + + + False + False + 1 + + + + + + + + + True + <b>Essentials</b> + True + + + + 1 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + + + True + True + True + B + + + + + + True + True + True + A + + + + 1 + + + + + + + True + + + True + True + True + Turbo B + + + + + + True + True + True + Turbo A + + + + 1 + + + + + 1 + + + + + + + + + True + <b>Alpha and Beta</b> + True + + + + + 2 + 1 - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - - - True - - - True - True - True - B - - - - - - True - True - True - A - - - - 1 - - - - - - - True - - - True - True - True - Turbo B - - - - - - True - True - True - Turbo A - - - - 1 - - - - - 1 - - - - - - - - - True - <b>Alpha and Beta</b> - True - - - - - 2 - - From ff1128bfe345e35ddc3c9903c0d2b40d64894ed5 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 09:02:00 +0000 Subject: [PATCH 66/94] gfceux stuff --- INSTALL | 4 ++-- TODO | 1 + setup.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/INSTALL b/INSTALL index 1cffdc61..7d146e38 100644 --- a/INSTALL +++ b/INSTALL @@ -2,10 +2,10 @@ You can install gfceux with setup.py: $ sudo python setup.py install --prefix=/usr/local -TODO: 12/5/2008 - Work out build system with new modules. - You can change the prefix to whatever you like. +FIXME - 12/5/2008 - You can only run gfceux out of its source folder. + Requirements: Python (tested with 2.5); (Ubuntu package name: python) NOTE: gfceux is not yet compatible with python 3.x diff --git a/TODO b/TODO index 6c0f209d..22086806 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,5 @@ TODO: +* update build scripts to refle * joystick input support * hotkey config * resolution diff --git a/setup.py b/setup.py index 2bf9e54a..4677784d 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python from distutils.core import setup setup(name="gfceux", - version="2.0.0", + version="2.0.4", scripts = ['gfceux'], data_files=[('share/gfceux/',['gfceux.xml', 'gfceux_big.png', 'gfceux.png']), ('share/pixmaps/', ['gfceux.png']), From 30bf6801601c0fa4e3f1483bad582916489ea6df Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 09:12:21 +0000 Subject: [PATCH 67/94] minorUI fixes / changes i didn't know what was good --- gfceux.glade | 217 ++++++++++++++++++++++++++------------------------- gfceux.xml | 213 +++++++++++++++++++++++++------------------------- 2 files changed, 216 insertions(+), 214 deletions(-) diff --git a/gfceux.glade b/gfceux.glade index c54410f6..16d84e69 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,8 +1,9 @@ - + + Gamepad Configuration @@ -51,17 +52,29 @@ - + True True True - Right + Up + 0 + + + + 1 + 2 + + + + + True + True + True + Left 0 - 2 - 3 1 2 @@ -83,33 +96,21 @@ - + True True True - Left + Right 0 + 2 + 3 1 2 - - - True - True - True - Up - 0 - - - - 1 - 2 - - @@ -502,17 +503,30 @@ 5 5 - + True True - Gamepad _3 + Gamepad _1 True 0 - 1 - 2 + + + + + + True + True + Gamepad _2 + True + 0 + + + + 1 + 2 @@ -534,30 +548,17 @@ - + True True - Gamepad _2 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True 0 + 1 + 2 @@ -1053,28 +1054,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - 4046 1 65536 1 10 0 - 1 - - - 1 - 2 + GTK_FILL @@ -1092,13 +1078,28 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True - 0 - Port: + True + 4046 1 65536 1 10 0 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -1149,54 +1150,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 3 5 - + True True - 4046 1 65536 1 10 0 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -1216,13 +1176,54 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + 4046 1 65536 1 10 0 + 1 1 2 + 1 + 2 diff --git a/gfceux.xml b/gfceux.xml index 91cc649a..64a926c4 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -34,6 +34,7 @@ 4046 + Gamepad Configuration @@ -82,16 +83,27 @@ - + True True True - Right + Up + + + + 1 + 2 + + + + + True + True + True + Left - 2 - 3 1 2 @@ -112,31 +124,20 @@ - + True True True - Left + Right + 2 + 3 1 2 - - - True - True - True - Up - - - - 1 - 2 - - @@ -510,16 +511,28 @@ 5 5 - + True True - Gamepad _3 + Gamepad _1 True - 1 - 2 + + + + + + True + True + Gamepad _2 + True + + + + 1 + 2 @@ -540,28 +553,16 @@ - + True True - Gamepad _2 - True - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True + 1 + 2 @@ -1034,28 +1035,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - adjustment3 - 1 - - - 1 - 2 + GTK_FILL @@ -1073,13 +1059,28 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True - 0 - Port: + True + adjustment3 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -1129,54 +1130,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 3 5 - + True True - adjustment4 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -1196,13 +1156,54 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + adjustment4 + 1 1 2 + 1 + 2 From ffaa490eb15a87fc641f0477db0de28c844333a1 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 10:19:18 +0000 Subject: [PATCH 68/94] updated about box UI --- ChangeLog | 2 + gfceux.glade | 238 ++++++++++++++++++++++++++++----------------------- gfceux.xml | 232 +++++++++++++++++++++++++++---------------------- 3 files changed, 262 insertions(+), 210 deletions(-) diff --git a/ChangeLog b/ChangeLog index 714b47fc..ce395083 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +================= version 2.0.4 ( yet to be released) ============ +* Udated about box UI * Updated UI, explains joystick support isn't complete yet in the GUI * Cleaned up glade file to silence warnings * Pygame is no longer required for gfceux to run, just for the input GUI diff --git a/gfceux.glade b/gfceux.glade index 16d84e69..b8af2201 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + Gamepad Configuration @@ -52,29 +52,17 @@ - + True True True - Up - 0 - - - - 1 - 2 - - - - - True - True - True - Left + Right 0 + 2 + 3 1 2 @@ -96,21 +84,33 @@ - + True True True - Right + Left 0 - 2 - 3 1 2 + + + True + True + True + Up + 0 + + + + 1 + 2 + + @@ -503,30 +503,17 @@ 5 5 - + True True - Gamepad _1 + Gamepad _3 True 0 - - - - - - True - True - Gamepad _2 - True - 0 - - - - 1 - 2 + 1 + 2 @@ -548,17 +535,30 @@ - + True True - Gamepad _3 + Gamepad _2 + True + 0 + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True 0 - 1 - 2 @@ -1054,26 +1054,15 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -1091,15 +1080,26 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -1150,13 +1150,54 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 3 5 - + True True + 4046 1 65536 1 10 0 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -1176,54 +1217,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - 4046 1 65536 1 10 0 - 1 1 2 - 1 - 2 @@ -1346,7 +1346,6 @@ Invalid options may cause GFCE UltraX to behave incorrectly. GDK_WINDOW_TYPE_HINT_NORMAL (C) Copyright 2008 A GTK2 front-end end for the fceux Nintendo Entertainment System emulator. - http://dietschnitzel.com/gfceu/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 @@ -1379,7 +1378,34 @@ Artwork for old versions (< 0.2.7): True - + + True + True + True + True + http://fceux.com + GTK_RELIEF_NONE + 0 + http://fceux.com + + + 3 + + + + + True + True + True + True + http://dietschnitzel.com/gfceu/ + GTK_RELIEF_NONE + 0 + http://dietschnitzel.com/gfceu/ + + + 4 + diff --git a/gfceux.xml b/gfceux.xml index 64a926c4..32232977 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -83,27 +83,16 @@ - + True True True - Up - - - - 1 - 2 - - - - - True - True - True - Left + Right + 2 + 3 1 2 @@ -124,20 +113,31 @@ - + True True True - Right + Left - 2 - 3 1 2 + + + True + True + True + Up + + + + 1 + 2 + + @@ -511,28 +511,16 @@ 5 5 - + True True - Gamepad _1 + Gamepad _3 True - - - - - - True - True - Gamepad _2 - True - - - - 1 - 2 + 1 + 2 @@ -553,16 +541,28 @@ - + True True - Gamepad _3 + Gamepad _2 + True + + + + 1 + 2 + + + + + + True + True + Gamepad _1 True - 1 - 2 @@ -1035,26 +1035,15 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 5 5 - + True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: + True + 1 + 2 1 2 - GTK_FILL @@ -1072,15 +1061,26 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True - True + 0 + Password: - 1 - 2 1 2 + GTK_FILL + + + + + + True + 0 + Port: + + + GTK_FILL @@ -1130,13 +1130,54 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 3 5 - + True True + adjustment4 + 1 1 2 + 1 + 2 + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Server Address: + + + GTK_FILL @@ -1156,54 +1197,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - + True True - adjustment4 - 1 1 2 - 1 - 2 @@ -1318,7 +1318,6 @@ Invalid options may cause GFCE UltraX to behave incorrectly. GDK_WINDOW_TYPE_HINT_NORMAL (C) Copyright 2008 A GTK2 front-end end for the fceux Nintendo Entertainment System emulator. - http://dietschnitzel.com/gfceu/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 @@ -1351,7 +1350,32 @@ Artwork for old versions (< 0.2.7): True - + + True + True + True + True + http://fceux.com + GTK_RELIEF_NONE + http://fceux.com + + + 3 + + + + + True + True + True + True + http://dietschnitzel.com/gfceu/ + GTK_RELIEF_NONE + http://dietschnitzel.com/gfceu/ + + + 4 + From c063fdaf99b59ca9dc294a4da0d5097d07e9d42b Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 17:37:01 +0000 Subject: [PATCH 69/94] documented and cleaned up the python fceux config parser --- ChangeLog | 1 + config_parse.py | 53 ++++++++++++++++++++++++++++++------------------- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce395083..07b94651 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ ================= version 2.0.4 ( yet to be released) ============ +* Documented and cleaned fceux config parser * Udated about box UI * Updated UI, explains joystick support isn't complete yet in the GUI * Cleaned up glade file to silence warnings diff --git a/config_parse.py b/config_parse.py index 4fae7eaf..5c5c29f6 100755 --- a/config_parse.py +++ b/config_parse.py @@ -1,7 +1,11 @@ #!/usr/bin/env python -#TODO: fix writing -#TODO +# config_parse.py +# This module handles the reading and writing of keys to the fceux +# config file. +# +# Lukas Sabota +# Licensed under the GPL import re import os @@ -10,18 +14,24 @@ class FceuxConfigParser: def __init__(self, filename): self.fn = filename - def _open(self): + def _open(self, mode): try: - self.f = open(self.fn, "r") + self.f = open(self.fn, mode) return 1 except: - print "Can't open config." + if mode == "r": + print "Can't open config for reading." + else: + print "Couldn't write to the config." return 0 def readKey(self, keyname): - self._open() + """ readKey() + reads a key from the configfile and returns the value + """ + self._open("r") # do some lines while 1: line = self.f.readline() @@ -33,10 +43,22 @@ class FceuxConfigParser: # key not found self.f.close() - return 0 - + return None + + def addKey(self, keyname, value=""): + """ addKey() + adds a key with a (optional) value to the config file. + """ + + self._open("a") + self.f.write(keyname + " = " + str(value)) + self.f.close() + def writeKey(self, keyname, value): - self._open() + """ writeKey() + modifies an existing key in the config file. + """ + self._open("r") buf = "" @@ -46,7 +68,7 @@ class FceuxConfigParser: data = self.f.read(keyname.__len__()) buf += data if data == "": - return 0 + return None if data == keyname: break else: @@ -72,16 +94,7 @@ class FceuxConfigParser: self.f.close() # write the buffer to the config file - self.f = open(self.fn, 'w') + self.f._open('w') self.f.write(buf) self.f.close() - - - - - - - - - From e2a63b110789d246d31c17f1403ef95d5bd9c501 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 17:41:27 +0000 Subject: [PATCH 70/94] initial joystick support for python keygrabber (shinydoofy i need your help to test this i dont have a joystick around) --- get_key.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/get_key.py b/get_key.py index 0ce84401..d7ba88ad 100755 --- a/get_key.py +++ b/get_key.py @@ -21,9 +21,12 @@ class KeyGrabber: pygame.display.quit() return event.key # TODO: Make work with joystick. Do buttons first. - #if event.type == JOYBUTTONDOWN: - # pygame.display.quit() - # return event.joy, event.button + if event.type == JOYBUTTONDOWN: + pygame.display.quit() + # TODO: Make sure we're returning the data we need + # for config file here. I'm not sure if this is + # the correct data. + return event.joy, event.button if __name__ == "__main__": kg = KeyGrabber() From 41c1a26b545b61cd63761e1c398bd2cb97a0239f Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 17:47:44 +0000 Subject: [PATCH 71/94] added some fresh ideas for gfceux --- TODO | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 22086806..3e6e9ded 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,8 @@ TODO: -* update build scripts to refle +* implement UI for --special (combo box) +* use combo box for bpp +* use combo box to select gamepad to configure, simply UI +* update build scripts to reflect new files * joystick input support * hotkey config * resolution From fb0220dbd712b78872918c1677c41e576fd86865 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 22:50:43 +0000 Subject: [PATCH 72/94] keygrabber now inits joystick subsystem in sdl --- get_key.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/get_key.py b/get_key.py index d7ba88ad..22831670 100755 --- a/get_key.py +++ b/get_key.py @@ -11,8 +11,12 @@ class KeyGrabber: """ KeyGrabber is a wrapper that gets an SDL key from the user using pygame """ def __init__(self, width=300, height=100): pygame.init() + pygame.joystick.init() + if pygame.joystick.get_count() > 0: + print "Joystick found!" screen = pygame.display.set_mode((width, height)) pygame.display.set_caption("Press any key. . .") + def get_key(self): while 1: From adefbb3069488ebedcd885001833c8974112d8fb Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 7 Dec 2008 15:28:20 +0000 Subject: [PATCH 73/94] initial joystick config support in gfceux --- ChangeLog | 1 + config_parse.py | 3 +- get_key.py | 11 ++- gfceux | 21 +++-- gfceux.glade | 218 ++++++++++++++++++++++++------------------------ gfceux.xml | 214 +++++++++++++++++++++++------------------------ 6 files changed, 242 insertions(+), 226 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07b94651..57d727ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ ================= version 2.0.4 ( yet to be released) ============ +* Initial joystick config support: supports buttons, but hot hats and axes * Documented and cleaned fceux config parser * Udated about box UI * Updated UI, explains joystick support isn't complete yet in the GUI diff --git a/config_parse.py b/config_parse.py index 5c5c29f6..d59e675d 100755 --- a/config_parse.py +++ b/config_parse.py @@ -68,6 +68,7 @@ class FceuxConfigParser: data = self.f.read(keyname.__len__()) buf += data if data == "": + print "key " + keyname + " not found" return None if data == keyname: break @@ -94,7 +95,7 @@ class FceuxConfigParser: self.f.close() # write the buffer to the config file - self.f._open('w') + self._open('w') self.f.write(buf) self.f.close() diff --git a/get_key.py b/get_key.py index 22831670..3547f2b8 100755 --- a/get_key.py +++ b/get_key.py @@ -14,6 +14,10 @@ class KeyGrabber: pygame.joystick.init() if pygame.joystick.get_count() > 0: print "Joystick found!" + for x in range(0, pygame.joystick.get_count()): + joy = pygame.joystick.Joystick(x) + joy.init() + print "joy " + str(x) + " initialized." screen = pygame.display.set_mode((width, height)) pygame.display.set_caption("Press any key. . .") @@ -23,14 +27,17 @@ class KeyGrabber: for event in pygame.event.get(): if event.type == KEYDOWN: pygame.display.quit() - return event.key + return ("Keyboard", event.key) # TODO: Make work with joystick. Do buttons first. if event.type == JOYBUTTONDOWN: pygame.display.quit() # TODO: Make sure we're returning the data we need # for config file here. I'm not sure if this is # the correct data. - return event.joy, event.button + return ("Joystick", event.button, event.joy) + #if event.type == JOYAXISMOTION: + # pygame.display.quit() + # return event.joy, event.axis, event.value if __name__ == "__main__": kg = KeyGrabber() diff --git a/gfceux b/gfceux index 619ce1d5..79906d89 100755 --- a/gfceux +++ b/gfceux @@ -557,15 +557,15 @@ class GfceuxApp: def gamepad_clicked(self, widget, data=None): widgets.get_object("gamepad_config_window").show_all() - d = {'gp1_button' : "1", - 'gp2_button' : "2", - 'gp3_button' : "3", - 'gp4_button' : "4"} + d = {'gp1_button' : "0", + 'gp2_button' : "1", + 'gp3_button' : "2", + 'gp4_button' : "3"} self.gamepad_config_no = d[widget.name] def button_clicked(self, widget, data=None): - prefix = "SDL.Input.GamePad" + self.gamepad_config_no + prefix = "SDL.Input.GamePad." + self.gamepad_config_no d = {'right_button' : prefix + "Right", 'left_button' : prefix + "Left", 'up_button' : prefix + "Up", @@ -582,9 +582,16 @@ class GfceuxApp: self.gamepad_clicked_old(widget) else: kg = get_key.KeyGrabber() - key = kg.get_key() + key_tuple = kg.get_key() cp = FceuxConfigParser(configfile) - cp.writeKey(d[widget.name], key) + cp.writeKey(prefix + "DeviceType", key_tuple[0]) + if key_tuple[0] == "Keyboard": + print key_tuple + cp.writeKey(d[widget.name], key_tuple[1]) + if key_tuple[0] == "Joystick": + print key_tuple + cp.writeKey(prefix + "DeviceNum", key_tuple[2]) + cp.writeKey(d[widget.name], key_tuple[1]) def gamepad_clicked_old(self, widget, data=None): command = '--inputcfg gamepad' + self.gamepad_config_no diff --git a/gfceux.glade b/gfceux.glade index b8af2201..016e1847 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + Gamepad Configuration @@ -13,7 +13,7 @@ True - <b>NOTE:</b> The below GUI is brand new and currently only works with keyboard input. To configure a joystick, use --inputcfg. + <b>NOTE:</b> The below GUI is brand new and joysticks are not completely support yet. To configure a joystick, use --inputcfg. True True @@ -52,17 +52,29 @@ - + True True True - Right + Up + 0 + + + + 1 + 2 + + + + + True + True + True + Left 0 - 2 - 3 1 2 @@ -84,33 +96,21 @@ - + True True True - Left + Right 0 + 2 + 3 1 2 - - - True - True - True - Up - 0 - - - - 1 - 2 - - @@ -503,17 +503,30 @@ 5 5 - + True True - Gamepad _3 + Gamepad _1 True 0 - 1 - 2 + + + + + + True + True + Gamepad _2 + True + 0 + + + + 1 + 2 @@ -535,30 +548,17 @@ - + True True - Gamepad _2 - True - 0 - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True 0 + 1 + 2 @@ -1054,28 +1054,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - 4046 1 65536 1 10 0 - 1 - - - 1 - 2 + GTK_FILL @@ -1093,13 +1078,28 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True - 0 - Port: + True + 4046 1 65536 1 10 0 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -1150,54 +1150,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 3 5 - + True True - 4046 1 65536 1 10 0 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -1217,13 +1176,54 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + 4046 1 65536 1 10 0 + 1 1 2 + 1 + 2 diff --git a/gfceux.xml b/gfceux.xml index 32232977..7e65b051 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -44,7 +44,7 @@ True - <b>NOTE:</b> The below GUI is brand new and currently only works with keyboard input. To configure a joystick, use --inputcfg. + <b>NOTE:</b> The below GUI is brand new and joysticks are not completely support yet. To configure a joystick, use --inputcfg. True True @@ -83,16 +83,27 @@ - + True True True - Right + Up + + + + 1 + 2 + + + + + True + True + True + Left - 2 - 3 1 2 @@ -113,31 +124,20 @@ - + True True True - Left + Right + 2 + 3 1 2 - - - True - True - True - Up - - - - 1 - 2 - - @@ -511,16 +511,28 @@ 5 5 - + True True - Gamepad _3 + Gamepad _1 True - 1 - 2 + + + + + + True + True + Gamepad _2 + True + + + + 1 + 2 @@ -541,28 +553,16 @@ - + True True - Gamepad _2 - True - - - - 1 - 2 - - - - - - True - True - Gamepad _1 + Gamepad _3 True + 1 + 2 @@ -1035,28 +1035,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 5 5 - + True - True + 0 + Port: - 1 - 2 - 1 - 2 - - - - - - True - True - adjustment3 - 1 - - - 1 - 2 + GTK_FILL @@ -1074,13 +1059,28 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True - 0 - Port: + True + adjustment3 + 1 - GTK_FILL + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 @@ -1130,54 +1130,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 3 5 - + True True - adjustment4 - 1 1 2 - 1 - 2 - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Server Address: - - - GTK_FILL @@ -1197,13 +1156,54 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + True True + adjustment4 + 1 1 2 + 1 + 2 From d7812c852a8675ad264fd1a2b5070e6d952f700a Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 19 Dec 2008 02:52:15 +0000 Subject: [PATCH 74/94] fixed indentation error in gfceux --- get_key.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/get_key.py b/get_key.py index 3547f2b8..f802f696 100755 --- a/get_key.py +++ b/get_key.py @@ -1,4 +1,11 @@ #!/usr/bin/env python +# get_key.py - an sdl keygrabber for gfceux +# Lukas Sabota +# December 2008 +# +# Licensed under the GPL +# + import sys try: import pygame @@ -13,28 +20,28 @@ class KeyGrabber: pygame.init() pygame.joystick.init() if pygame.joystick.get_count() > 0: - print "Joystick found!" for x in range(0, pygame.joystick.get_count()): joy = pygame.joystick.Joystick(x) joy.init() - print "joy " + str(x) + " initialized." + print "joystick " + str(x) + " initialized." screen = pygame.display.set_mode((width, height)) pygame.display.set_caption("Press any key. . .") def get_key(self): + """ returns a tuple with information about the key pressed + (device_string, key_number, joy_number) """ while 1: for event in pygame.event.get(): if event.type == KEYDOWN: pygame.display.quit() - return ("Keyboard", event.key) - # TODO: Make work with joystick. Do buttons first. + return ("Keyboard", event.key) if event.type == JOYBUTTONDOWN: pygame.display.quit() - # TODO: Make sure we're returning the data we need - # for config file here. I'm not sure if this is - # the correct data. return ("Joystick", event.button, event.joy) + # TODO: figure out how fceux saves axes and hat movements and implement + # this might even be easier if we just make the C++ fceux code more modular + # and use a C++ snippet based off code in drivers/sdl/input.cpp and drivers/sdl/sdl-joystick.cpp #if event.type == JOYAXISMOTION: # pygame.display.quit() # return event.joy, event.axis, event.value From 1b631294491d64caab1ba5b695bd7d659256737a Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 13 Jan 2009 09:02:27 +0000 Subject: [PATCH 75/94] restored old config behavior because the gui doesn't support joysticks yet added note to install file that setup.py is broken right now --- INSTALL | 9 +++++++++ MANIFEST | 2 ++ TODO | 1 + gfceux | 7 ++++--- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/INSTALL b/INSTALL index 7d146e38..7577c89f 100644 --- a/INSTALL +++ b/INSTALL @@ -1,3 +1,12 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! IMPORTANT NOTE +! The setup script is broken right now. +! To workaround, just run gfceux out of the source directory. +! +! $ python ./gfceux +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + You can install gfceux with setup.py: $ sudo python setup.py install --prefix=/usr/local diff --git a/MANIFEST b/MANIFEST index c4ecd8d3..25967b61 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,6 @@ gfceux +get_key.py +config_parse.py setup.py COPYING ChangeLog diff --git a/TODO b/TODO index 3e6e9ded..446927d8 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,5 @@ TODO: +* clean setup.py * implement UI for --special (combo box) * use combo box for bpp * use combo box to select gamepad to configure, simply UI diff --git a/gfceux b/gfceux index 79906d89..3772ba21 100755 --- a/gfceux +++ b/gfceux @@ -553,8 +553,9 @@ class GfceuxApp: # fix this global its ugly # specifies which NES gamepad we are configuring gamepad_config_no = "0" - - def gamepad_clicked(self, widget, data=None): + + # This isn't used yet because it doesn't work with joysticks. + def gamepad_clicked_new(self, widget, data=None): widgets.get_object("gamepad_config_window").show_all() d = {'gp1_button' : "0", @@ -593,7 +594,7 @@ class GfceuxApp: cp.writeKey(prefix + "DeviceNum", key_tuple[2]) cp.writeKey(d[widget.name], key_tuple[1]) - def gamepad_clicked_old(self, widget, data=None): + def gamepad_clicked(self, widget, data=None): command = '--inputcfg gamepad' + self.gamepad_config_no self.launch(command, True) From 53256867a1a48576e6f3b7113c55a25ce124a898 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 11 Feb 2009 15:33:19 +0000 Subject: [PATCH 76/94] setup.py install is fixed --- ChangeLog | 2 ++ gfceux | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57d727ba..1962a3ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ ================= version 2.0.4 ( yet to be released) ============ +* Is now installable +* Disabled gamepad GUI until joystick support can be completed * Initial joystick config support: supports buttons, but hot hats and axes * Documented and cleaned fceux config parser * Udated about box UI diff --git a/gfceux b/gfceux index 3772ba21..9f08229f 100755 --- a/gfceux +++ b/gfceux @@ -29,7 +29,7 @@ import os import pickle import shutil from optparse import OptionParser -from config_parse import FceuxConfigParser +#from config_parse import FceuxConfigParser import get_key #from subprocess import Popen @@ -563,8 +563,10 @@ class GfceuxApp: 'gp3_button' : "2", 'gp4_button' : "3"} self.gamepad_config_no = d[widget.name] - + """ +#Disabled for now +#TODO: Full joystick support def button_clicked(self, widget, data=None): prefix = "SDL.Input.GamePad." + self.gamepad_config_no d = {'right_button' : prefix + "Right", @@ -592,8 +594,8 @@ class GfceuxApp: if key_tuple[0] == "Joystick": print key_tuple cp.writeKey(prefix + "DeviceNum", key_tuple[2]) - cp.writeKey(d[widget.name], key_tuple[1]) - + cp.writeKey(d[widget.name], key_tuple[1]) + """ def gamepad_clicked(self, widget, data=None): command = '--inputcfg gamepad' + self.gamepad_config_no self.launch(command, True) From 9462a9c72706633b3932ca4c94c1a3c1ac0b9aa6 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 16 Feb 2009 09:40:28 +0000 Subject: [PATCH 77/94] rearranged the files into packages --- ChangeLog | 3 +++ INSTALL | 17 ++------------ MANIFEST | 12 ---------- TODO | 2 -- generate_ui.sh => data/generate_ui.sh | 0 gfceux.1 => data/gfceux.1 | 0 gfceux.desktop => data/gfceux.desktop | 0 gfceux.glade => data/gfceux.glade | 0 gfceux.png => data/gfceux.png | Bin gfceux.xml => data/gfceux.xml | 0 gfceux_big.png => data/gfceux_big.png | Bin mockup_test.py | 12 ---------- setup.py | 18 +++++++++++---- config_parse.py => src/config_parse.py | 0 get_key.py => src/get_key.py | 0 gfceux => src/main.py | 7 ++---- uninstall.py | 30 ++++++++++++++++++------- 17 files changed, 43 insertions(+), 58 deletions(-) delete mode 100644 MANIFEST rename generate_ui.sh => data/generate_ui.sh (100%) rename gfceux.1 => data/gfceux.1 (100%) rename gfceux.desktop => data/gfceux.desktop (100%) rename gfceux.glade => data/gfceux.glade (100%) rename gfceux.png => data/gfceux.png (100%) rename gfceux.xml => data/gfceux.xml (100%) rename gfceux_big.png => data/gfceux_big.png (100%) delete mode 100644 mockup_test.py rename config_parse.py => src/config_parse.py (100%) rename get_key.py => src/get_key.py (100%) rename gfceux => src/main.py (99%) diff --git a/ChangeLog b/ChangeLog index 1962a3ca..e6848883 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ ================= version 2.0.4 ( yet to be released) ============ +* Uninstall script works better +* Is now distributed as a python package. This makes things easier +for maintanence * Is now installable * Disabled gamepad GUI until joystick support can be completed * Initial joystick config support: supports buttons, but hot hats and axes diff --git a/INSTALL b/INSTALL index 7577c89f..e5bc51bb 100644 --- a/INSTALL +++ b/INSTALL @@ -1,31 +1,18 @@ -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! IMPORTANT NOTE -! The setup script is broken right now. -! To workaround, just run gfceux out of the source directory. -! -! $ python ./gfceux -! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - You can install gfceux with setup.py: $ sudo python setup.py install --prefix=/usr/local You can change the prefix to whatever you like. -FIXME - 12/5/2008 - You can only run gfceux out of its source folder. - Requirements: Python (tested with 2.5); (Ubuntu package name: python) NOTE: gfceux is not yet compatible with python 3.x PyGTK and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) Fceux 2.x -Recommended dependencies -Pygame (Ubuntu package name: python-pygame) - This will allow graphical conifguraion of input - NOTE: fceu 1.x is no longer supported in the gfceu 2.x series. If you still want/need a front-end for gfceu use gfceu 0.x - +ALSO NOTE: you can no longer run gfceux from the source directory. + You need to run the install script and then run the app. diff --git a/MANIFEST b/MANIFEST deleted file mode 100644 index 25967b61..00000000 --- a/MANIFEST +++ /dev/null @@ -1,12 +0,0 @@ -gfceux -get_key.py -config_parse.py -setup.py -COPYING -ChangeLog -INSTALL -TODO -gfceux.xml -gfceux.desktop -gfceux.png -gfceux_big.png diff --git a/TODO b/TODO index 446927d8..df749269 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,7 @@ TODO: -* clean setup.py * implement UI for --special (combo box) * use combo box for bpp * use combo box to select gamepad to configure, simply UI -* update build scripts to reflect new files * joystick input support * hotkey config * resolution diff --git a/generate_ui.sh b/data/generate_ui.sh similarity index 100% rename from generate_ui.sh rename to data/generate_ui.sh diff --git a/gfceux.1 b/data/gfceux.1 similarity index 100% rename from gfceux.1 rename to data/gfceux.1 diff --git a/gfceux.desktop b/data/gfceux.desktop similarity index 100% rename from gfceux.desktop rename to data/gfceux.desktop diff --git a/gfceux.glade b/data/gfceux.glade similarity index 100% rename from gfceux.glade rename to data/gfceux.glade diff --git a/gfceux.png b/data/gfceux.png similarity index 100% rename from gfceux.png rename to data/gfceux.png diff --git a/gfceux.xml b/data/gfceux.xml similarity index 100% rename from gfceux.xml rename to data/gfceux.xml diff --git a/gfceux_big.png b/data/gfceux_big.png similarity index 100% rename from gfceux_big.png rename to data/gfceux_big.png diff --git a/mockup_test.py b/mockup_test.py deleted file mode 100644 index c29b0bb7..00000000 --- a/mockup_test.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python -# displays mockup of gamepad config -import gtk - -glade_file = 'gfceux.xml' -print "Using: " + glade_file -widgets = gtk.Builder() -widgets.add_from_file(glade_file) - -widgets.get_object('gamepad_config_window').show_all() -gtk.main () - diff --git a/setup.py b/setup.py index 4677784d..14dce8bf 100755 --- a/setup.py +++ b/setup.py @@ -1,12 +1,22 @@ #!/usr/bin/env python + from distutils.core import setup + setup(name="gfceux", version="2.0.4", scripts = ['gfceux'], - data_files=[('share/gfceux/',['gfceux.xml', 'gfceux_big.png', 'gfceux.png']), - ('share/pixmaps/', ['gfceux.png']), - ('share/man/man1/', ['gfceux.1']), - ('share/applications/', ['gfceux.desktop'])], + packages = ['gfceux'], + package_dir = {'gfceux': 'src'}, + data_files=[ + ('share/gfceux/', + ['data/gfceux.xml', 'data/gfceux_big.png', 'data/gfceux.png', + 'COPYING']), + ('share/pixmaps/', + ['data/gfceux.png']), + ('share/man/man1/', + ['data/gfceux.1']), + ('share/applications/', + ['data/gfceux.desktop'])], author = "Lukas Sabota", author_email = "ltsmooth42 _at_ gmail.com", url = "http://dietschnitzel.com/gfceu" diff --git a/config_parse.py b/src/config_parse.py similarity index 100% rename from config_parse.py rename to src/config_parse.py diff --git a/get_key.py b/src/get_key.py similarity index 100% rename from get_key.py rename to src/get_key.py diff --git a/gfceux b/src/main.py similarity index 99% rename from gfceux rename to src/main.py index 9f08229f..d9dfd72b 100755 --- a/gfceux +++ b/src/main.py @@ -28,9 +28,9 @@ import sys import os import pickle import shutil -from optparse import OptionParser +#from optparse import OptionParser #from config_parse import FceuxConfigParser -import get_key +#import get_key #from subprocess import Popen try: @@ -659,7 +659,4 @@ class GfceuxApp: gtk.main_quit() if __name__ == '__main__': - parser = OptionParser(version='%prog '+ version) - parser.parse_args() - app = GfceuxApp() diff --git a/uninstall.py b/uninstall.py index 423963df..75b56b5a 100755 --- a/uninstall.py +++ b/uninstall.py @@ -5,19 +5,33 @@ # # sudo ./uninstall.py [prefix] # +# prefix must include slash at end +#TODO: fix that +#TODO: remove python package? (site-package/gfceux/etc) import os import dircache -prefix = "/usr/" -if sys.argv[1]: - prefix == sys.argv[1] +import sys -files = ['share/pixmaps/gfceux.png', 'share/man/man1/gfceux.1', - 'share/applications/gfceux.desktop', 'bin/gfceux'] -for x in dircache.listdir(prefix+"share/gfceux"): - files.append("share/gfceux/"+x) +prefix = "/usr/" +try: + if sys.argv[1]: + prefix = sys.argv[1] +except IndexError: + pass + +# first include data places scattered in /usr +files = [ + "share/pixmaps/gfceux.png", + "share/man/man1/gfceux.1", + "share/applications/gfceux.desktop", + "bin/gfceux"] +# then include the files in our /usr/share/gfceux +for x in dircache.listdir(prefix + "share/gfceux"): + files.append("share/gfceux/" + x) for x in files: os.remove(prefix+x) - + +# go ahead and remove our shared folder if its empty os.rmdir(prefix+"share/gfceux") From 932b3aabec22476257253af03318c8bd4f2b9808 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Mar 2009 04:17:42 +0000 Subject: [PATCH 78/94] oops somehow this got missing from svn? --- gfceux | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 gfceux diff --git a/gfceux b/gfceux new file mode 100755 index 00000000..ebb19d37 --- /dev/null +++ b/gfceux @@ -0,0 +1,13 @@ +#!/usr/bin/env python +# +# GTK2 GUI for FCE UltraX +# +# Lukas Sabota +# +# + +from gfceux import main + +app = main.GfceuxApp() + + From c9e2b938cb110c7699ae12640ac8ac5173a890ba Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Mar 2009 04:22:16 +0000 Subject: [PATCH 79/94] oops also left out this file gfceux now installs fine again; i moved around some files and forgot to commit them to svn --- src/__init__.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/__init__.py diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 00000000..6551d283 --- /dev/null +++ b/src/__init__.py @@ -0,0 +1 @@ +__all__ = ["gfceux"] From 4c877572af2115d9dbb139ed5930d2bc3f1f192d Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Mar 2009 04:52:29 +0000 Subject: [PATCH 80/94] fixed bug where all gamepad configs from gui were to gamepad4 --- src/get_key.py | 2 +- src/main.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/get_key.py b/src/get_key.py index f802f696..8e5a58c1 100755 --- a/src/get_key.py +++ b/src/get_key.py @@ -16,7 +16,7 @@ except ImportError: class KeyGrabber: """ KeyGrabber is a wrapper that gets an SDL key from the user using pygame """ - def __init__(self, width=300, height=100): + def __init__(self, width=800, height=100): pygame.init() pygame.joystick.init() if pygame.joystick.get_count() > 0: diff --git a/src/main.py b/src/main.py index d9dfd72b..9e412641 100755 --- a/src/main.py +++ b/src/main.py @@ -558,11 +558,7 @@ class GfceuxApp: def gamepad_clicked_new(self, widget, data=None): widgets.get_object("gamepad_config_window").show_all() - d = {'gp1_button' : "0", - 'gp2_button' : "1", - 'gp3_button' : "2", - 'gp4_button' : "3"} - self.gamepad_config_no = d[widget.name] + """ #Disabled for now @@ -597,6 +593,11 @@ class GfceuxApp: cp.writeKey(d[widget.name], key_tuple[1]) """ def gamepad_clicked(self, widget, data=None): + d = {'gp1_button' : "1", + 'gp2_button' : "2", + 'gp3_button' : "3", + 'gp4_button' : "4"} + self.gamepad_config_no = d[widget.name] command = '--inputcfg gamepad' + self.gamepad_config_no self.launch(command, True) From 7ab151035dd75c25487c34005133ba91289ccece Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 17 Mar 2009 04:53:52 +0000 Subject: [PATCH 81/94] increased width on sdl inputcfg window --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index e6848883..92aba30a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ ================= version 2.0.4 ( yet to be released) ============ +* Increased the width of the sdl inputcfg window to be more visible +with larger font sizes * Uninstall script works better * Is now distributed as a python package. This makes things easier for maintanence From 66a5dc8a94b312e2aa538e71f9611278d59945ad Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sat, 28 Mar 2009 14:14:17 +0000 Subject: [PATCH 82/94] Bumped version number to 2.1 for gfceux --- ChangeLog | 2 +- setup.py | 4 ++-- src/main.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92aba30a..5e03f1af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -================= version 2.0.4 ( yet to be released) ============ +================= version 2.1 ( yet to be released) ============ * Increased the width of the sdl inputcfg window to be more visible with larger font sizes * Uninstall script works better diff --git a/setup.py b/setup.py index 14dce8bf..2240d81c 100755 --- a/setup.py +++ b/setup.py @@ -3,10 +3,10 @@ from distutils.core import setup setup(name="gfceux", - version="2.0.4", + version="2.1", scripts = ['gfceux'], packages = ['gfceux'], - package_dir = {'gfceux': 'src'}, + package_dir = {'gfceux': 'src'}, data_files=[ ('share/gfceux/', ['data/gfceux.xml', 'data/gfceux_big.png', 'data/gfceux.png', diff --git a/src/main.py b/src/main.py index 9e412641..066ac7b8 100755 --- a/src/main.py +++ b/src/main.py @@ -1,7 +1,7 @@ #!/usr/bin/python # gfceux - Graphical launcher for fceux. # Designed on Ubuntu, with platfrom independence in mind. -version = "2.0.4svn" +version = "2.1" title = "gfceux" # Copyright (C) 2008 Lukas Sabota ## From 9e3b6195d6885941a5573ee48ad3d7d12741cd65 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 29 Apr 2009 04:39:47 +0000 Subject: [PATCH 83/94] gfceux now runs from its source directory without being installed --- ChangeLog | 4 +++- gfceux | 6 ++++-- src/main.py | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e03f1af..8e18e970 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ -================= version 2.1 ( yet to be released) ============ +* Gfceux now runs properly from the source directory without +being installed +================= version 2.1 ====================== ============ * Increased the width of the sdl inputcfg window to be more visible with larger font sizes * Uninstall script works better diff --git a/gfceux b/gfceux index ebb19d37..54e8705a 100755 --- a/gfceux +++ b/gfceux @@ -5,8 +5,10 @@ # Lukas Sabota # # - -from gfceux import main +try: + from gfceux import main +except: + from src import main app = main.GfceuxApp() diff --git a/src/main.py b/src/main.py index 066ac7b8..0710e7e1 100755 --- a/src/main.py +++ b/src/main.py @@ -280,14 +280,14 @@ class GfceuxApp: global widgets """ Search for the glade XML file and load it """ # Check first in the directory of this script. - if os.path.isfile('gfceux.xml'): - glade_file = 'gfceux.xml' + if os.path.isfile('data/gfceux.xml'): + glade_file = 'data/gfceux.xml' # Then check to see if its installed on a *nix system elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml')): glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml') else: print 'ERROR.' - print 'Could not find the ' + glade_file + ' file.' + print 'Could not find the glade UI file.' print 'Try reinstalling the application.' sys.exit(1) From dd21307e7a435c4d6de2152d422ffb2cf6583dd8 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 29 Apr 2009 04:41:00 +0000 Subject: [PATCH 84/94] attempt to load the in-tree gfceux scripts before loading the installed scripts (to ease development out of the tree) --- gfceux | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfceux b/gfceux index 54e8705a..8f73b985 100755 --- a/gfceux +++ b/gfceux @@ -6,9 +6,9 @@ # # try: - from gfceux import main -except: from src import main +except: + from gfceux import main app = main.GfceuxApp() From 7b60d5cdc7bec73deafffbb3dd3048e3600f7c0d Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 29 Apr 2009 05:09:52 +0000 Subject: [PATCH 85/94] Removed the need for the glade XML converter Also removed some silly glade errors Changed the installation instructions to prevent breakage --- ChangeLog | 4 + INSTALL | 12 +- data/generate_ui.sh | 3 - data/gfceux.glade | 803 +++++++++++++++++++++++--------------------- data/gfceux.xml | 303 ++++++++++------- gfceux | 2 +- setup.py | 4 +- src/main.py | 10 +- 8 files changed, 611 insertions(+), 530 deletions(-) delete mode 100755 data/generate_ui.sh diff --git a/ChangeLog b/ChangeLog index 8e18e970..fb8d00d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +* Changed glade filename from gfceux.xml -> gfceux.glade +* Removed the need of running ./generate.ui after every glade change +* Got rid of some silly glade errors +* Changed the installation instructions to avoid breakage * Gfceux now runs properly from the source directory without being installed ================= version 2.1 ====================== ============ diff --git a/INSTALL b/INSTALL index e5bc51bb..0aaa8676 100644 --- a/INSTALL +++ b/INSTALL @@ -1,18 +1,18 @@ You can install gfceux with setup.py: -$ sudo python setup.py install --prefix=/usr/local +$ sudo python setup.py install -You can change the prefix to whatever you like. +NOTE: The --prefix option of setup.py may be temporarily broken. +We believe this is a python issue, so just install to the default +path of /usr or just run the script out of the source directory. Requirements: -Python (tested with 2.5); (Ubuntu package name: python) +Python (tested with 2.6); (Ubuntu package name: python2.6) NOTE: gfceux is not yet compatible with python 3.x -PyGTK and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) +PyGTK (Ubuntu package name: python-gtk2) Fceux 2.x NOTE: fceu 1.x is no longer supported in the gfceu 2.x series. If you still want/need a front-end for gfceu use gfceu 0.x -ALSO NOTE: you can no longer run gfceux from the source directory. - You need to run the install script and then run the app. diff --git a/data/generate_ui.sh b/data/generate_ui.sh deleted file mode 100755 index 908db51c..00000000 --- a/data/generate_ui.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -gtk-builder-convert gfceux.glade gfceux.xml - diff --git a/data/gfceux.glade b/data/gfceux.glade index 016e1847..53ec388e 100644 --- a/data/gfceux.glade +++ b/data/gfceux.glade @@ -1,93 +1,103 @@ - - - - - + + + + + + 2 + 1 + 5 + 0.5 + 1 + + + 2 + 1 + 10 + 0.5 + 1 + + + 4046 + 1 + 65536 + 1 + 10 + + + 4046 + 1 + 65536 + 1 + 10 + + Gamepad Configuration - + - + True - + True <b>NOTE:</b> The below GUI is brand new and joysticks are not completely support yet. To configure a joystick, use --inputcfg. True True - + + + 0 + - + True - + True 0 - GTK_SHADOW_NONE + none - + True 12 - + True 3 3 - - - - - - - - - - - - - - - - + + Up True True True - Up - 0 - - + 1 2 - + + Left True True True - Left - 0 - - + 1 2 - + + Down True True True - Down - 0 - - + 1 2 @@ -96,14 +106,12 @@ - + + Right True True True - Right - 0 - - + 2 3 @@ -111,289 +119,297 @@ 2 - + + + + + + + + + + + + + + + + - + - - + + True <b>D-Pad</b> True - - - label_item - + - + False False + 0 - + True 0 - GTK_SHADOW_NONE + none - + True 12 - + True - + + Select True True True - Select - 0 - - + False False + 0 - + + Start True True True - Start - 0 - - + False False 1 - + - + - - + + True <b>Essentials</b> True - - - label_item - + - + 1 - + True 0 - GTK_SHADOW_NONE + none - + True 12 - + True - + True - + + B True True True - B - 0 - - + + + 0 + - + + A True True True - A - 0 - - + 1 - + + + 0 + - + True - + + Turbo B True True True - Turbo B - 0 - - + + + 0 + - + + Turbo A True True True - Turbo A - 0 - - + 1 - + 1 - + - + - - + + True <b>Alpha and Beta</b> True - - - label_item - + - + 2 - + 1 - + - - + + True GFCE UltraX 442 gfceux.png - + True 1 - + True True 3 - + True 5 5 - + True 5 - + True 5 ROM Filename: - + False False + 0 - + True True - + 1 - + + _Browse... True True - _Browse... + False True - 0 - + False False 2 - + False False + 0 - + True 5 - + True 5 Movie Filename: - + False False + 0 - + True True - + 1 - + + _Browse... True True - _Browse... + False True - 0 - + False False 2 - + False False @@ -401,87 +417,88 @@ - + True 5 - + True 5 Lua Script: - + False False + 0 - + True True - + 1 - + + _Browse... True True - _Browse... + False True - 0 - + False False 2 - + False False 2 - + - - + + True Main - + - tab False - + True 5 5 - + True - + True gtk-dialog-info - + False False + 0 - + True Select an NES gamepad to configure. True - + False False @@ -489,41 +506,42 @@ 1 - + False False + 0 - + True 2 2 5 5 - - True - True + Gamepad _1 + True + True + False True - 0 - + - - True - True + Gamepad _2 + True + True + False True - 0 - + 1 2 @@ -531,14 +549,14 @@ - - True - True + Gamepad _4 + True + True + False True - 0 - + 1 2 @@ -548,21 +566,21 @@ - + + Gamepad _3 True True - Gamepad _3 + False True - 0 - + 1 2 - + False False @@ -570,66 +588,66 @@ - + + gtk-help True True - gtk-help + False True - 0 - + False False 5 - GTK_PACK_END + end 2 - + 1 - - + + True Input - + - tab 1 False - + True 5 5 - + + Enable _OpenGL Rendering True True - Enable _OpenGL Rendering + False True - 0 True - + False False + 0 - + + Enable _Full Screen True True - Enable _Full Screen + False True - 0 True - + False False @@ -637,12 +655,12 @@ - + True <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> True True - + False False @@ -650,197 +668,198 @@ - + + _Autoscale Fullscreen True True - _Autoscale Fullscreen + False True - 0 True True - + False 3 - + True 0 - GTK_SHADOW_NONE + none - + True 12 - + True - + True - + True X scale: - + False 5 + 0 - + True True - 2 1 5 0.5 1 0 + adjustment1 0.099999999776482579 1 True - + False 1 - + False + 0 - + True - + True Y scale: - + False 5 + 0 - + True True - 2 1 10 0.5 1 0 + adjustment2 0.10000000000000001 1 True - GTK_UPDATE_IF_VALID - + if-valid + False 1 - + False 1 - + - + - - + + True <b>Manual Scaling</b> True - - - label_item - + - + 4 - + True - + True Bits per pixel: - + False 5 + 0 - + True True 2 32 - + False False 1 - + False False 5 - + 2 False - - + + True Video - + - tab 2 False - + True 5 - + + Enable _Sound True True - Enable _Sound + False True - 0 True True - + False 5 + 0 - + + Extra _Quaility True True - Extra _Quaility + False True - 0 True True - + False 5 @@ -848,33 +867,34 @@ - + True - + True Sample rate: - + False False 5 + 0 - + True True 6 11000 - + False False 1 - + False 5 @@ -882,194 +902,197 @@ - + True - + True Buffer size (ms): - + False False 5 + 0 - + True True 3 48 - + False False 1 - + False 3 - + 3 - - + + True Sound - + - tab 3 False - + True 5 5 - + True - + True gtk-dialog-info - + False False + 0 - + True If you would like to specify any command line options to FCE UltraX, specify them below. For a complete option reference, visit http://fceux.com . Invalid options may cause GFCE UltraX to behave incorrectly. True - + False False 1 - + False False 5 + 0 - + True - + True Extra Parameters: - + False False 5 + 0 - + True True - + 5 1 - + False 1 - + 4 - - + + True Advanced - + - tab 4 False - + True False 5 5 - + + _Host Game True True - _Host Game + False True - 0 True - + False False + 0 - + True 0 - GTK_SHADOW_NONE + none - + True 19 - + True 2 2 5 5 - + True 0 Port: - + GTK_FILL - + True 0 Password: - + 1 2 @@ -1078,12 +1101,12 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True True - 4046 1 65536 1 10 0 + adjustment3 1 - + 1 2 @@ -1091,10 +1114,10 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True True - + 1 2 @@ -1103,11 +1126,11 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + - + - + False False @@ -1115,16 +1138,16 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + + _Join Game True True - _Join Game + False True - 0 True host_radio - + False False @@ -1132,17 +1155,17 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True 0 - GTK_SHADOW_NONE + none - + True 0 19 - + True 5 3 @@ -1150,10 +1173,10 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 3 5 - + True True - + 1 2 @@ -1161,12 +1184,11 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True True False - * - + 1 2 @@ -1176,22 +1198,22 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True 0 Server Address: - + GTK_FILL - + True 0 Server Port: - + 1 2 @@ -1200,11 +1222,11 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True 0 Password: - + 2 3 @@ -1213,12 +1235,12 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + True True - 4046 1 65536 1 10 0 + adjustment4 1 - + 1 2 @@ -1227,11 +1249,11 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + - + - + False False @@ -1239,77 +1261,78 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + + _No Network True True - _No Network + False True - 0 True True host_radio - + False False 4 - + 5 - - + + False Network - + - tab 5 False - + 10 + 0 - + True True - + True 3 - + + gtk-execute True True True True True - gtk-execute + False True - 0 - + False + 0 - + + gtk-about True True - gtk-about + False True - 0 - + False False @@ -1317,33 +1340,36 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - + + gtk-quit True True - gtk-quit + False True - 0 - + False 2 - + + + 0 + - + False False 1 - + - - - GDK_WINDOW_TYPE_HINT_NORMAL + + + normal (C) Copyright 2008 A GTK2 front-end end for the fceux Nintendo Entertainment System emulator. This program is free software; you can redistribute it and/or @@ -1375,48 +1401,47 @@ Artwork for old versions (< 0.2.7): <vyruss000@gmail.com> gfceux_big.png - + True - + + http://fceux.com True True True True - http://fceux.com - GTK_RELIEF_NONE - 0 + none http://fceux.com - + 3 - + + http://dietschnitzel.com/gfceu/ True True True True - http://dietschnitzel.com/gfceu/ - GTK_RELIEF_NONE - 0 + none http://dietschnitzel.com/gfceu/ - + 4 - + True - + False - GTK_PACK_END + end + 0 - + - - + + diff --git a/data/gfceux.xml b/data/gfceux.xml index 7e65b051..53ec388e 100644 --- a/data/gfceux.xml +++ b/data/gfceux.xml @@ -1,43 +1,40 @@ - + + - 5 - 1 - 1 - 0.5 - 0 2 + 1 + 5 + 0.5 + 1 - 10 - 1 - 1 - 0.5 - 0 2 + 1 + 10 + 0.5 + 1 - 65536 - 1 - 10 - 1 - 0 4046 + 1 + 65536 + 1 + 10 - 65536 - 1 - 10 - 1 - 0 4046 + 1 + 65536 + 1 + 10 Gamepad Configuration - - - + + + True @@ -49,6 +46,9 @@ True True + + 0 + @@ -57,7 +57,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -67,28 +67,12 @@ True 3 3 - - - - - - - - - - - - - - - + Up True True True - Up - 1 @@ -97,11 +81,10 @@ + Left True True True - Left - 1 @@ -110,11 +93,10 @@ + Down True True True - Down - 1 @@ -125,11 +107,10 @@ + Right True True True - Right - 2 @@ -138,6 +119,21 @@ 2 + + + + + + + + + + + + + + + @@ -153,13 +149,14 @@ False False + 0 True 0 - GTK_SHADOW_NONE + none True @@ -169,24 +166,23 @@ True + Select True True True - Select - False False + 0 + Start True True True - Start - False @@ -214,7 +210,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -227,46 +223,51 @@ True + B True True True - B - + + 0 + + A True True True - A - 1 + + 0 + True + Turbo B True True True - Turbo B - + + 0 + + Turbo A True True True - Turbo A - 1 @@ -306,7 +307,7 @@ GFCE UltraX 442 gfceux.png - + True @@ -334,6 +335,7 @@ False False + 0 @@ -347,11 +349,12 @@ + _Browse... True True - _Browse... + False True - + False @@ -363,6 +366,7 @@ False False + 0 @@ -378,6 +382,7 @@ False False + 0 @@ -391,11 +396,12 @@ + _Browse... True True - _Browse... + False True - + False @@ -423,6 +429,7 @@ False False + 0 @@ -436,11 +443,12 @@ + _Browse... True True - _Browse... + False True - + False @@ -482,6 +490,7 @@ False False + 0 @@ -501,6 +510,7 @@ False False + 0 @@ -512,58 +522,62 @@ 5 + Gamepad _1 True True - Gamepad _1 + False True - + - + + Gamepad _2 True True - Gamepad _2 + False True - + 1 2 - + + Gamepad _4 True True - Gamepad _4 + False True - + 1 2 1 2 - + + Gamepad _3 True True - Gamepad _3 + False True - + 1 2 - + @@ -575,21 +589,25 @@ + gtk-help True True - gtk-help + False True - + False False 5 - GTK_PACK_END + end 2 + + 1 + @@ -608,22 +626,25 @@ 5 + Enable _OpenGL Rendering True True - Enable _OpenGL Rendering + False True True False False + 0 + Enable _Full Screen True True - Enable _Full Screen + False True True @@ -648,13 +669,14 @@ + _Autoscale Fullscreen True True - _Autoscale Fullscreen + False True True True - + False @@ -665,7 +687,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -684,6 +706,7 @@ False 5 + 0 @@ -703,6 +726,7 @@ False + 0 @@ -716,6 +740,7 @@ False 5 + 0 @@ -726,7 +751,7 @@ 0.10000000000000001 1 True - GTK_UPDATE_IF_VALID + if-valid False @@ -766,6 +791,7 @@ False 5 + 0 @@ -810,9 +836,10 @@ 5 + Enable _Sound True True - Enable _Sound + False True True True @@ -820,13 +847,15 @@ False 5 + 0 + Extra _Quaility True True - Extra _Quaility + False True True True @@ -849,6 +878,7 @@ False False 5 + 0 @@ -883,6 +913,7 @@ False False 5 + 0 @@ -905,6 +936,9 @@ + + 3 + @@ -932,6 +966,7 @@ False False + 0 @@ -954,6 +989,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. False False 5 + 0 @@ -968,6 +1004,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. False False 5 + 0 @@ -987,6 +1024,9 @@ Invalid options may cause GFCE UltraX to behave incorrectly. + + 4 + @@ -1006,23 +1046,25 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 5 + _Host Game True True - _Host Game + False True True - + False False + 0 True 0 - GTK_SHADOW_NONE + none True @@ -1042,7 +1084,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. GTK_FILL - + @@ -1055,7 +1097,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 1 2 GTK_FILL - + @@ -1068,7 +1110,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 1 2 - + @@ -1081,7 +1123,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 2 1 2 - + @@ -1097,13 +1139,14 @@ Invalid options may cause GFCE UltraX to behave incorrectly. + _Join Game True True - _Join Game + False True True host_radio - + False @@ -1115,7 +1158,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. True 0 - GTK_SHADOW_NONE + none True @@ -1137,7 +1180,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 1 2 - + @@ -1145,14 +1188,13 @@ Invalid options may cause GFCE UltraX to behave incorrectly. True True False - * 1 2 2 3 - + @@ -1163,7 +1205,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. GTK_FILL - + @@ -1176,7 +1218,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 1 2 GTK_FILL - + @@ -1189,7 +1231,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 2 3 GTK_FILL - + @@ -1204,7 +1246,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 2 1 2 - + @@ -1220,14 +1262,15 @@ Invalid options may cause GFCE UltraX to behave incorrectly. + _No Network True True - _No Network + False True True True host_radio - + False @@ -1236,6 +1279,9 @@ Invalid options may cause GFCE UltraX to behave incorrectly. + + 5 + @@ -1250,6 +1296,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 10 + 0 @@ -1262,26 +1309,29 @@ Invalid options may cause GFCE UltraX to behave incorrectly. 3 + gtk-execute True True True True True - gtk-execute + False True - + False + 0 + gtk-about True True - gtk-about + False True - + False @@ -1291,11 +1341,12 @@ Invalid options may cause GFCE UltraX to behave incorrectly. + gtk-quit True True - gtk-quit + False True - + False @@ -1303,6 +1354,9 @@ Invalid options may cause GFCE UltraX to behave incorrectly. + + 0 + @@ -1315,7 +1369,7 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - GDK_WINDOW_TYPE_HINT_NORMAL + normal (C) Copyright 2008 A GTK2 front-end end for the fceux Nintendo Entertainment System emulator. This program is free software; you can redistribute it and/or @@ -1336,7 +1390,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.< Patch writers: Scott Brown - translator-credits + translator-credits Sketching: J. Sammer Digital Manipulation: @@ -1351,12 +1405,12 @@ Artwork for old versions (< 0.2.7): True + http://fceux.com True True True True - http://fceux.com - GTK_RELIEF_NONE + none http://fceux.com @@ -1365,12 +1419,12 @@ Artwork for old versions (< 0.2.7): + http://dietschnitzel.com/gfceu/ True True True True - http://dietschnitzel.com/gfceu/ - GTK_RELIEF_NONE + none http://dietschnitzel.com/gfceu/ @@ -1383,7 +1437,8 @@ Artwork for old versions (< 0.2.7): False - GTK_PACK_END + end + 0 diff --git a/gfceux b/gfceux index 8f73b985..9c8291c9 100755 --- a/gfceux +++ b/gfceux @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2.6 # # GTK2 GUI for FCE UltraX # diff --git a/setup.py b/setup.py index 2240d81c..005b70df 100755 --- a/setup.py +++ b/setup.py @@ -3,13 +3,13 @@ from distutils.core import setup setup(name="gfceux", - version="2.1", + version="2.2svn", scripts = ['gfceux'], packages = ['gfceux'], package_dir = {'gfceux': 'src'}, data_files=[ ('share/gfceux/', - ['data/gfceux.xml', 'data/gfceux_big.png', 'data/gfceux.png', + ['data/gfceux.glade', 'data/gfceux_big.png', 'data/gfceux.png', 'COPYING']), ('share/pixmaps/', ['data/gfceux.png']), diff --git a/src/main.py b/src/main.py index 0710e7e1..0a6e03b0 100755 --- a/src/main.py +++ b/src/main.py @@ -1,7 +1,7 @@ #!/usr/bin/python # gfceux - Graphical launcher for fceux. # Designed on Ubuntu, with platfrom independence in mind. -version = "2.1" +version = "2.2svn" title = "gfceux" # Copyright (C) 2008 Lukas Sabota ## @@ -280,11 +280,11 @@ class GfceuxApp: global widgets """ Search for the glade XML file and load it """ # Check first in the directory of this script. - if os.path.isfile('data/gfceux.xml'): - glade_file = 'data/gfceux.xml' + if os.path.isfile('data/gfceux.glade'): + glade_file = 'data/gfceux.glade' # Then check to see if its installed on a *nix system - elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml')): - glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml') + elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.glade')): + glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.glade') else: print 'ERROR.' print 'Could not find the glade UI file.' From b34699c3711c26ac526bc253ebebc7c4ced3d942 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 29 Apr 2009 05:12:19 +0000 Subject: [PATCH 86/94] don't like this file --- BUG | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 BUG diff --git a/BUG b/BUG deleted file mode 100644 index e69de29b..00000000 From f3f13bdaeed434285a726ad74386683f5277890e Mon Sep 17 00:00:00 2001 From: qeed Date: Mon, 7 Sep 2009 12:48:49 +0000 Subject: [PATCH 87/94] fix gfceux --- gfceux | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gfceux b/gfceux index 9c8291c9..b5e74dcf 100755 --- a/gfceux +++ b/gfceux @@ -1,10 +1,15 @@ -#!/usr/bin/env python2.6 +#!/usr/bin/env python # # GTK2 GUI for FCE UltraX # # Lukas Sabota # # +import platform +if platform.python_version() < '2.5.0': + print "Python version too old, use one greater than 2.5.0"; + exit(); + try: from src import main except: From 505f609e726de30a25731e0fddeabda9cc93ce42 Mon Sep 17 00:00:00 2001 From: qeed Date: Mon, 7 Sep 2009 12:58:58 +0000 Subject: [PATCH 88/94] use sys.exit() instead of exit() --- gfceux | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gfceux b/gfceux index b5e74dcf..11eaa441 100755 --- a/gfceux +++ b/gfceux @@ -5,10 +5,11 @@ # Lukas Sabota # # -import platform +import platform +import sys if platform.python_version() < '2.5.0': print "Python version too old, use one greater than 2.5.0"; - exit(); + sys.exit(); try: from src import main From 452a4e675e8f1dd002e561041c20eb9d70302279 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Thu, 31 Dec 2009 07:09:14 +0000 Subject: [PATCH 89/94] some stuff to put networking back in gfceux --- data/gfceux.glade | 2 -- src/main.py | 23 +++++++++-------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/data/gfceux.glade b/data/gfceux.glade index 53ec388e..e499edf7 100644 --- a/data/gfceux.glade +++ b/data/gfceux.glade @@ -1041,7 +1041,6 @@ Invalid options may cause GFCE UltraX to behave incorrectly. True - False 5 5 @@ -1285,7 +1284,6 @@ Invalid options may cause GFCE UltraX to behave incorrectly. - False Network diff --git a/src/main.py b/src/main.py index 0a6e03b0..16902fa0 100755 --- a/src/main.py +++ b/src/main.py @@ -382,8 +382,7 @@ class GfceuxApp: network + other_options + options.extra_entry + ' '+ rom_name self.msg('Command: ' + command) - # more code to disable because netplay is fucked - """ + if options.host_radio: xterm_binary = find_binary("xterm") if xterm_binary == None: @@ -398,7 +397,7 @@ class GfceuxApp: args.append("--password") args.append(options.host_pass) pid = Popen(args).pid - """ + widgets.get_object("main_window").hide() # os.system() is a blocker, so we must force @@ -409,11 +408,11 @@ class GfceuxApp: os.system(command) widgets.get_object("main_window").show() - # another part of netplay code - """ + + if options.host_radio: - os.kill(pid, 9) - """ + os.kill(pid, 9) + ### Callbacks def launch_button_clicked(self, arg1): @@ -621,18 +620,16 @@ class GfceuxApp: options.no_network_radio = False def host_radio_clicked(self, menuitem, data=None): - """ - this is broken in fceux right now if widgets.get_object("host_radio").get_active(): - self.server_binary = find_binary('fceu-server') + self.server_binary = find_binary('fceux-server') if self.server_binary == None: if os.name == 'nt': - self.print_error("The fceu server software cannot be found. \n\ + self.print_error("The fceux server software cannot be found. \n\ Ensure that it is installed in the same directory as \n\ GFCE Ultra.", 102, True, False) else: - self.print_error("The fceu server software cannot be found on \n\ + self.print_error("The fceux server software cannot be found on \n\ this system. Ensure that it is installed and in your path.", 101, True, False) widgets.get_object("no_network_radio").set_active(True) @@ -644,8 +641,6 @@ class GfceuxApp: options.join_radio = False options.host_radio = True options.no_network_radio = False - """ - pass def no_network_radio_clicked(self, menuitem, data=None): widgets.get_object("join_frame").set_sensitive(False) From 0b512f29f4cbe271b0e338a06baf0f47bea05097 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 8 Jan 2010 03:31:35 +0000 Subject: [PATCH 90/94] fixed indentation issue changed default uninstlal folder to /usr/local --- src/main.py | 39 +++++++++++++++++++-------------------- uninstall.py | 2 +- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/main.py b/src/main.py index 16902fa0..2a489f8e 100755 --- a/src/main.py +++ b/src/main.py @@ -365,13 +365,12 @@ class GfceuxApp: network = '' if options.host_radio: - """ if options.host_pass == '': netpass = ' ' else: netpass = ' --pass ' + '"' + options.host_pass + '" ' network = '--net localhost --port '+\ - str(options.host_port) + netpass + ' '""" + str(options.host_port) + netpass + ' ' network = '' if local: @@ -383,27 +382,27 @@ class GfceuxApp: self.msg('Command: ' + command) - if options.host_radio: - xterm_binary = find_binary("xterm") - if xterm_binary == None: - gfceu_error("Cannot find xterm on this system. You will not \n\ - be informed of server output.", 102, True, False) - args = [self.server_binary] - else: - args = [xterm_binary, "-e", self.server_binary] - args.append('--port') - args.append(str(options.host_port)) - if options.host_pass: - args.append("--password") - args.append(options.host_pass) - pid = Popen(args).pid - + if options.host_radio: + xterm_binary = find_binary("xterm") + if xterm_binary == None: + gfceu_error("Cannot find xterm on this system. You will not \n\ + be informed of server output.", 102, True, False) + args = [self.server_binary] + else: + args = [xterm_binary, "-e", self.server_binary] + args.append('--port') + args.append(str(options.host_port)) + if options.host_pass: + args.append("--password") + args.append(options.host_pass) + pid = Popen(args).pid + widgets.get_object("main_window").hide() # os.system() is a blocker, so we must force # gtk to process our events. while gtk.events_pending(): - gtk.main_iteration_do() + gtk.main_iteration_do() os.system(command) widgets.get_object("main_window").show() @@ -621,9 +620,9 @@ class GfceuxApp: def host_radio_clicked(self, menuitem, data=None): if widgets.get_object("host_radio").get_active(): - self.server_binary = find_binary('fceux-server') + options.server_binary = find_binary('fceux-server') - if self.server_binary == None: + if options.server_binary == None: if os.name == 'nt': self.print_error("The fceux server software cannot be found. \n\ Ensure that it is installed in the same directory as \n\ diff --git a/uninstall.py b/uninstall.py index 75b56b5a..3ccfb1a1 100755 --- a/uninstall.py +++ b/uninstall.py @@ -13,7 +13,7 @@ import os import dircache import sys -prefix = "/usr/" +prefix = "/usr/local" try: if sys.argv[1]: prefix = sys.argv[1] From ae5221aff99bb227d38e5d14b12c943c9b5d8eb4 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 3 Mar 2010 21:29:56 +0000 Subject: [PATCH 91/94] gfceux: change default sound rate --- data/gfceux.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/gfceux.xml b/data/gfceux.xml index 53ec388e..d354ca51 100644 --- a/data/gfceux.xml +++ b/data/gfceux.xml @@ -886,7 +886,7 @@ True True 6 - 11000 + 48000 False From dc5091e79bd029647e9db0209ba75fd781366295 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 19 Oct 2010 19:56:17 +0000 Subject: [PATCH 92/94] moved gfceu/gfceuX to old/ folder to avoid confusion the python launchers are obsolete, use the built-in GUI --- INSTALL | 18 - TODO | 12 - data/gfceux.1 | 20 - data/gfceux.glade | 1445 ------------------- data/gfceux.xml | 1447 -------------------- get_key/build.sh | 2 - get_key/main.cpp | 75 - gfceu/.gitignore | 17 + gfceu/BUG | 1 + COPYING => gfceu/COPYING | 0 ChangeLog => gfceu/ChangeLog | 49 +- gfceu/INSTALL | 12 + gfceu/MANIFEST | 11 + gfceu/TODO | 12 + gfceu/UNINSTALL | 4 + gfceu/gfceu | 549 ++++++++ gfceu/gfceu.1 | 19 + data/gfceux.desktop => gfceu/gfceu.desktop | 6 +- gfceu/gfceu.glade | 767 +++++++++++ data/gfceux.png => gfceu/gfceu.png | Bin data/gfceux_big.png => gfceu/gfceu_big.png | Bin gfceu/gfceu_big_old.png | Bin 0 -> 9492 bytes gfceu/gfceu_french.glade | 761 ++++++++++ gfceu/gfceu_old.png | Bin 0 -> 1697 bytes gfceu/setup.py | 15 + gfceu/status_window.py | 40 + gfceux | 21 - setup.py | 24 - src/__init__.py | 1 - src/config_parse.py | 101 -- src/get_key.py | 52 - src/main.py | 657 --------- uninstall.py | 37 - 33 files changed, 2214 insertions(+), 3961 deletions(-) delete mode 100644 INSTALL delete mode 100644 TODO delete mode 100644 data/gfceux.1 delete mode 100644 data/gfceux.glade delete mode 100644 data/gfceux.xml delete mode 100755 get_key/build.sh delete mode 100644 get_key/main.cpp create mode 100644 gfceu/.gitignore create mode 100644 gfceu/BUG rename COPYING => gfceu/COPYING (100%) rename ChangeLog => gfceu/ChangeLog (67%) create mode 100644 gfceu/INSTALL create mode 100644 gfceu/MANIFEST create mode 100644 gfceu/TODO create mode 100644 gfceu/UNINSTALL create mode 100755 gfceu/gfceu create mode 100644 gfceu/gfceu.1 rename data/gfceux.desktop => gfceu/gfceu.desktop (73%) create mode 100644 gfceu/gfceu.glade rename data/gfceux.png => gfceu/gfceu.png (100%) rename data/gfceux_big.png => gfceu/gfceu_big.png (100%) create mode 100644 gfceu/gfceu_big_old.png create mode 100644 gfceu/gfceu_french.glade create mode 100644 gfceu/gfceu_old.png create mode 100755 gfceu/setup.py create mode 100644 gfceu/status_window.py delete mode 100755 gfceux delete mode 100755 setup.py delete mode 100644 src/__init__.py delete mode 100755 src/config_parse.py delete mode 100755 src/get_key.py delete mode 100755 src/main.py delete mode 100755 uninstall.py diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 0aaa8676..00000000 --- a/INSTALL +++ /dev/null @@ -1,18 +0,0 @@ -You can install gfceux with setup.py: - -$ sudo python setup.py install - -NOTE: The --prefix option of setup.py may be temporarily broken. -We believe this is a python issue, so just install to the default -path of /usr or just run the script out of the source directory. - -Requirements: -Python (tested with 2.6); (Ubuntu package name: python2.6) - NOTE: gfceux is not yet compatible with python 3.x -PyGTK (Ubuntu package name: python-gtk2) -Fceux 2.x - -NOTE: fceu 1.x is no longer supported in the gfceu 2.x series. - If you still want/need a front-end for gfceu use gfceu 0.x - - diff --git a/TODO b/TODO deleted file mode 100644 index df749269..00000000 --- a/TODO +++ /dev/null @@ -1,12 +0,0 @@ -TODO: -* implement UI for --special (combo box) -* use combo box for bpp -* use combo box to select gamepad to configure, simply UI -* joystick input support -* hotkey config -* resolution -* parse normal options (etc quiet) -* Browser - -Deferred: -* A lot of shit was going to be done with the client/server GUI, but netplay is fucked in svn as it is. diff --git a/data/gfceux.1 b/data/gfceux.1 deleted file mode 100644 index 851b5601..00000000 --- a/data/gfceux.1 +++ /dev/null @@ -1,20 +0,0 @@ -.TH gfceux 1 "August 10, 2008" "Lukas Sabota" -.SH NAME -GFCE UltraX - A GTK2 graphical front-end for fceux -.SH SYNOPSIS -.B gfceux -.BR [options] -.PP -.SH DESCRIPTION -Gfceux is a graphical front-end for fceux, an advanced Nintendo Entertainment System emulator. -It allows easy control over various options including input, network, video, and sound. -.SH OPTIONS -.TP -.B --version -Displays the version number of the application -.TP -.B --help -Displays a help message displaying options -.SH AUTHOR -.TP -Written for Ubuntu/Debian by Lukas Sabota. diff --git a/data/gfceux.glade b/data/gfceux.glade deleted file mode 100644 index e499edf7..00000000 --- a/data/gfceux.glade +++ /dev/null @@ -1,1445 +0,0 @@ - - - - - - 2 - 1 - 5 - 0.5 - 1 - - - 2 - 1 - 10 - 0.5 - 1 - - - 4046 - 1 - 65536 - 1 - 10 - - - 4046 - 1 - 65536 - 1 - 10 - - - Gamepad Configuration - - - - - - True - - - True - <b>NOTE:</b> The below GUI is brand new and joysticks are not completely support yet. To configure a joystick, use --inputcfg. - - True - True - - - 0 - - - - - True - - - True - 0 - none - - - True - 12 - - - True - 3 - 3 - - - Up - True - True - True - - - 1 - 2 - - - - - Left - True - True - True - - - 1 - 2 - - - - - Down - True - True - True - - - 1 - 2 - 2 - 3 - - - - - Right - True - True - True - - - 2 - 3 - 1 - 2 - - - - - - - - - - - - - - - - - - - - - - - - True - <b>D-Pad</b> - True - - - - - False - False - 0 - - - - - True - 0 - none - - - True - 12 - - - True - - - Select - True - True - True - - - False - False - 0 - - - - - Start - True - True - True - - - False - False - 1 - - - - - - - - - True - <b>Essentials</b> - True - - - - - 1 - - - - - True - 0 - none - - - True - 12 - - - True - - - True - - - B - True - True - True - - - 0 - - - - - A - True - True - True - - - 1 - - - - - 0 - - - - - True - - - Turbo B - True - True - True - - - 0 - - - - - Turbo A - True - True - True - - - 1 - - - - - 1 - - - - - - - - - True - <b>Alpha and Beta</b> - True - - - - - 2 - - - - - 1 - - - - - - - True - GFCE UltraX - 442 - gfceux.png - - - - True - 1 - - - True - True - 3 - - - True - 5 - 5 - - - True - 5 - - - True - 5 - ROM Filename: - - - False - False - 0 - - - - - True - True - - - 1 - - - - - _Browse... - True - True - False - True - - - - False - False - 2 - - - - - False - False - 0 - - - - - True - 5 - - - True - 5 - Movie Filename: - - - False - False - 0 - - - - - True - True - - - 1 - - - - - _Browse... - True - True - False - True - - - - False - False - 2 - - - - - False - False - 1 - - - - - True - 5 - - - True - 5 - Lua Script: - - - False - False - 0 - - - - - True - True - - - 1 - - - - - _Browse... - True - True - False - True - - - - False - False - 2 - - - - - False - False - 2 - - - - - - - True - Main - - - False - - - - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - 0 - - - - - True - Select an NES gamepad to configure. - True - - - False - False - 7 - 1 - - - - - False - False - 0 - - - - - True - 2 - 2 - 5 - 5 - - - Gamepad _1 - True - True - False - True - - - - - - - - - Gamepad _2 - True - True - False - True - - - - 1 - 2 - - - - - - Gamepad _4 - True - True - False - True - - - - 1 - 2 - 1 - 2 - - - - - - Gamepad _3 - True - True - False - True - - - - 1 - 2 - - - - - - False - False - 1 - - - - - gtk-help - True - True - False - True - - - - False - False - 5 - end - 2 - - - - - 1 - - - - - True - Input - - - 1 - False - - - - - True - 5 - 5 - - - Enable _OpenGL Rendering - True - True - False - True - True - - - False - False - 0 - - - - - Enable _Full Screen - True - True - False - True - True - - - False - False - 1 - - - - - True - <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> - True - True - - - False - False - 2 - - - - - _Autoscale Fullscreen - True - True - False - True - True - True - - - - False - 3 - - - - - True - 0 - none - - - True - 12 - - - True - - - True - - - True - X scale: - - - False - 5 - 0 - - - - - True - True - adjustment1 - 0.099999999776482579 - 1 - True - - - False - 1 - - - - - False - 0 - - - - - True - - - True - Y scale: - - - False - 5 - 0 - - - - - True - True - adjustment2 - 0.10000000000000001 - 1 - True - if-valid - - - False - 1 - - - - - False - 1 - - - - - - - - - True - <b>Manual Scaling</b> - True - - - - - 4 - - - - - True - - - True - Bits per pixel: - - - False - 5 - 0 - - - - - True - True - 2 - 32 - - - False - False - 1 - - - - - False - False - 5 - - - - - 2 - False - - - - - True - Video - - - 2 - False - - - - - True - 5 - - - Enable _Sound - True - True - False - True - True - True - - - False - 5 - 0 - - - - - Extra _Quaility - True - True - False - True - True - True - - - False - 5 - 1 - - - - - True - - - True - Sample rate: - - - False - False - 5 - 0 - - - - - True - True - 6 - 11000 - - - False - False - 1 - - - - - False - 5 - 2 - - - - - True - - - True - Buffer size (ms): - - - False - False - 5 - 0 - - - - - True - True - 3 - 48 - - - False - False - 1 - - - - - False - 3 - - - - - 3 - - - - - True - Sound - - - 3 - False - - - - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - 0 - - - - - True - If you would like to specify any command line options to FCE UltraX, specify them below. For a complete option reference, visit http://fceux.com . - -Invalid options may cause GFCE UltraX to behave incorrectly. - - True - - - False - False - 1 - - - - - False - False - 5 - 0 - - - - - True - - - True - Extra Parameters: - - - False - False - 5 - 0 - - - - - True - True - - - 5 - 1 - - - - - False - 1 - - - - - 4 - - - - - True - Advanced - - - 4 - False - - - - - True - 5 - 5 - - - _Host Game - True - True - False - True - True - - - - False - False - 0 - - - - - True - 0 - none - - - True - 19 - - - True - 2 - 2 - 5 - 5 - - - True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: - - - 1 - 2 - GTK_FILL - - - - - - True - True - adjustment3 - 1 - - - 1 - 2 - - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - - - - - False - False - 1 - - - - - _Join Game - True - True - False - True - True - host_radio - - - - False - False - 2 - - - - - True - 0 - none - - - True - 0 - 19 - - - True - 5 - 3 - 2 - 3 - 5 - - - True - True - - - 1 - 2 - - - - - - True - True - False - - - 1 - 2 - 2 - 3 - - - - - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - True - adjustment4 - 1 - - - 1 - 2 - 1 - 2 - - - - - - - - - - False - False - 3 - - - - - _No Network - True - True - False - True - True - True - host_radio - - - - False - False - 4 - - - - - 5 - - - - - Network - - - 5 - False - - - - - 10 - 0 - - - - - True - True - - - True - 3 - - - gtk-execute - True - True - True - True - True - False - True - - - - False - 0 - - - - - gtk-about - True - True - False - True - - - - False - False - 1 - - - - - gtk-quit - True - True - False - True - - - - False - 2 - - - - - 0 - - - - - False - False - 1 - - - - - - - normal - (C) Copyright 2008 - A GTK2 front-end end for the fceux Nintendo Entertainment System emulator. - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Lukas Sabota -<ltsmooth42@gmail.comt> - -Patch writers: -Scott Brown - translator-credits - Sketching: - J. Sammer -Digital Manipulation: - C. Kontros - -Artwork for old versions (< 0.2.7): - Jimmy Angelakos - <vyruss000@gmail.com> - gfceux_big.png - - - True - - - http://fceux.com - True - True - True - True - none - http://fceux.com - - - 3 - - - - - http://dietschnitzel.com/gfceu/ - True - True - True - True - none - http://dietschnitzel.com/gfceu/ - - - 4 - - - - - True - - - False - end - 0 - - - - - - diff --git a/data/gfceux.xml b/data/gfceux.xml deleted file mode 100644 index d354ca51..00000000 --- a/data/gfceux.xml +++ /dev/null @@ -1,1447 +0,0 @@ - - - - - - 2 - 1 - 5 - 0.5 - 1 - - - 2 - 1 - 10 - 0.5 - 1 - - - 4046 - 1 - 65536 - 1 - 10 - - - 4046 - 1 - 65536 - 1 - 10 - - - Gamepad Configuration - - - - - - True - - - True - <b>NOTE:</b> The below GUI is brand new and joysticks are not completely support yet. To configure a joystick, use --inputcfg. - - True - True - - - 0 - - - - - True - - - True - 0 - none - - - True - 12 - - - True - 3 - 3 - - - Up - True - True - True - - - 1 - 2 - - - - - Left - True - True - True - - - 1 - 2 - - - - - Down - True - True - True - - - 1 - 2 - 2 - 3 - - - - - Right - True - True - True - - - 2 - 3 - 1 - 2 - - - - - - - - - - - - - - - - - - - - - - - - True - <b>D-Pad</b> - True - - - - - False - False - 0 - - - - - True - 0 - none - - - True - 12 - - - True - - - Select - True - True - True - - - False - False - 0 - - - - - Start - True - True - True - - - False - False - 1 - - - - - - - - - True - <b>Essentials</b> - True - - - - - 1 - - - - - True - 0 - none - - - True - 12 - - - True - - - True - - - B - True - True - True - - - 0 - - - - - A - True - True - True - - - 1 - - - - - 0 - - - - - True - - - Turbo B - True - True - True - - - 0 - - - - - Turbo A - True - True - True - - - 1 - - - - - 1 - - - - - - - - - True - <b>Alpha and Beta</b> - True - - - - - 2 - - - - - 1 - - - - - - - True - GFCE UltraX - 442 - gfceux.png - - - - True - 1 - - - True - True - 3 - - - True - 5 - 5 - - - True - 5 - - - True - 5 - ROM Filename: - - - False - False - 0 - - - - - True - True - - - 1 - - - - - _Browse... - True - True - False - True - - - - False - False - 2 - - - - - False - False - 0 - - - - - True - 5 - - - True - 5 - Movie Filename: - - - False - False - 0 - - - - - True - True - - - 1 - - - - - _Browse... - True - True - False - True - - - - False - False - 2 - - - - - False - False - 1 - - - - - True - 5 - - - True - 5 - Lua Script: - - - False - False - 0 - - - - - True - True - - - 1 - - - - - _Browse... - True - True - False - True - - - - False - False - 2 - - - - - False - False - 2 - - - - - - - True - Main - - - False - - - - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - 0 - - - - - True - Select an NES gamepad to configure. - True - - - False - False - 7 - 1 - - - - - False - False - 0 - - - - - True - 2 - 2 - 5 - 5 - - - Gamepad _1 - True - True - False - True - - - - - - - - - Gamepad _2 - True - True - False - True - - - - 1 - 2 - - - - - - Gamepad _4 - True - True - False - True - - - - 1 - 2 - 1 - 2 - - - - - - Gamepad _3 - True - True - False - True - - - - 1 - 2 - - - - - - False - False - 1 - - - - - gtk-help - True - True - False - True - - - - False - False - 5 - end - 2 - - - - - 1 - - - - - True - Input - - - 1 - False - - - - - True - 5 - 5 - - - Enable _OpenGL Rendering - True - True - False - True - True - - - False - False - 0 - - - - - Enable _Full Screen - True - True - False - True - True - - - False - False - 1 - - - - - True - <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> - True - True - - - False - False - 2 - - - - - _Autoscale Fullscreen - True - True - False - True - True - True - - - - False - 3 - - - - - True - 0 - none - - - True - 12 - - - True - - - True - - - True - X scale: - - - False - 5 - 0 - - - - - True - True - adjustment1 - 0.099999999776482579 - 1 - True - - - False - 1 - - - - - False - 0 - - - - - True - - - True - Y scale: - - - False - 5 - 0 - - - - - True - True - adjustment2 - 0.10000000000000001 - 1 - True - if-valid - - - False - 1 - - - - - False - 1 - - - - - - - - - True - <b>Manual Scaling</b> - True - - - - - 4 - - - - - True - - - True - Bits per pixel: - - - False - 5 - 0 - - - - - True - True - 2 - 32 - - - False - False - 1 - - - - - False - False - 5 - - - - - 2 - False - - - - - True - Video - - - 2 - False - - - - - True - 5 - - - Enable _Sound - True - True - False - True - True - True - - - False - 5 - 0 - - - - - Extra _Quaility - True - True - False - True - True - True - - - False - 5 - 1 - - - - - True - - - True - Sample rate: - - - False - False - 5 - 0 - - - - - True - True - 6 - 48000 - - - False - False - 1 - - - - - False - 5 - 2 - - - - - True - - - True - Buffer size (ms): - - - False - False - 5 - 0 - - - - - True - True - 3 - 48 - - - False - False - 1 - - - - - False - 3 - - - - - 3 - - - - - True - Sound - - - 3 - False - - - - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - 0 - - - - - True - If you would like to specify any command line options to FCE UltraX, specify them below. For a complete option reference, visit http://fceux.com . - -Invalid options may cause GFCE UltraX to behave incorrectly. - - True - - - False - False - 1 - - - - - False - False - 5 - 0 - - - - - True - - - True - Extra Parameters: - - - False - False - 5 - 0 - - - - - True - True - - - 5 - 1 - - - - - False - 1 - - - - - 4 - - - - - True - Advanced - - - 4 - False - - - - - True - False - 5 - 5 - - - _Host Game - True - True - False - True - True - - - - False - False - 0 - - - - - True - 0 - none - - - True - 19 - - - True - 2 - 2 - 5 - 5 - - - True - 0 - Port: - - - GTK_FILL - - - - - - True - 0 - Password: - - - 1 - 2 - GTK_FILL - - - - - - True - True - adjustment3 - 1 - - - 1 - 2 - - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - - - - - False - False - 1 - - - - - _Join Game - True - True - False - True - True - host_radio - - - - False - False - 2 - - - - - True - 0 - none - - - True - 0 - 19 - - - True - 5 - 3 - 2 - 3 - 5 - - - True - True - - - 1 - 2 - - - - - - True - True - False - - - 1 - 2 - 2 - 3 - - - - - - True - 0 - Server Address: - - - GTK_FILL - - - - - - True - 0 - Server Port: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Password: - - - 2 - 3 - GTK_FILL - - - - - - True - True - adjustment4 - 1 - - - 1 - 2 - 1 - 2 - - - - - - - - - - False - False - 3 - - - - - _No Network - True - True - False - True - True - True - host_radio - - - - False - False - 4 - - - - - 5 - - - - - False - Network - - - 5 - False - - - - - 10 - 0 - - - - - True - True - - - True - 3 - - - gtk-execute - True - True - True - True - True - False - True - - - - False - 0 - - - - - gtk-about - True - True - False - True - - - - False - False - 1 - - - - - gtk-quit - True - True - False - True - - - - False - 2 - - - - - 0 - - - - - False - False - 1 - - - - - - - normal - (C) Copyright 2008 - A GTK2 front-end end for the fceux Nintendo Entertainment System emulator. - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Lukas Sabota -<ltsmooth42@gmail.comt> - -Patch writers: -Scott Brown - translator-credits - Sketching: - J. Sammer -Digital Manipulation: - C. Kontros - -Artwork for old versions (< 0.2.7): - Jimmy Angelakos - <vyruss000@gmail.com> - gfceux_big.png - - - True - - - http://fceux.com - True - True - True - True - none - http://fceux.com - - - 3 - - - - - http://dietschnitzel.com/gfceu/ - True - True - True - True - none - http://dietschnitzel.com/gfceu/ - - - 4 - - - - - True - - - False - end - 0 - - - - - - diff --git a/get_key/build.sh b/get_key/build.sh deleted file mode 100755 index 10fefdb5..00000000 --- a/get_key/build.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -g++ `sdl-config --cflags --libs` main.cpp -o get_fceu_key; diff --git a/get_key/main.cpp b/get_key/main.cpp deleted file mode 100644 index bb52f03b..00000000 --- a/get_key/main.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// main.cpp -// get_fceu_key -// this program opens an SDL window and gets an input event from the user. -// it than prints the values that are needed in the fceux config -// this was written to be used with gfceux, the GTK frontend for gfceu - -// Lukas Sabota -// Licensed under the GPL v2 -// July 16, 2008 - -#include -#include - -const int WIDTH = 300; -const int HEIGHT = 300; -const int BPP = 4; -const int DEPTH = 32; - -using namespace std; - -int main(int argc, char* argv[]) -{ - // the caption doesn't set on intrepid - // TODO: test on ubuntu 8.04 - SDL_WM_SetCaption("Press any key. . .", 0); - - SDL_Surface *screen; - SDL_Event event; - - // open any joysticks - for(int i = 0; i < SDL_NumJoysticks(); i++) - SDL_JoystickOpen(i); - - if (!(screen = SDL_SetVideoMode(WIDTH, HEIGHT, DEPTH, SDL_SWSURFACE))) - { - SDL_Quit(); - return 1; - } - - while(1) - { - while(SDL_PollEvent(&event)) - { - switch (event.type) - { - case SDL_QUIT: - return 0; - // this code was modified from drivers/sdl/input.cpp in fceu so - // that the same values will be written in the config as fceux --inputcfg - case SDL_KEYDOWN: - cout << "BUTTC_KEYBOARD" << endl; - cout << 0 << endl; - cout << event.key.keysym.sym << endl; - return 1; - case SDL_JOYBUTTONDOWN: - cout << "BUTTC_JOYSTICK" << endl; - cout << event.jbutton.which << endl; - cout << event.jbutton.button << endl; - return 1; - case SDL_JOYHATMOTION: - if(event.jhat.value != SDL_HAT_CENTERED) - { - cout << "BUTTC_JOYSTICK" << endl; - cout << event.jhat.which << endl; - cout << (0x2000 | ((event.jhat.hat & 0x1F) << 8) | - event.jhat.value) << endl; - return 1; - } - break; - } - } - } - return 0; -} - diff --git a/gfceu/.gitignore b/gfceu/.gitignore new file mode 100644 index 00000000..674deb69 --- /dev/null +++ b/gfceu/.gitignore @@ -0,0 +1,17 @@ +# A simulation of Subversion default ignores, generated by reposurgeon. +*.o +*.lo +*.la +*.al +*.libs +*.so +*.so.[0-9]* +*.a +*.pyc +*.pyo +*.rej +*~ +*.#* +.*.swp +.DS_store +# Simulated Subversion default ignores end here diff --git a/gfceu/BUG b/gfceu/BUG new file mode 100644 index 00000000..ac514cf1 --- /dev/null +++ b/gfceu/BUG @@ -0,0 +1 @@ +* Too much shit when trying to run with no display diff --git a/COPYING b/gfceu/COPYING similarity index 100% rename from COPYING rename to gfceu/COPYING diff --git a/ChangeLog b/gfceu/ChangeLog similarity index 67% rename from ChangeLog rename to gfceu/ChangeLog index fb8d00d0..0031c474 100644 --- a/ChangeLog +++ b/gfceu/ChangeLog @@ -1,49 +1,6 @@ -* Changed glade filename from gfceux.xml -> gfceux.glade -* Removed the need of running ./generate.ui after every glade change -* Got rid of some silly glade errors -* Changed the installation instructions to avoid breakage -* Gfceux now runs properly from the source directory without -being installed -================= version 2.1 ====================== ============ -* Increased the width of the sdl inputcfg window to be more visible -with larger font sizes -* Uninstall script works better -* Is now distributed as a python package. This makes things easier -for maintanence -* Is now installable -* Disabled gamepad GUI until joystick support can be completed -* Initial joystick config support: supports buttons, but hot hats and axes -* Documented and cleaned fceux config parser -* Udated about box UI -* Updated UI, explains joystick support isn't complete yet in the GUI -* Cleaned up glade file to silence warnings -* Pygame is no longer required for gfceux to run, just for the input GUI -* Turbo A and Turbo B support for gamepad GUI -* Added initial support for a graphical UI for configuring gamepads -* Moved gfceu options data file into .fceux instead of .fceultra -================= version 2.0.3 ================================= -* Updated UI slightly. Moved sound and advanced tabs; made autoscaling - configuration a bit more intuitive; rearranged some items; made some - text more clear -* Changed gfceu code references to gfceux -* Fixed error in which gfceux would display an ugly error message if - the fceux binary could not be found. -* Working on new config system for input. you can try by configuring - the third gamepad. It's not functional yet, but it's a start on more - intuitive gamepad configuration for sdl -================== version 2.0.2 ================================ -* Now stores config file in .fceultra -* If the .fceultra config directory doesn't exist yet, gfceux will - now create it. -================== version 2.0.0 ================================ -* Supports movie playback -* Support lua script loading -* Supports autoscale -* No longer requires GnomeVFS -* Major code cleanup -* Supports fceux command line options (different syntax from fceu) -* Now requires pygtk >= 2.12 -* Transitioned from gtk.glade to gtk.Builder. +========================== version 0.6.2 ======================== +* Minor string changes. +========================== version 0.6.1 ======================== * Changed some strings to reflect new email and website * Fixed and cleaned some stuff with the glade loading ========================== version 0.6.0 ======================== diff --git a/gfceu/INSTALL b/gfceu/INSTALL new file mode 100644 index 00000000..e1e363f6 --- /dev/null +++ b/gfceu/INSTALL @@ -0,0 +1,12 @@ +You can install gfceu with setup.py: + +$ sudo ./setup.py install + +Requirements: +Python (tested with 2.5) (Ubuntu package name: python) +PyGTK, GTK, and PyGlade (tested with 2.8) (Ubuntu package name: (python-gtk2 libgtk2.0-0 python-glade) +FCE Ultra 1.x (Ubuntu package name: fceu) + +Optional: +GnomeVFS 2 (tested with 2.14.1) (Ubuntu package name libgnomevfs2-0 python-gtk2) +alsa-oss (tested with 1.0.11) diff --git a/gfceu/MANIFEST b/gfceu/MANIFEST new file mode 100644 index 00000000..493dbe58 --- /dev/null +++ b/gfceu/MANIFEST @@ -0,0 +1,11 @@ +gfceu +setup.py +COPYING +ChangeLog +INSTALL +TODO +gfceu.glade +gfceu.desktop +gfceu.png +gfceu_big.png +gfceu.1 diff --git a/gfceu/TODO b/gfceu/TODO new file mode 100644 index 00000000..a793939d --- /dev/null +++ b/gfceu/TODO @@ -0,0 +1,12 @@ +8/2/2008: I'm not going to be puttin any more effort into gfceu 0.6. Use gfceux and fceux, it's much cleaner/newer/better code. + +TODO: +* Ensure version server >= 0.0.5 +* Resolution? +* Windows Support +* --last command line option +* normal options (quiet) +* server nick +* no xterm + In progress - status_window.py started, needs to work to be functional +* Browser? diff --git a/gfceu/UNINSTALL b/gfceu/UNINSTALL new file mode 100644 index 00000000..b235fb83 --- /dev/null +++ b/gfceu/UNINSTALL @@ -0,0 +1,4 @@ +To uninstall gfceux, run this as root: +$ sudo ./uninstall.py +If you installed gfceux to an alternate prefix, specify the prefix as an argument +$ sudo ./uninstall.py [prefix] diff --git a/gfceu/gfceu b/gfceu/gfceu new file mode 100755 index 00000000..d46e256d --- /dev/null +++ b/gfceu/gfceu @@ -0,0 +1,549 @@ +#!/usr/bin/python +# gfceu - Graphical launcher for FCE Ultra. +# Designed on Ubuntu, with platfrom independence in mind. +version = "0.6.2svn" +# Copyright (C) 2006 Lukas Sabota +## +""" +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +""" + + # # # # # # # # +# Python imports + +import sys +import os +import pickle +import shutil +from optparse import OptionParser +from subprocess import Popen + + # # # # # # # # +# Messaging Functions +def gfceu_message(message, use_gtk=False): + """ + gqfceu_message() + + This function prints messages to the user. This is generally used for status + messages. However, it can be used for important messages as well. If a + GTK message_box is requried, the use_gtk flag can be enabled + """ + print 'gfceu message: '+message + if use_gtk: + msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, + buttons=gtk.BUTTONS_CLOSE) + msgbox.set_markup(message) + msgbox.run() + msgbox.destroy() + +def gfceu_error(message, code, use_gtk=True, fatal=True): + """ + gfceu_error() + + TODO: This can be reworked to use the raise/except methods already defined + in the standard python language. One of these days... + """ + print '# # # #' + print 'gfceu ERROR code '+str(code)+':' + print message + print '# # # #' + if use_gtk: + msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, + buttons=gtk.BUTTONS_CLOSE) + msgbox.set_markup('gfceu ERROR Code '+str(code)+':\n'+message) + msgbox.run() + msgbox.destroy() + if fatal: + sys.exit(code) + + + # # # # # # # # +# Import libraries +try: + import pytgtk + pygtk.require("2.6") +except: + pass +try: + import gtk +except ImportError: + gfceu_error('The PyGTK libraries cannot be found.\n\ + Ensure that PyGTK (>=2.0) is installed on this system.\n\ + On Debian based systems (like Ubuntu), try this command:\n\ + sudo apt-get install python-gtk2 libgtk2.0-0', 1, False) + +try: + import gtk.glade +except ImportError: + gfceu_error('The glade libraries cannot be found.\n\ + Ensure that libglade is installed on this system.\n\ + On Debian based systems (like Ubuntu), try this command:\n\ + sudo apt-get install libglade2-0 python-gtk2 python-glade2', 2, False) + +try: + import gnomevfs + have_gnomevfs = True +except ImportError: + gfceu_error('The gnomevfs libraries cannot be found.\n\ + To enable ROM loading over the network, ensure that gnomevfs is installed on\ + this system.\n\ + On Debian based systems (like Ubuntu), try this command:\n\ + sudo apt-get install python-gtk2 libgnomevfs2-0', 5, False, False) + have_gnomevfs = False + + + # # # # # # # # +# GFCEU Functions + +class game_options: + sound_check = True + fullscreen_check = False + extra_entry = '' + romfile = '' + opengl_check = False + join_radio = False + join_add = '' + join_port = 4046 + join_pass = '' + host_radio = False + host_port = 4046 + host_pass = '' + no_network_radio = True + network_rom = False + + +def load_options(): + global options, optionsfile + try: + ifile = file(optionsfile, 'r') + options = pickle.load(ifile) + pickle.load(ifile) + except: + return + ifile.close() + +def save_options(): + global options, optionsfile, appconfigdir + ofile = file(optionsfile, 'w') + pickle.dump(options, ofile) + ofile.close() + +def give_widgets(): + """ + give_widgets() + + This function takes data from the options struct and relays it to + the GTK window + """ + global xml, options + try: + widgets['rom_entry'].set_text(options.romfile) + widgets['sound_check'].set_active(options.sound_check) + + widgets['fullscreen_check'].set_active(options.fullscreen_check) + widgets['opengl_check'].set_active(options.opengl_check) + + widgets['extra_entry'].set_text(options.extra_entry) + + # Usability point: + # Users will probably not want to remember their previous network setting. + # Users may accidently be connecting to a remote server/hosting a game when + # they were unaware. + # No network is being set by default + widgets['no_network_radio'].set_active(True) + widgets['join_add'].set_text(options.join_add) + widgets['join_port'].set_value(float(options.join_port)) + widgets['join_pass'].set_text(options.join_pass) + widgets['host_port'].set_value(float(options.host_port)) + widgets['host_pass'].set_text(options.host_pass) + + except AttributeError: + # When new widgets are added, old pickle files might break. + options = game_options() + give_widgets() + +def setup_environment (): + """ + Configures the environment if this is the first time the application + has been run. For instance, it checks for the options file and creates + it if it doesn't exist. It also converts between the old version and + the new version of this application, which stores the options file in + a separate directory. + """ + + global appconfigdir, old_optionsfile, optionsfile + + + if not os.path.exists(appconfigdir): + # this is the first time the application is run. + # create the directory + gfceu_message("Creating application settings directory") + os.mkdir(appconfigdir) + + if os.path.exists(old_optionsfile): + # for full backwards compatibility, this file is processed, but moved + # to the new directory and filename for future compatibility + gfceu_message("Old version of options file found, converting to new version") + shutil.move(old_optionsfile,optionsfile) + +def set_options(): + """ + set_options() + + This function grabs all of the data from the GTK widgets + and stores it in the options object. + """ + global xml + options.romfile = widgets['rom_entry'].get_text() + options.sound_check = widgets['sound_check'].get_active() + + options.fullscreen_check = widgets['fullscreen_check'].get_active() + options.opengl_check = widgets['opengl_check'].get_active() + + options.extra_entry = widgets['extra_entry'].get_text() + + options.join_radio = widgets['join_radio'].get_active() + options.host_radio = widgets['host_radio'].get_active() + options.no_network_radio = widgets['no_network_radio'].get_active() + options.join_add = widgets['join_add'].get_text() + options.join_port = widgets['join_port'].get_value() + options.join_pass = widgets['join_pass'].get_text() + options.host_port = widgets['host_port'].get_value() + options.host_pass = widgets['host_pass'].get_text() + + +def launch(passed, local=False): + global xml, options, fceu_server_binary, fceu_binary, aoss_binary + set_options() + + if options.sound_check: + sound = '-sound 1 ' + else: + sound = '-sound 0 ' + + if options.fullscreen_check: + fullscreen = '-fs 1 ' + else: + fullscreen = '-fs 0 ' + + if options.join_radio: + if options.join_pass == '': + netpass = '' + else: + netpass = '-netpassword ' + '"' + options.join_pass + '" ' + network = '-connect "' + options.join_add + '"'\ + ' -netport '+ str(options.join_port) + ' ' + netpass + else: + network = '' + + if options.host_radio: + if options.host_pass == '': + netpass = ' ' + else: + netpass = ' -netpassword ' + '"' + options.host_pass + '" ' + network = '-connect localhost -netport '+\ + str(options.host_port) + netpass + ' ' + + + if local: + network = '' + + if options.opengl_check: + opengl = '-opengl 1 ' + else: + opengl = '-opengl 0 ' + + command = aoss_binary + ' ' + fceu_binary +' '+ sound + fullscreen +\ + network + opengl + options.extra_entry + ' '+ passed + gfceu_message('Command: ' + command) + + + if options.host_radio: + xterm_binary = find_binary("xterm") + if xterm_binary == None: + gfceu_error("Cannot find xterm on this system. You will not \n\ + be informed of server output.", 102, True, False) + args = [fceu_server_binary] + else: + args = [xterm_binary, "-e", fceu_server_binary] + args.append('--port') + args.append(str(options.host_port)) + if options.host_pass: + args.append("--password") + args.append(options.host_pass) + pid = Popen(args).pid + + widgets['main_window'].hide() + + # os.system() is a blocker, so we must force + # gtk to process our events. + while gtk.events_pending(): + gtk.main_iteration_do() + + os.system(command) + if options.host_radio: + os.kill(pid, 9) + widgets['main_window'].show() + +def find_binary(this_binary): + path = os.getenv('PATH') + directories= [] + directory = '' + # check for '$' so last entry is processed + for x in path + '$': + if x != ':' and x != '$': + directory = directory + x + else: + directories.append(directory) + directory = '' + + for x in directories: + if os.path.isfile(os.path.join(x, this_binary)): + return os.path.join(x,this_binary) + + if os.path.isfile(os.path.join(os.curdir,this_binary)): + return os.path.join(os.curdir, this_binary) + + return None + + # # # # # # # # +# GTK Signal Handlers +class GladeHandlers: + def launch_button_clicked(arg1): + global xml + global options + options.romfile = widgets['rom_entry'].get_text() + if widgets['rom_entry'].get_text() == '': + gfceu_message('Please specify a ROM to open in the main tab.', True) + return + if options.network_rom: + try: + myvfs = gnomevfs.Handle(options.romfile) + # FIXME + # Smarter way of handling this? Copying direct error information? + except gnomevfs.HostNotFoundError: + gfceu_error("Remote ROM host not found.", 7, True, False) + return + except: + gfceu_error("Failed to open the network ROM.", 6, True, False) + return + myfile = file('/tmp/gfceu.nes', 'wb') + while 1: + try: + myfile.write(myvfs.read(1024)) + except gnomevfs.EOFError: + break + except: + gfceu_error("Failed to open the network ROM.", 10, True, False) + return + + myvfs.close() + myfile.close() + romfile = '/tmp/gfceu.nes' + else: + romfile = options.romfile + + launch('"'+romfile+'"') + + + def about_button_clicked(arg1): + global xml + widgets['about_dialog'].set_name('GNOME FCE Ultra '+version) + widgets['about_dialog'].run() + widgets['about_dialog'].hide() + + def browse_button_clicked(widget): + global xml,options + set_options() + chooser = gtk.FileChooserDialog("Open...", None, + gtk.FILE_CHOOSER_ACTION_OPEN, + (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, + gtk.STOCK_OPEN, gtk.RESPONSE_OK)) + if have_gnomevfs: + chooser.set_property("local-only", False) + else: + chooser.set_property("local-only", True) + + chooser.set_default_response(gtk.RESPONSE_OK) + + filter=gtk.FileFilter() + filter.set_name("NES Roms") + filter.add_mime_type("application/x-nes-rom") + filter.add_mime_type("application/zip") + filter.add_pattern("*.nes") + filter.add_pattern("*.zip") + chooser.add_filter(filter) + + filter = gtk.FileFilter() + filter.set_name("All files") + filter.add_pattern("*") + chooser.add_filter(filter) + + + + if options.romfile == '': + folder = os.getenv('HOME') + else: + folder = os.path.split(options.romfile)[0] + + chooser.set_current_folder (folder) + + response = chooser.run() + chooser.hide() + + if response == gtk.RESPONSE_OK: + if chooser.get_filename(): + x = chooser.get_filename() + widgets['rom_entry'].set_text(x) + options.romfile = x + options.network_rom = False + elif chooser.get_uri(): + x = chooser.get_uri() + widgets['rom_entry'].set_text(x) + options.romfile = x + options.network_rom = True + + def gamepad_clicked(widget): + print widget.name + d = {'gp1_button' : '1', + 'gp2_button' : '2', + 'gp3_button' : '3', + 'gp4_button' : '4'} + command = '-inputcfg gamepad' + d[widget.name] + ' /dev/null' + launch(command, True) + + def config_help_button_clicked(arg1): + msgbox = gtk.MessageDialog(parent=None, flags=0, + type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE) + msgbox.set_markup("Once a gamepad is seleceted, a titlebar will be displayed\ + indicating a NES button. Press the button or key you would like to have\ + associated with the button indicated on the titlebar. This process\ + will repeat until all buttons on the gamepad are configured.") + msgbox.run() + msgbox.hide() + + + def join_radio_clicked(arg1): + global options + widgets['join_frame'].set_sensitive(True) + widgets['host_frame'].set_sensitive(False) + options.join_radio = True + options.host_radio = False + options.no_network_radio = False + + def host_radio_clicked(arg1): + global fceu_server_binary + if widgets['host_radio'].get_active(): + fceu_server_binary = find_binary('fceu-server') + if fceu_server_binary == None: + if os.name == 'nt': + gfceu_error("The fceu server software cannot be found. \n\ + Ensure that it is installed in the same directory as \n\ + GFCE Ultra.", 102, True, False) + else: + gfceu_error("The fceu server software cannot be found on \n\ + this system. Ensure that it is installed and in your path.", + 101, True, False) + widgets['no_network_radio'].set_active(True) + options.no_network_radio = True + return False + + gfceu_message("Using: "+fceu_server_binary) + widgets['join_frame'].set_sensitive(False) + widgets['host_frame'].set_sensitive(True) + options.join_radio = False + options.host_radio = True + options.no_network_radio = False + + def no_network_radio_clicked(arg1): + widgets['join_frame'].set_sensitive(False) + widgets['host_frame'].set_sensitive(False) + options.join_radio = False + options.host_radio = False + options.no_network_radio = True + + def end(widget,arg=0): + global xml, options, optionsfile + set_options() + save_options() + gtk.main_quit() + +############################################################################## +# Globals +options = None +appconfigdir = os.getenv('HOME') + '/.gfceu' +old_optionsfile = os.getenv('HOME')+'/.gfceu_options' +optionsfile = appconfigdir + 'gfceu_options.dat' +fceu_binary = None +aoss_binary = None +fceu_server_binary = None +#version is defined earlier in the code +#have_vfs is defined earlier in the code + +class WidgetsWrapper: + def __init__(self): + # Search for the glade file + # Check first in the directory of this script. + if os.path.isfile('gfceu.glade'): + glade_file = 'gfceu.glade' + # Then check to see if its installed on a *nix system + elif os.path.isfile(os.path.join(os.path.dirname(sys.executable), '../share/gfceu/gfceu.glade')): + glade_file = os.path.join(os.path.dirname(sys.executable), '../share/gfceu/gfceu.glade') + else: + print 'ERROR.' + print 'Could not find the glade interface file.' + print 'Try reinstalling the application.' + sys.exit(1) + + self.widgets = gtk.glade.XML(glade_file) + self.widgets.signal_autoconnect(GladeHandlers.__dict__) + + def __getitem__(self, key): + return self.widgets.get_widget(key) + + + # # # # # # # # +# main +if __name__ == '__main__': + # Parse options + parser = OptionParser(version='%prog '+ version) + parser.parse_args() + + fceu_binary = find_binary('fceu') + if fceu_binary == None: + gfceu_error('Could not find the fceu binary.\n\ + Ensure that FCE Ultra is installed and in the $PATH.\n\ + On Debian based systems (like Ubuntu), try the following command:\n\ + sudo apt-get install fceu', 4, True) + else: + gfceu_message('Using: '+fceu_binary) + aoss_binary = find_binary('aoss') + if aoss_binary == None: + gfceu_error('Could not find the the ALSA OSS wrapper.\n\ + GFCEU will not be able to share the sound device with other applications.\n\ + On Debian based systems (like Ubuntu), try the following command:\n\ + sudo apt-get install alsa-oss', 76, True, False) + + widgets = WidgetsWrapper() + widgets['main_window'].show_all() + setup_environment() + + options = game_options() + load_options() + give_widgets() + try: + gtk.main() + except KeyboardInterrupt: + sys.exit(0) diff --git a/gfceu/gfceu.1 b/gfceu/gfceu.1 new file mode 100644 index 00000000..74543b99 --- /dev/null +++ b/gfceu/gfceu.1 @@ -0,0 +1,19 @@ +.TH gfceu 1 "July 17 2006" "Lukas Sabota" +.SH NAME +GNOME FCE Ultra - A graphical front-end for FCE Ultra +.SH SYNOPSIS +.B gfceu +.BR [options] +.PP +.SH DESCRIPTION +GFCE Ultra is a graphical front-end for FCE Ultra, an advanced Nintendo Entertainment System emulator. The program allows easy control over various options including input, network, video, and sound. It uses the GTK+2 library and optionally GNOMEVFS. +.SH OPTIONS +.TP +.B --version +Displays the version number of the application +.TP +.B --help +Displays a help message displaying options +.SH AUTHOR +.TP +Written for Ubuntu/Debian by Lukas Sabota. diff --git a/data/gfceux.desktop b/gfceu/gfceu.desktop similarity index 73% rename from data/gfceux.desktop rename to gfceu/gfceu.desktop index fe60738b..37cc8e87 100644 --- a/data/gfceux.desktop +++ b/gfceu/gfceu.desktop @@ -1,10 +1,10 @@ [Desktop Entry] Encoding=UTF-8 -Name=FCEUX NES Emulator +Name=GFCE Ultra NES Emulator Comment=Play Nintendo ROM files -Exec=gfceux +Exec=gfceu Terminal=false Type=Application StartupNotify=true -Icon=gfceux +Icon=gfceu Categories=GNOME;GTK;Game; diff --git a/gfceu/gfceu.glade b/gfceu/gfceu.glade new file mode 100644 index 00000000..7d23bf6e --- /dev/null +++ b/gfceu/gfceu.glade @@ -0,0 +1,767 @@ + + + + + + True + GFCE Ultra + 442 + gfceu.png + + + + True + 1 + + + True + True + 3 + + + True + 5 + 5 + + + True + 5 + + + True + 5 + ROM Filename: + + + False + False + + + + + True + True + + + 1 + + + + + True + True + _Browse... + True + 0 + + + + False + False + 2 + + + + + False + False + + + + + True + True + Enable _Sound + True + 0 + True + True + + + False + False + 1 + + + + + + + True + Main + + + tab + False + + + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + Select an NES gamepad to configure. + True + + + False + False + 7 + 1 + + + + + False + False + + + + + True + 2 + 2 + 5 + 5 + + + True + True + Gamepad _1 + True + 0 + + + + + + + + + True + True + Gamepad _2 + True + 0 + + + + 1 + 2 + + + + + + True + True + Gamepad _4 + True + 0 + + + + 1 + 2 + 1 + 2 + + + + + + True + True + Gamepad _3 + True + 0 + + + + 1 + 2 + + + + + + False + False + 1 + + + + + True + True + gtk-help + True + 0 + + + + False + False + 2 + + + + + 1 + + + + + True + Input + + + tab + 1 + False + + + + + True + 5 + 5 + + + True + True + Enable _OpenGL Rendering + True + 0 + True + + + False + False + + + + + True + True + Enable _Full Screen + True + 0 + True + + + False + False + 1 + + + + + True + <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> + True + True + + + False + False + 2 + + + + + 2 + + + + + True + Video + + + tab + 2 + False + + + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. + +Invalid options may cause GFCE Ultra to perform incorrectly. + + True + + + False + False + 1 + + + + + False + False + 5 + + + + + True + + + True + Extra Parameters: + + + False + False + 5 + + + + + True + True + + + 5 + 1 + + + + + False + 1 + + + + + 3 + + + + + True + Advanced + + + tab + 3 + False + + + + + True + 5 + 5 + + + True + True + _Host Game + True + 0 + True + + + + False + False + + + + + True + False + 0 + GTK_SHADOW_NONE + + + True + 19 + + + True + 2 + 2 + 5 + 5 + + + True + 0 + Port: + + + GTK_FILL + + + + + + True + 0 + Password: + + + 1 + 2 + GTK_FILL + + + + + + True + True + 4046 1 65536 1 10 10 + 1 + + + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 + + + + + + + + + + False + False + 1 + + + + + True + True + _Join Game + True + 0 + True + host_radio + + + + False + False + 2 + + + + + True + False + 0 + GTK_SHADOW_NONE + + + True + 0 + 19 + + + True + 5 + 3 + 2 + 3 + 5 + + + True + True + + + 1 + 2 + + + + + + True + True + False + * + + + 1 + 2 + 2 + 3 + + + + + + True + 0 + Server Address: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Password: + + + 2 + 3 + GTK_FILL + + + + + + True + True + 4046 1 65536 1 10 10 + 1 + + + 1 + 2 + 1 + 2 + + + + + + + + + + False + False + 3 + + + + + True + True + _No Network + True + 0 + True + True + host_radio + + + + False + False + 4 + + + + + 4 + + + + + True + Network + + + tab + 4 + False + + + + + 10 + + + + + True + True + + + True + 3 + + + True + True + True + True + True + gtk-execute + True + 0 + + + + False + + + + + True + True + gtk-about + True + 0 + + + + False + False + 1 + + + + + True + True + gtk-quit + True + 0 + + + + False + 2 + + + + + + + False + False + 1 + + + + + + + GDK_WINDOW_TYPE_HINT_NORMAL + (C) Copyright 2008 + A GNOME front-end end for the FCE Ultra Nintendo Entertainment System emulator + http://dietschnitzel.com/gfceu/ + This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + Lukas Sabota +<ltsmooth42@gmail.comt> + +Patch writers: +Scott Brown + translator-credits + Sketching: + J. Sammer +Digital Manipulation: + C. Kontros + +Artwork for old versions (< 0.2.7): + Jimmy Angelakos + <vyruss000@gmail.com> + gfceu_big.png + + + True + + + + + + True + + + False + GTK_PACK_END + + + + + + diff --git a/data/gfceux.png b/gfceu/gfceu.png similarity index 100% rename from data/gfceux.png rename to gfceu/gfceu.png diff --git a/data/gfceux_big.png b/gfceu/gfceu_big.png similarity index 100% rename from data/gfceux_big.png rename to gfceu/gfceu_big.png diff --git a/gfceu/gfceu_big_old.png b/gfceu/gfceu_big_old.png new file mode 100644 index 0000000000000000000000000000000000000000..24ecfa2662c13ea98d75664d3163d895f5edc1f7 GIT binary patch literal 9492 zcmV+vCF|OWP)Tux!^=-+ycGbGmQ$ z9o{@h4-K{@WZ9CCjE#jcwg?GeXD}2HAS59vQmNzvRiRQzDkPOkrSgeps1E-ymb=1T29{Zi&NQj`KfFLTMVy7#l1o;uD=KI#6C@L{ORs}8hiYoSZLd&^!UP=iS zA*!R}YYwa|AkOpc-|@j+zvtKMQMCl`T92iz5NSQNzOltuAAgGN;h3nAqzP3e#6V~Q zNwXMZjHu@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>S{W!=2}5B=Cah+xMtc8#ochBzm@`Yx5px4CdcvCZ@im3Z@$YCrj*AYC!y2rvDjO96)bWcifBK+ zrb`gsXa(q%KDao=RKiN}EG_ghZ(q`m3+qhtgYqt|d?AlINIS}yQkuV~DOY+`46F$1 zJd&F0*#Y~id%vECkok?J;rR|j29LC$T*u8Heo?~3ElcxXBDea#U`XQ{vw^H{sB5ZL zbJ0SW3%_`s6)+!TUssaz^`d|_@Kh3yZDzB0Zngs2sAGHJ>O2AW4Xc3IsxXy-rv;vE zHyX%I68?OZYmHa4li$z^D3I$0v*PwPv)TEt6|UU~1!xPuZ_jbwyk4a7>qP-gO99y5 z3%g(>++;HpTDxF_*&yxzFBCAazsI)n+J$Uxq6yj!*B`fh(Vpfnf4wUpv;~Ti` literal 0 HcmV?d00001 diff --git a/gfceu/gfceu_french.glade b/gfceu/gfceu_french.glade new file mode 100644 index 00000000..5b925125 --- /dev/null +++ b/gfceu/gfceu_french.glade @@ -0,0 +1,761 @@ + + + + + + True + GFCE Ultra + 442 + gfceu.png + + + + True + 1 + + + True + True + 3 + + + True + 5 + 5 + + + True + 5 + + + True + 5 + Fichier ROM: + + + False + False + + + + + True + True + + + 1 + + + + + True + True + _Parcourir... + True + + + + False + False + 2 + + + + + False + False + + + + + True + True + Activer _Son + True + True + True + + + False + False + 1 + + + + + False + + + + + True + Général + + + tab + False + False + + + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + Sélectionner un gamepad NES à configurer. + True + + + False + False + 7 + 1 + + + + + False + False + + + + + True + 2 + 2 + 5 + 5 + + + True + True + Gamepad _1 + True + + + + + + + + + True + True + Gamepad _2 + True + + + + 1 + 2 + + + + + + True + True + Gamepad _4 + True + + + + 1 + 2 + 1 + 2 + + + + + + True + True + Gamepad _3 + True + + + + 1 + 2 + + + + + + False + False + 1 + + + + + True + True + gtk-help + True + + + + False + False + 2 + + + + + 1 + False + + + + + True + Manette + + + tab + 1 + False + False + + + + + True + 5 + 5 + + + True + True + Permettre le rendu _OpenGL + True + True + + + False + False + + + + + True + True + Permettre le _plein écran + True + True + + + False + False + 1 + + + + + True + <small><i>(Presser Alt+Entrée pour permutter.)</i></small> + True + True + + + False + False + 2 + + + + + 2 + False + + + + + True + Vidéo + + + tab + 2 + False + False + + + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + Si vous voulez spécifier des paramètres pour FCE Ultra, faîtes-le ci-dessous. Consultez la documentation officielle FCE Ultra. + +De mauvaises options dégradent les performances. + + True + + + False + False + 1 + + + + + False + False + 5 + + + + + True + + + True + Extra Paramètres: + + + False + False + 5 + + + + + True + True + + + 5 + 1 + + + + + False + 1 + + + + + 3 + False + + + + + True + Avancé + + + tab + 3 + False + False + + + + + True + 5 + 5 + + + True + True + Jeu _hôte + True + True + + + + False + False + + + + + True + False + 0 + GTK_SHADOW_NONE + + + True + 19 + + + True + 2 + 2 + 5 + 5 + + + True + 0 + Port: + + + GTK_FILL + + + + + + True + 0 + Mot de passe: + + + 1 + 2 + GTK_FILL + + + + + + True + True + 4046 1 65536 1 10 10 + 1 + + + 1 + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 + + + + + + + + + + False + False + 1 + + + + + True + True + _Joindre le jeu + True + True + host_radio + + + + False + False + 2 + + + + + True + False + 0 + GTK_SHADOW_NONE + + + True + 0 + 19 + + + True + 5 + 3 + 2 + 3 + 5 + + + True + True + + + 1 + 2 + + + + + + True + True + False + * + + + 1 + 2 + 2 + 3 + + + + + + True + 0 + Addresse Serveur: + + + GTK_FILL + + + + + + True + 0 + Server Port: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Mot de passe: + + + 2 + 3 + GTK_FILL + + + + + + True + True + 4046 1 65536 1 10 10 + 1 + + + 1 + 2 + 1 + 2 + + + + + + + + + + False + False + 3 + + + + + True + True + _Pas de Réseau + True + True + True + host_radio + + + + False + False + 4 + + + + + 4 + False + + + + + True + Réseau + + + tab + 4 + False + False + + + + + 10 + + + + + True + True + + + True + 3 + + + True + True + True + True + True + gtk-execute + True + + + + False + + + + + True + True + gtk-about + True + + + + False + False + 1 + + + + + True + True + gtk-quit + True + + + + False + 2 + + + + + + + False + False + 1 + + + + + + + (C) Copyright 2006 + Une interface GNOME pour l'émulateur FCE Ultra Nintendo Entertainment System + http://gfceu.thepiratecove.org/ + Logiciel Libre; vous pouvez le redistribuer et/ou le modifier +tant que vous respectez la licence GNU General Public +de la Free Software Foundation; de la version 2, ou de la dernière version. + +Ce programme est distribué dans l'espoir d'être utile, +mais SANS AUCUNE GARANTIE... Voir la licence +GNU General Publicpour plus de détails. + +Si vous ne disposez pas dela licence GNU General Public +écrivez à la the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + Lukas Sabota +<punkrockguy318@comcast.net> + +Patch Writers: +Scott Brown + translator-credits + Sketching: + J. Sammer +Digital Manipulation: + C. Kontros + +Artwork for old versions (< 0.2.7): + Jimmy Angelakos + <vyruss000@gmail.com> + gfceu_big.png + + + True + + + + + + True + + + False + GTK_PACK_END + + + + + + diff --git a/gfceu/gfceu_old.png b/gfceu/gfceu_old.png new file mode 100644 index 0000000000000000000000000000000000000000..ab5144d937c337c3be13d38f94f688638ea9e532 GIT binary patch literal 1697 zcmV;S244AzP)yNXjFeXu$A9NOGdnZP z%?%eag=lswA zoGX9>l7RgE`M=Bz3=Z-3xp#?tL>Prc-V^x<^@{gO6h%Z)#OL<)@{L2^7XHtX06Kwn zK)Vyidl&mT{M-vTafD%nb3))8BH(>Q-Fwt~wr|_atr!Vl4e(juP6X6@qA0@S0Z@g& z!Rp((&?tgrg6V4`ByqO{fCI7yVk5)=u!&_Ns488B0zd5C!($V}Joc#`))m?bR6mM6 zX?kt|5FoGzwTTX(pdLX9P~590$@gC(dF&WNE}$w)8gaJ8ZlKNf&H~$jKLDe^EbzE% z`Qwe(iYlRks^V3c>D^0l%O-03_k)1Sq9N@9x`CI06To+XmB2pWS>S87CIuW!EPMo^ z4Nskze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up.py new file mode 100755 index 00000000..6e327ce7 --- /dev/null +++ b/gfceu/setup.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +from distutils.core import setup +setup(name="gfceu", + version="0.6.1", + scripts = ['gfceu'], + data_files=[('share/gfceu/',['gfceu.glade', 'gfceu_big.png', 'gfceu.png']), + ('share/pixmaps/', ['gfceu.png']), + ('share/man/man1/', ['gfceu.1']), + ('share/applications/', ['gfceu.desktop'])], + author = "Lukas Sabota", + author_email = "ltsmooth42 _at_ gmail.com", + url = "http://dietschnitzel.com/gfceu" + + ) + diff --git a/gfceu/status_window.py b/gfceu/status_window.py new file mode 100644 index 00000000..4970cc84 --- /dev/null +++ b/gfceu/status_window.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python +# A cool thing that i don't feel like explaining +import gtk +import gobject +import os +class shit: + def __init__(self, command, title="Status Window"): + self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) + self.window.set_default_size(400,300) + self.window.set_title(title) + + self.scroll = gtk.ScrolledWindow() + self.scroll.set_property("hscrollbar-policy", gtk.POLICY_NEVER) + + self.buffer = gtk.TextBuffer() + + self.text_view = gtk.TextView(self.buffer) + self.text_view.set_editable(False) + self.window.add(self.scroll) + self.scroll.add(self.text_view) + + gobject.timeout_add(10, self.get_output) + + self.handle = os.popen(command, "r",1) + self.add(self.handle.readlines()) + def get_output(self): + self.add(self.handle.read()) + + def show(self): + self.window.show_all() + + def hide(self): + self.window.hide_all() + + def add(self, string): + self.buffer.insert_at_cursor(string) + +myshit = shit("fceu-server", "THE StatUZ") +myshit.show() +gtk.main() diff --git a/gfceux b/gfceux deleted file mode 100755 index 11eaa441..00000000 --- a/gfceux +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -# -# GTK2 GUI for FCE UltraX -# -# Lukas Sabota -# -# -import platform -import sys -if platform.python_version() < '2.5.0': - print "Python version too old, use one greater than 2.5.0"; - sys.exit(); - -try: - from src import main -except: - from gfceux import main - -app = main.GfceuxApp() - - diff --git a/setup.py b/setup.py deleted file mode 100755 index 005b70df..00000000 --- a/setup.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -from distutils.core import setup - -setup(name="gfceux", - version="2.2svn", - scripts = ['gfceux'], - packages = ['gfceux'], - package_dir = {'gfceux': 'src'}, - data_files=[ - ('share/gfceux/', - ['data/gfceux.glade', 'data/gfceux_big.png', 'data/gfceux.png', - 'COPYING']), - ('share/pixmaps/', - ['data/gfceux.png']), - ('share/man/man1/', - ['data/gfceux.1']), - ('share/applications/', - ['data/gfceux.desktop'])], - author = "Lukas Sabota", - author_email = "ltsmooth42 _at_ gmail.com", - url = "http://dietschnitzel.com/gfceu" - ) - diff --git a/src/__init__.py b/src/__init__.py deleted file mode 100644 index 6551d283..00000000 --- a/src/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ["gfceux"] diff --git a/src/config_parse.py b/src/config_parse.py deleted file mode 100755 index d59e675d..00000000 --- a/src/config_parse.py +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env python - -# config_parse.py -# This module handles the reading and writing of keys to the fceux -# config file. -# -# Lukas Sabota -# Licensed under the GPL - -import re -import os - -class FceuxConfigParser: - def __init__(self, filename): - self.fn = filename - - def _open(self, mode): - try: - self.f = open(self.fn, mode) - return 1 - except: - if mode == "r": - print "Can't open config for reading." - else: - print "Couldn't write to the config." - return 0 - - - - def readKey(self, keyname): - """ readKey() - reads a key from the configfile and returns the value - """ - self._open("r") - # do some lines - while 1: - line = self.f.readline() - if line == 0: - break - if re.search(keyname, line): - self._close() - return line - - # key not found - self.f.close() - return None - - def addKey(self, keyname, value=""): - """ addKey() - adds a key with a (optional) value to the config file. - """ - - self._open("a") - self.f.write(keyname + " = " + str(value)) - self.f.close() - - def writeKey(self, keyname, value): - """ writeKey() - modifies an existing key in the config file. - """ - self._open("r") - - buf = "" - - cursor = 0 - # find the key - while 1: - data = self.f.read(keyname.__len__()) - buf += data - if data == "": - print "key " + keyname + " not found" - return None - if data == keyname: - break - else: - buf += self.f.readline() - - print value - - buf += self.f.read(3) - - buf += str(value) - buf += '\n' - - # ignore the rest of the old line - self.f.readline() - - # read the rest of the file - while 1: - data = self.f.readline() - if data == "": - break - buf += data - - self.f.close() - - # write the buffer to the config file - self._open('w') - self.f.write(buf) - self.f.close() - diff --git a/src/get_key.py b/src/get_key.py deleted file mode 100755 index 8e5a58c1..00000000 --- a/src/get_key.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env python -# get_key.py - an sdl keygrabber for gfceux -# Lukas Sabota -# December 2008 -# -# Licensed under the GPL -# - -import sys -try: - import pygame - from pygame.locals import * - has_pygame = True -except ImportError: - self.has_pygame = False - -class KeyGrabber: - """ KeyGrabber is a wrapper that gets an SDL key from the user using pygame """ - def __init__(self, width=800, height=100): - pygame.init() - pygame.joystick.init() - if pygame.joystick.get_count() > 0: - for x in range(0, pygame.joystick.get_count()): - joy = pygame.joystick.Joystick(x) - joy.init() - print "joystick " + str(x) + " initialized." - screen = pygame.display.set_mode((width, height)) - pygame.display.set_caption("Press any key. . .") - - - def get_key(self): - """ returns a tuple with information about the key pressed - (device_string, key_number, joy_number) """ - while 1: - for event in pygame.event.get(): - if event.type == KEYDOWN: - pygame.display.quit() - return ("Keyboard", event.key) - if event.type == JOYBUTTONDOWN: - pygame.display.quit() - return ("Joystick", event.button, event.joy) - # TODO: figure out how fceux saves axes and hat movements and implement - # this might even be easier if we just make the C++ fceux code more modular - # and use a C++ snippet based off code in drivers/sdl/input.cpp and drivers/sdl/sdl-joystick.cpp - #if event.type == JOYAXISMOTION: - # pygame.display.quit() - # return event.joy, event.axis, event.value - -if __name__ == "__main__": - kg = KeyGrabber() - print kg.get_key() - diff --git a/src/main.py b/src/main.py deleted file mode 100755 index 2a489f8e..00000000 --- a/src/main.py +++ /dev/null @@ -1,657 +0,0 @@ -#!/usr/bin/python -# gfceux - Graphical launcher for fceux. -# Designed on Ubuntu, with platfrom independence in mind. -version = "2.2svn" -title = "gfceux" -# Copyright (C) 2008 Lukas Sabota -## -""" -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -""" - - # # # # # # # # -# Python imports - -import sys -import os -import pickle -import shutil -#from optparse import OptionParser -#from config_parse import FceuxConfigParser -#import get_key -#from subprocess import Popen - -try: - import pygtk - pygtk.require("2.0") - import gtk -except ImportError: - print "The PyGTK libraries cannot be found.\n\ - Ensure that PyGTK (>=2.12) is installed on this system.\n\ - On Debian based systems (like Ubuntu), try this command:\n\ - sudo apt-get install python-gtk2 libgtk2.0-0" - - -class GameOptions: - # sound - sound_check = True - soundq_check = True - soundrate_entry = "11000" - soundbufsize_entry = "48" - - # video - fullscreen_check = False - xscale_spin = 2 - yscale_spin = 2 - bpp_combo = 32 - - opengl_check = False - autoscale_check = True - - # main - extra_entry = '' - romfile = '' - moviefile = '' - luafile = '' - - - # network - join_radio = False - join_add = '' - join_port = 4046 - join_pass = '' - host_radio = False - host_port = 4046 - host_pass = '' - no_network_radio = True - - -def load_options(): - global options, optionsfile - try: - ifile = file(optionsfile, 'r') - options = pickle.load(ifile) - pickle.load(ifile) - except: - return - ifile.close() - -def save_options(): - global options, optionsfile - if os.path.exists(os.path.dirname(optionsfile)) == 0: - os.mkdir(os.path.dirname(optionsfile)) - ofile = open(optionsfile, 'w') - pickle.dump(options, ofile) - ofile.close() - -def give_widgets(): - """ - give_widgets() - - This function takes data from the options struct and relays it to - the GTK window - """ - global options, widgets - try: - widgets.get_object("rom_entry").set_text(options.romfile) - widgets.get_object("movie_entry").set_text(options.moviefile) - widgets.get_object("lua_entry").set_text(options.luafile) - - # sound - widgets.get_object("sound_check").set_active(options.sound_check) - widgets.get_object("soundq_check").set_active(options.soundq_check) - widgets.get_object("soundrate_entry").set_text(options.soundrate_entry) - widgets.get_object("soundbufsize_entry").set_text(options.soundbufsize_entry) - - # video - widgets.get_object("fullscreen_check").set_active(options.fullscreen_check) - widgets.get_object("opengl_check").set_active(options.opengl_check) - widgets.get_object("autoscale_check").set_active(options.autoscale_check) - - # set/unset sensitivity on manual scaling - # TODO: idk if i like this really - #if widgets.get_object("autoscale_check").get_active(): - # widgets.get_object("scaling_frame").set_sensitive(False) - #else: - # widgets.get_object("scaling_frame").set_sensitive(True) - widgets.get_object("xscale_spin").set_value(options.xscale_spin) - widgets.get_object("yscale_spin").set_value(options.yscale_spin) - - widgets.get_object("extra_entry").set_text(options.extra_entry) - - # Usability point: - # Users will probably not want to remember their previous network setting. - # Users may accidently be connecting to a remote server/hosting a game when - # they were unaware. - # No network is being set by default - widgets.get_object("no_network_radio").set_active(True) - widgets.get_object("join_add").set_text(options.join_add) - widgets.get_object("join_port").set_value(float(options.join_port)) - widgets.get_object("join_pass").set_text(options.join_pass) - widgets.get_object("host_port").set_value(float(options.host_port)) - widgets.get_object("host_pass").set_text(options.host_pass) - - except AttributeError: - # When new widgets are added, old pickle files might break. - options = GameOptions() - give_widgets() - -def set_options(): - """ - set_options() - - This function grabs all of the data from the GTK widgets - and stores it in the options object. - """ - options.romfile = widgets.get_object("rom_entry").get_text() - options.moviefile = widgets.get_object("movie_entry").get_text() - options.luafile = widgets.get_object("lua_entry").get_text() - - # sound - options.sound_check = widgets.get_object("sound_check").get_active() - options.soundq_check = widgets.get_object("soundq_check").get_active() - options.soundrate_entry = widgets.get_object("soundrate_entry").get_text() - options.soundbufsize_entry = widgets.get_object("soundbufsize_entry").get_text() - - # video - options.fullscreen_check = widgets.get_object("fullscreen_check").get_active() - options.opengl_check = widgets.get_object("opengl_check").get_active() - options.autoscale_check = widgets.get_object("autoscale_check").get_active() - - options.xscale_spin = widgets.get_object("xscale_spin").get_value() - options.yscale_spin = widgets.get_object("yscale_spin").get_value() - - options.extra_entry = widgets.get_object("extra_entry").get_text() - - options.join_radio = widgets.get_object("join_radio").get_active() - options.host_radio = widgets.get_object("host_radio").get_active() - options.no_network_radio = widgets.get_object("no_network_radio").get_active() - options.join_add = widgets.get_object("join_add").get_text() - options.join_port = int(widgets.get_object("join_port").get_value()) - options.join_pass = widgets.get_object("join_pass").get_text() - options.host_port = widgets.get_object("host_port").get_value() - options.host_pass = widgets.get_object("host_pass").get_text() - - -def find_binary(file): - # first check the script directory - if os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]),file)): - return os.path.join(os.path.dirname(sys.argv[0]), file) - - # if not in the script directory, check the $PATH - path = os.getenv('PATH') - directories= [] - directory = '' - # check for '$' so last entry is processed - for x in path + '$': - if x != ':' and x != '$': - directory = directory + x - else: - directories.append(directory) - directory = '' - - for x in directories: - if os.path.isfile(os.path.join(x, file)): - return os.path.join(x,file) - - return None - - -# # # # # # # # # # # # # # # # # -# Globals -options = None -configfile = os.getenv('HOME') + '/.fceux/fceux.cfg' -optionsfile = os.getenv('HOME') + '/.fceux/gfceux_options.dat' -widgets = None - -class GfceuxApp: - def __init__(self): - self.fceux_binary = self.find_fceux() - self.load_ui() - self.create_config() - - options = GameOptions() - load_options() - give_widgets() - try: - gtk.main() - except KeyboardInterrupt: - sys.exit(0) - - def create_config(self): - if os.path.exists(configfile) == False: - # auto generate a default config by running fceux with no options - os.system(find_binary("fceux")) - - def msg(self, text, use_gtk=False): - """ - GfceuApp.msg() - - This function prints messages to the user. This is generally used for status - messages. If a GTK message_box is requried, the use_gtk flag can be enabled. - """ - print text - if use_gtk: - msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO, - buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(text) - msgbox.run() - msgbox.destroy() - - def print_error(self, message, code, use_gtk=True, fatal=True): - """ - GfceuApp.print_error() - - Presents the user with an error message and optionally quits the program. - """ - print title + ' error code '+str(code)+': ' + message - if use_gtk: - msgbox = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_ERROR, - buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup(title + ' ERROR Code '+str(code)+':\n'+message) - msgbox.run() - msgbox.destroy() - if fatal: - sys.exit(code) - - def find_fceux(self): - bin = find_binary('fceux') - if bin == None: - self.print_error('Could not find the fceux binary.\n\ - Ensure that fceux is installed and in the $PATH.\n', 4, True) - else: - self.msg('Using: ' + bin) - - return bin - - def load_ui(self): - global widgets - """ Search for the glade XML file and load it """ - # Check first in the directory of this script. - if os.path.isfile('data/gfceux.glade'): - glade_file = 'data/gfceux.glade' - # Then check to see if its installed on a *nix system - elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.glade')): - glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.glade') - else: - print 'ERROR.' - print 'Could not find the glade UI file.' - print 'Try reinstalling the application.' - sys.exit(1) - - try: - print "Using: " + glade_file - widgets = gtk.Builder() - widgets.add_from_file(glade_file) - widgets.connect_signals(self) - except: - self.print_error("Couldn't load the UI data.", 24) - - widgets.get_object("main_window").show_all() - - - def launch(self, rom_name, local=False): - global options - set_options() - - sound_options = '' - - if options.sound_check: - sound_options += '--sound 1 ' - else: - sound_options += '--sound 0 ' - - if options.soundq_check: - sound_options += '--soundq 1 ' - else: - sound_options += '--soundq 0 ' - - if options.soundrate_entry: - sound_options += '--soundrate ' + options.soundrate_entry + ' ' - - if options.soundbufsize_entry: - sound_options += '--soundbufsize ' + options.soundbufsize_entry + ' ' - - # video - video_options = '' - if options.fullscreen_check: - video_options += '--fullscreen 1 ' - else: - video_options += '--fullscreen 0 ' - - if options.opengl_check: - video_options += '--opengl 1 ' - else: - video_options += '--opengl 0 ' - - if options.autoscale_check: - video_options += '--autoscale 1 ' - else: - video_options += '--autoscale 0 ' - - video_options += ' --xscale ' + str(options.xscale_spin) - video_options += ' --yscale ' + str(options.yscale_spin) - video_options += ' ' - - # lua/movie - other_options = '' - if options.luafile: - other_options += '--loadlua ' + options.luafile + ' ' - if options.moviefile: - other_options += '--playmov ' + options.moviefile + ' ' - - - # Netplay is fucked right now - if options.join_radio: - if options.join_pass == '': - netpass = '' - else: - netpass = '--pass ' + options.join_pass - network = '--net ' + options.join_add +\ - ' --port '+ str(options.join_port) + ' ' + netpass - else: - network = '' - - if options.host_radio: - if options.host_pass == '': - netpass = ' ' - else: - netpass = ' --pass ' + '"' + options.host_pass + '" ' - network = '--net localhost --port '+\ - str(options.host_port) + netpass + ' ' - network = '' - - if local: - network = '' - - - command = self.fceux_binary + ' ' + sound_options + video_options +\ - network + other_options + options.extra_entry + ' '+ rom_name - self.msg('Command: ' + command) - - - if options.host_radio: - xterm_binary = find_binary("xterm") - if xterm_binary == None: - gfceu_error("Cannot find xterm on this system. You will not \n\ - be informed of server output.", 102, True, False) - args = [self.server_binary] - else: - args = [xterm_binary, "-e", self.server_binary] - args.append('--port') - args.append(str(options.host_port)) - if options.host_pass: - args.append("--password") - args.append(options.host_pass) - pid = Popen(args).pid - - widgets.get_object("main_window").hide() - - # os.system() is a blocker, so we must force - # gtk to process our events. - while gtk.events_pending(): - gtk.main_iteration_do() - - os.system(command) - widgets.get_object("main_window").show() - - - - if options.host_radio: - os.kill(pid, 9) - - - ### Callbacks - def launch_button_clicked(self, arg1): - global options - options.romfile = widgets.get_object("rom_entry").get_text() - if widgets.get_object("rom_entry").get_text() == '': - self.msg('Please specify a ROM to open in the main tab.', True) - return - - self.launch('"'+ options.romfile +'"') - - def autoscale_check_toggled(self, menuitem, data=None): - if widgets.get_object("autoscale_check").get_active(): - widgets.get_object("scaling_frame").set_sensitive(False) - else: - widgets.get_object("scaling_frame").set_sensitive(True) - - def about_button_clicked(self, menuitem, data=None): - widgets.get_object("about_dialog").set_name('GFCE UltraX '+version) - widgets.get_object("about_dialog").run() - widgets.get_object("about_dialog").hide() - - def lua_browse_button_clicked(self, menuitem, data=None): - global options - set_options() - chooser = gtk.FileChooserDialog("Open...", None, - gtk.FILE_CHOOSER_ACTION_OPEN, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - chooser.set_property("local-only", False) - chooser.set_default_response(gtk.RESPONSE_OK) - - filter=gtk.FileFilter() - filter.set_name("Lua scripts") - filter.add_pattern("*.lua") - chooser.add_filter(filter) - - filter = gtk.FileFilter() - filter.set_name("All files") - filter.add_pattern("*") - chooser.add_filter(filter) - - if options.luafile == '': - folder = os.getenv('HOME') - else: - folder = os.path.split(options.luafile)[0] - - chooser.set_current_folder (folder) - - response = chooser.run() - chooser.hide() - - if response == gtk.RESPONSE_OK: - if chooser.get_filename(): - x = chooser.get_filename() - widgets.get_object("lua_entry").set_text(x) - options.luafile = x - - def movie_browse_button_clicked(self, menuitem, data=None): - global options - set_options() - chooser = gtk.FileChooserDialog("Open...", None, - gtk.FILE_CHOOSER_ACTION_OPEN, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - chooser.set_property("local-only", False) - chooser.set_default_response(gtk.RESPONSE_OK) - - filter=gtk.FileFilter() - filter.set_name("FM2 movies") - filter.add_pattern("*.fm2") - chooser.add_filter(filter) - - filter = gtk.FileFilter() - filter.set_name("All files") - filter.add_pattern("*") - chooser.add_filter(filter) - - if options.moviefile == '': - folder = os.getenv('HOME') - else: - folder = os.path.split(options.moviefile)[0] - - chooser.set_current_folder (folder) - - response = chooser.run() - chooser.hide() - - if response == gtk.RESPONSE_OK: - if chooser.get_filename(): - x = chooser.get_filename() - widgets.get_object("movie_entry").set_text(x) - options.moviefile = x - - def rom_browse_button_clicked(self, menuitem, data=None): - global options - set_options() - chooser = gtk.FileChooserDialog("Open...", None, - gtk.FILE_CHOOSER_ACTION_OPEN, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - chooser.set_property("local-only", False) - chooser.set_default_response(gtk.RESPONSE_OK) - - filter=gtk.FileFilter() - filter.set_name("NES Roms") - filter.add_mime_type("application/x-nes-rom") - filter.add_mime_type("application/zip") - filter.add_pattern("*.nes") - filter.add_pattern("*.zip") - chooser.add_filter(filter) - - filter = gtk.FileFilter() - filter.set_name("All files") - filter.add_pattern("*") - chooser.add_filter(filter) - - if options.romfile == '': - folder = os.getenv('HOME') - else: - folder = os.path.split(options.romfile)[0] - - chooser.set_current_folder (folder) - - response = chooser.run() - chooser.hide() - - if response == gtk.RESPONSE_OK: - if chooser.get_filename(): - x = chooser.get_filename() - widgets.get_object("rom_entry").set_text(x) - # reset lua and movie entries on rom change - widgets.get_object("movie_entry").set_text("") - widgets.get_object("lua_entry").set_text("") - options.romfile = x - - # fix this global its ugly - # specifies which NES gamepad we are configuring - gamepad_config_no = "0" - - # This isn't used yet because it doesn't work with joysticks. - def gamepad_clicked_new(self, widget, data=None): - widgets.get_object("gamepad_config_window").show_all() - - - - """ -#Disabled for now -#TODO: Full joystick support - def button_clicked(self, widget, data=None): - prefix = "SDL.Input.GamePad." + self.gamepad_config_no - d = {'right_button' : prefix + "Right", - 'left_button' : prefix + "Left", - 'up_button' : prefix + "Up", - 'down_button' : prefix + "Down", - 'select_button' : prefix + "Select", - 'start_button' : prefix + "Start", - 'a_button' : prefix + "A", - 'b_button' : prefix + "B", - 'turbo_a_button' : prefix + "TurboA", - 'turbo_b_button' : prefix + "TurboB"} - - if get_key.has_pygame == False: - self.msg("Pygame could not be found on this system. Gfceux will revert to the old configuration routine.", True) - self.gamepad_clicked_old(widget) - else: - kg = get_key.KeyGrabber() - key_tuple = kg.get_key() - cp = FceuxConfigParser(configfile) - cp.writeKey(prefix + "DeviceType", key_tuple[0]) - if key_tuple[0] == "Keyboard": - print key_tuple - cp.writeKey(d[widget.name], key_tuple[1]) - if key_tuple[0] == "Joystick": - print key_tuple - cp.writeKey(prefix + "DeviceNum", key_tuple[2]) - cp.writeKey(d[widget.name], key_tuple[1]) - """ - def gamepad_clicked(self, widget, data=None): - d = {'gp1_button' : "1", - 'gp2_button' : "2", - 'gp3_button' : "3", - 'gp4_button' : "4"} - self.gamepad_config_no = d[widget.name] - command = '--inputcfg gamepad' + self.gamepad_config_no - self.launch(command, True) - - def gamepad_window_close(self, widget, data=None): - widgets.get_object("gamepad_config_window").hide() - return True - - def config_help_button_clicked(self, menuitem, data=None): - msgbox = gtk.MessageDialog(parent=None, flags=0, - type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE) - msgbox.set_markup("You should be able to figure it out from here.") - msgbox.run() - msgbox.hide() - - def join_radio_clicked(self, menuitem, data=None): - global options - widgets.get_object("join_frame").set_sensitive(True) - widgets.get_object("host_frame").set_sensitive(False) - options.join_radio = True - options.host_radio = False - options.no_network_radio = False - - def host_radio_clicked(self, menuitem, data=None): - if widgets.get_object("host_radio").get_active(): - options.server_binary = find_binary('fceux-server') - - if options.server_binary == None: - if os.name == 'nt': - self.print_error("The fceux server software cannot be found. \n\ - Ensure that it is installed in the same directory as \n\ - GFCE Ultra.", 102, True, False) - else: - self.print_error("The fceux server software cannot be found on \n\ - this system. Ensure that it is installed and in your path.", - 101, True, False) - widgets.get_object("no_network_radio").set_active(True) - options.no_network_radio = True - return False - - widgets.get_object("join_frame").set_sensitive(False) - widgets.get_object("host_frame").set_sensitive(True) - options.join_radio = False - options.host_radio = True - options.no_network_radio = False - - def no_network_radio_clicked(self, menuitem, data=None): - widgets.get_object("join_frame").set_sensitive(False) - widgets.get_object("host_frame").set_sensitive(False) - options.join_radio = False - options.host_radio = False - options.no_network_radio = True - - def end(self, menuitem, data=None): - set_options() - save_options() - gtk.main_quit() - -if __name__ == '__main__': - app = GfceuxApp() diff --git a/uninstall.py b/uninstall.py deleted file mode 100755 index 3ccfb1a1..00000000 --- a/uninstall.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -# uninstall script for gfceux -# if gfceux was installed in an non-default prefix, you can specify it -# as an argument -# -# sudo ./uninstall.py [prefix] -# -# prefix must include slash at end -#TODO: fix that -#TODO: remove python package? (site-package/gfceux/etc) - -import os -import dircache -import sys - -prefix = "/usr/local" -try: - if sys.argv[1]: - prefix = sys.argv[1] -except IndexError: - pass - -# first include data places scattered in /usr -files = [ - "share/pixmaps/gfceux.png", - "share/man/man1/gfceux.1", - "share/applications/gfceux.desktop", - "bin/gfceux"] -# then include the files in our /usr/share/gfceux -for x in dircache.listdir(prefix + "share/gfceux"): - files.append("share/gfceux/" + x) - -for x in files: - os.remove(prefix+x) - -# go ahead and remove our shared folder if its empty -os.rmdir(prefix+"share/gfceux") From 043cada9b9a1bde6f2ff10d6de802151179cd7a0 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 1 Nov 2010 16:00:38 +0000 Subject: [PATCH 93/94] minor bugfix for gfceux (which is obsolete anyway) --- gfceux/gfceux | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 gfceux/gfceux diff --git a/gfceux/gfceux b/gfceux/gfceux new file mode 100755 index 00000000..18b5f524 --- /dev/null +++ b/gfceux/gfceux @@ -0,0 +1,21 @@ +#!/usr/bin/env python2 +# +# GTK2 GUI for FCE UltraX +# +# Lukas Sabota +# +# +import platform +import sys +if platform.python_version() < '2.5.0': + print "Python version too old, use one greater than 2.5.0" + sys.exit() + +try: + from src import main +except: + from gfceux import main + +app = main.GfceuxApp() + + From cb61de946926aedf19eb987dcb94a9b612b3f795 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 23 Oct 2011 23:02:05 +0000 Subject: [PATCH 94/94] moving fceu-server to old/, makes more sense than in fceux source tree [[Split portion of a mixed commit.]] --- fceu-server/AUTHORS | 2 + fceu-server/COPYING | 340 +++++++ fceu-server/ChangeLog | 30 + fceu-server/Makefile | 20 + fceu-server/README | 51 ++ fceu-server/dist/fceu-server-0.0.4.tar.gz | Bin 0 -> 17611 bytes fceu-server/dist/fceu-server-0.0.5.tar.gz | Bin 0 -> 18623 bytes fceu-server/dist/fceunetserver-0.0.3.tar.bz2 | Bin 0 -> 16388 bytes fceu-server/fceu-server.conf | 5 + fceu-server/md5.cpp | 266 ++++++ fceu-server/md5.h | 37 + fceu-server/server.cpp | 914 +++++++++++++++++++ fceu-server/throttle.cpp | 102 +++ fceu-server/throttle.h | 23 + fceu-server/types.h | 38 + 15 files changed, 1828 insertions(+) create mode 100644 fceu-server/AUTHORS create mode 100644 fceu-server/COPYING create mode 100644 fceu-server/ChangeLog create mode 100644 fceu-server/Makefile create mode 100644 fceu-server/README create mode 100644 fceu-server/dist/fceu-server-0.0.4.tar.gz create mode 100644 fceu-server/dist/fceu-server-0.0.5.tar.gz create mode 100644 fceu-server/dist/fceunetserver-0.0.3.tar.bz2 create mode 100644 fceu-server/fceu-server.conf create mode 100644 fceu-server/md5.cpp create mode 100644 fceu-server/md5.h create mode 100644 fceu-server/server.cpp create mode 100644 fceu-server/throttle.cpp create mode 100644 fceu-server/throttle.h create mode 100644 fceu-server/types.h diff --git a/fceu-server/AUTHORS b/fceu-server/AUTHORS new file mode 100644 index 00000000..0888cb48 --- /dev/null +++ b/fceu-server/AUTHORS @@ -0,0 +1,2 @@ +Major developer: Xodnizel +Interface changes and all releases past 0.0.3: Lukas Sabota diff --git a/fceu-server/COPYING b/fceu-server/COPYING new file mode 100644 index 00000000..45645b4b --- /dev/null +++ b/fceu-server/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/fceu-server/ChangeLog b/fceu-server/ChangeLog new file mode 100644 index 00000000..89dde3c4 --- /dev/null +++ b/fceu-server/ChangeLog @@ -0,0 +1,30 @@ +0.0.5: + Interface received massive overhaul. Now takes command line + options. This will allow the server to communicate with + other front-ends. Integration can now occur in gfceu. + +0.0.4: + Renamed from "server" to "fceu-server". + Renamed standard.conf -> fceu-standard.conf + If no configuration file is specified, look in /etc and ./ + Added a --help option. + Added GPL headers + +0.0.3: + Error messages during server startup are more verbose(slightly). + + Fixed initialization of the sockaddr_in structure, sin_family + member. It's now initialized to AF_INET before calling bind(). + While not initializing that member seemed to work ok on + Linux 2.4, it won't work on Linux 2.2 and under Cygwin, + and possibly other environments. + +0.0.2: + Switched to using fcntl() to set the socket to nonblocking, + so I don't need to use MSG_NOWAIT in send() anymore, which is + undefined under Cygwin. + + Added a "clean" Makefile target. + +0.0.1: + First Release diff --git a/fceu-server/Makefile b/fceu-server/Makefile new file mode 100644 index 00000000..f30c82e3 --- /dev/null +++ b/fceu-server/Makefile @@ -0,0 +1,20 @@ +PREFIX = /usr +OUTFILE = fceu-server + +CC = g++ +OBJS = server.o md5.o throttle.o + + +all: ${OBJS} + ${CC} -o ${OUTFILE} ${OBJS} + +clean: + rm -f ${OUTFILE} ${OBJS} + +install: + install -m 755 -D fceu-server ${PREFIX}/bin/fceu-server + install -m 644 -D fceu-server.conf /etc/fceu-server.conf + +server.o: server.cpp +md5.o: md5.cpp +throttle.o: throttle.cpp diff --git a/fceu-server/README b/fceu-server/README new file mode 100644 index 00000000..1a4628a2 --- /dev/null +++ b/fceu-server/README @@ -0,0 +1,51 @@ +FCE Ultra Network Play Server v0.0.5 +------------------------------------ + +To compile, type this in the shell: +$ make +To install, type this in this shell: +$ sudo make install +To run, type this in shell: +$ ./fceu-server + +To compile under MS Windows, you should use Cygwin. I'm not +going to change this server to use Win-old-dirty-smelly-sock natively. + +If it doesn't compile, sell your to the +. + +Most beings can run it like "./fceu-server >logfile &". +Windows users can run it some other way. A batch file with absolute paths, perhaps? + snuggums.bat: + C:\somethingdirectory\server.exe c:\somethingdirectory\standard.conf + +With the default settings, each client should use about 65-70Kbps, excluding any +data transferred during chat, state loads, etc(which should be negligible, but limits +will be placed on these types of transfers in the future). + +Clients connecting with high-latency or slow links may use more bandwidth, or they +may use less bandwidth. I'm really not quite sure. If it concerns you, test it. + +Any client connecting over VERY high latency links, such as bidirectional satellite connections, +may find that attempting network play will lock up his/her connection for +several minutes. Right, Disch. ;) + +The server probably won't scale well to a huge number of clients connected at the same time. + +Bumping up the server's priority and running it on a low-latency kernel(preferably with +1 ms or smaller timeslices) should help make network play more usable if you're running the +network play server on an otherwise non-idle physical server. + + + +TODO: + +Implement a more flexible timing system, so that PAL games will be playable. + +Change the protocol to allow the client to specify the size of input update information, +so devices like the powerpad or zapper can work over network play. + +Send emulation info, such as NTSC/PAL, input devices, and Game Genie emulation at connect +time, to make it easier on end users. + +On Mac OSX, server is reporting back to clients "Invalid number of players specified (0)". Running in a linux VM in bridged mode resolved this issue if you need to host the server on OSX. diff --git a/fceu-server/dist/fceu-server-0.0.4.tar.gz b/fceu-server/dist/fceu-server-0.0.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a78507427ed962143258cad3133e09322820d51b GIT binary patch literal 17611 zcmV(>K-j+@iwFQ`mytvO1MFLEZ`(+cp0C^3AJOoau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>k{8N6iCB1jnSExT*=P2deP*B8 WXZD$WW}p9o&wl^|{)wLe7y$qok7hmq literal 0 HcmV?d00001 diff --git a/fceu-server/dist/fceunetserver-0.0.3.tar.bz2 b/fceu-server/dist/fceunetserver-0.0.3.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..8d10822450ad54bdf7e617bf92de0598ee9d77ce GIT binary patch literal 16388 zcmV+fK>NQ!T4*^jL0KkKSrc756#z?vf8PJ}4kUm7|NsC0|L_0*|NjsG5Ci}O006)M z00>}D9(@bneax9+i|0)Hzzlu%KJyOuoheFJbQn(BkoRotblyN{kOZhcd+oi((EH~I z?|k>YYiu^Xop)90mdXP2h6>E10Cs$?l_WV_z+Ud4=)Ejw<;ATp{@iLqw1mS)Cn11iF!?>z?{ z#*ydW1K!)mHp_PooNcwV)}h~5xOy6BfiwUh0yGmQnrf%yZA~>#0x)V%(x0S_4@A(= zXagVvO#uYZf(S;Zpq`>{QzInxG#MEHXfyx-0001J#E6;+6GPO~dYXZ?G}9wT>Y4*; zGfAT+)BrL727!}CAd^WU2n5Nb#A%SJ>VAfrr;SZbnv-ZjS9Q z^*<_pr1cNf(LY5E02(wuQUmP$3PbAsr|bPyUw_$Ld4058mto$!QjF2!Y%n zJg=+I==EFEveI+<2$*sQ!t#Euc{nzJW%Y!A(mB^G1jB^w_ zN_Knczax^OhLAfP{cP2IQ8qWkyu(v7v@vYEtNkdg zcD_r7M5n?x%p{`;)LVU~gf=#TCewN4D?A{+J>T0ycGmUDjDxYVup7dn5Xzt9pQnj2 zFu~EfmW%r&QGe?%>|gV>GJ)3>*MQPckVf&e-L44|P@qZx_2}WK#LMPp=(flk3IuOl zC|_7}F>B(!En+laYNNHOyOTT;=T&*@G;d+nj=7@5+}GL00rwcQOx+LUXRD#dJ~*j2 z(pOt+ONH#E7Zu&>)`JCWL}_;8Tsqophg(w)OtKrZ;lSE@MtBl`L8v;&N)ENCGxL~j zOHH+!=0`j7?9E^!ZBcM^nye^>U1iH#-D@``h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Hsj492X48e;? zwec`Sh9x2t8D`F`9Ec!csufsLu3c#birI=zMD3qo~Pv}Y-A+OQC*bIsxaPzzt zlWVt&EoGsakA5V8Jx~&)fwWi8pof7egUD&hWyl|09kEH+B6&LCey{Gi!jT~Y1jT%j zwl_wigaP;dz_I+DO;jX-Kaavv85&csQc8UoR4^$E3`K-9Ve8nSk`7S!GaaQ*=RZf5 S!GN#-i@744C`bveor-|k?&zQZ literal 0 HcmV?d00001 diff --git a/fceu-server/fceu-server.conf b/fceu-server/fceu-server.conf new file mode 100644 index 00000000..9c71a224 --- /dev/null +++ b/fceu-server/fceu-server.conf @@ -0,0 +1,5 @@ +maxclients 100 ; Maximum number of clients +connecttimeout 5 ; Connection(login) timeout +framedivisor 1 ; Frame divisor(eg: 60 / framedivisor updates per second) +port 4046 ; Port to listen on +;password sexybeef diff --git a/fceu-server/md5.cpp b/fceu-server/md5.cpp new file mode 100644 index 00000000..24dfd59f --- /dev/null +++ b/fceu-server/md5.cpp @@ -0,0 +1,266 @@ +/* FCE Ultra Network Play Server + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * */ + +/* + * RFC 1321 compliant MD5 implementation, + * by Christophe Devine ; + * this program is licensed under the GPL. + */ + +/* Modified October 3, 2003, to remove testing code, and add + include of "types.h". + + Added simple MD5 to ASCII string conversion function. + -Xodnizel +*/ + + + + +#include +#include "types.h" +#include "md5.h" + +#define GET_UINT32(n,b,i) \ +{ \ + (n) = ( (uint32) (b)[(i) + 3] << 24 ) \ + | ( (uint32) (b)[(i) + 2] << 16 ) \ + | ( (uint32) (b)[(i) + 1] << 8 ) \ + | ( (uint32) (b)[(i) ] ); \ +} + +#define PUT_UINT32(n,b,i) \ +{ \ + (b)[(i) ] = (uint8) ( (n) ); \ + (b)[(i) + 1] = (uint8) ( (n) >> 8 ); \ + (b)[(i) + 2] = (uint8) ( (n) >> 16 ); \ + (b)[(i) + 3] = (uint8) ( (n) >> 24 ); \ +} + +void md5_starts( struct md5_context *ctx ) +{ + ctx->total[0] = 0; + ctx->total[1] = 0; + ctx->state[0] = 0x67452301; + ctx->state[1] = 0xEFCDAB89; + ctx->state[2] = 0x98BADCFE; + ctx->state[3] = 0x10325476; +} + +void md5_process( struct md5_context *ctx, uint8 data[64] ) +{ + uint32 A, B, C, D, X[16]; + + GET_UINT32( X[0], data, 0 ); + GET_UINT32( X[1], data, 4 ); + GET_UINT32( X[2], data, 8 ); + GET_UINT32( X[3], data, 12 ); + GET_UINT32( X[4], data, 16 ); + GET_UINT32( X[5], data, 20 ); + GET_UINT32( X[6], data, 24 ); + GET_UINT32( X[7], data, 28 ); + GET_UINT32( X[8], data, 32 ); + GET_UINT32( X[9], data, 36 ); + GET_UINT32( X[10], data, 40 ); + GET_UINT32( X[11], data, 44 ); + GET_UINT32( X[12], data, 48 ); + GET_UINT32( X[13], data, 52 ); + GET_UINT32( X[14], data, 56 ); + GET_UINT32( X[15], data, 60 ); + +#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) + +#define P(a,b,c,d,k,s,t) \ +{ \ + a += F(b,c,d) + X[k] + t; a = S(a,s) + b; \ +} + + A = ctx->state[0]; + B = ctx->state[1]; + C = ctx->state[2]; + D = ctx->state[3]; + +#define F(x,y,z) (z ^ (x & (y ^ z))) + + P( A, B, C, D, 0, 7, 0xD76AA478 ); + P( D, A, B, C, 1, 12, 0xE8C7B756 ); + P( C, D, A, B, 2, 17, 0x242070DB ); + P( B, C, D, A, 3, 22, 0xC1BDCEEE ); + P( A, B, C, D, 4, 7, 0xF57C0FAF ); + P( D, A, B, C, 5, 12, 0x4787C62A ); + P( C, D, A, B, 6, 17, 0xA8304613 ); + P( B, C, D, A, 7, 22, 0xFD469501 ); + P( A, B, C, D, 8, 7, 0x698098D8 ); + P( D, A, B, C, 9, 12, 0x8B44F7AF ); + P( C, D, A, B, 10, 17, 0xFFFF5BB1 ); + P( B, C, D, A, 11, 22, 0x895CD7BE ); + P( A, B, C, D, 12, 7, 0x6B901122 ); + P( D, A, B, C, 13, 12, 0xFD987193 ); + P( C, D, A, B, 14, 17, 0xA679438E ); + P( B, C, D, A, 15, 22, 0x49B40821 ); + +#undef F + +#define F(x,y,z) (y ^ (z & (x ^ y))) + + P( A, B, C, D, 1, 5, 0xF61E2562 ); + P( D, A, B, C, 6, 9, 0xC040B340 ); + P( C, D, A, B, 11, 14, 0x265E5A51 ); + P( B, C, D, A, 0, 20, 0xE9B6C7AA ); + P( A, B, C, D, 5, 5, 0xD62F105D ); + P( D, A, B, C, 10, 9, 0x02441453 ); + P( C, D, A, B, 15, 14, 0xD8A1E681 ); + P( B, C, D, A, 4, 20, 0xE7D3FBC8 ); + P( A, B, C, D, 9, 5, 0x21E1CDE6 ); + P( D, A, B, C, 14, 9, 0xC33707D6 ); + P( C, D, A, B, 3, 14, 0xF4D50D87 ); + P( B, C, D, A, 8, 20, 0x455A14ED ); + P( A, B, C, D, 13, 5, 0xA9E3E905 ); + P( D, A, B, C, 2, 9, 0xFCEFA3F8 ); + P( C, D, A, B, 7, 14, 0x676F02D9 ); + P( B, C, D, A, 12, 20, 0x8D2A4C8A ); + +#undef F + +#define F(x,y,z) (x ^ y ^ z) + + P( A, B, C, D, 5, 4, 0xFFFA3942 ); + P( D, A, B, C, 8, 11, 0x8771F681 ); + P( C, D, A, B, 11, 16, 0x6D9D6122 ); + P( B, C, D, A, 14, 23, 0xFDE5380C ); + P( A, B, C, D, 1, 4, 0xA4BEEA44 ); + P( D, A, B, C, 4, 11, 0x4BDECFA9 ); + P( C, D, A, B, 7, 16, 0xF6BB4B60 ); + P( B, C, D, A, 10, 23, 0xBEBFBC70 ); + P( A, B, C, D, 13, 4, 0x289B7EC6 ); + P( D, A, B, C, 0, 11, 0xEAA127FA ); + P( C, D, A, B, 3, 16, 0xD4EF3085 ); + P( B, C, D, A, 6, 23, 0x04881D05 ); + P( A, B, C, D, 9, 4, 0xD9D4D039 ); + P( D, A, B, C, 12, 11, 0xE6DB99E5 ); + P( C, D, A, B, 15, 16, 0x1FA27CF8 ); + P( B, C, D, A, 2, 23, 0xC4AC5665 ); + +#undef F + +#define F(x,y,z) (y ^ (x | ~z)) + + P( A, B, C, D, 0, 6, 0xF4292244 ); + P( D, A, B, C, 7, 10, 0x432AFF97 ); + P( C, D, A, B, 14, 15, 0xAB9423A7 ); + P( B, C, D, A, 5, 21, 0xFC93A039 ); + P( A, B, C, D, 12, 6, 0x655B59C3 ); + P( D, A, B, C, 3, 10, 0x8F0CCC92 ); + P( C, D, A, B, 10, 15, 0xFFEFF47D ); + P( B, C, D, A, 1, 21, 0x85845DD1 ); + P( A, B, C, D, 8, 6, 0x6FA87E4F ); + P( D, A, B, C, 15, 10, 0xFE2CE6E0 ); + P( C, D, A, B, 6, 15, 0xA3014314 ); + P( B, C, D, A, 13, 21, 0x4E0811A1 ); + P( A, B, C, D, 4, 6, 0xF7537E82 ); + P( D, A, B, C, 11, 10, 0xBD3AF235 ); + P( C, D, A, B, 2, 15, 0x2AD7D2BB ); + P( B, C, D, A, 9, 21, 0xEB86D391 ); + +#undef F + + ctx->state[0] += A; + ctx->state[1] += B; + ctx->state[2] += C; + ctx->state[3] += D; +} + +void md5_update( struct md5_context *ctx, uint8 *input, uint32 length ) +{ + uint32 left, fill; + + if( ! length ) return; + + left = ( ctx->total[0] >> 3 ) & 0x3F; + fill = 64 - left; + + ctx->total[0] += length << 3; + ctx->total[1] += length >> 29; + + ctx->total[0] &= 0xFFFFFFFF; + ctx->total[1] += ctx->total[0] < ( length << 3 ); + + if( left && length >= fill ) + { + memcpy( (void *) (ctx->buffer + left), (void *) input, fill ); + md5_process( ctx, ctx->buffer ); + length -= fill; + input += fill; + left = 0; + } + + while( length >= 64 ) + { + md5_process( ctx, input ); + length -= 64; + input += 64; + } + + if( length ) + { + memcpy( (void *) (ctx->buffer + left), (void *) input, length ); + } +} + +static uint8 md5_padding[64] = +{ + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +void md5_finish( struct md5_context *ctx, uint8 digest[16] ) +{ + uint32 last, padn; + uint8 msglen[8]; + + PUT_UINT32( ctx->total[0], msglen, 0 ); + PUT_UINT32( ctx->total[1], msglen, 4 ); + + last = ( ctx->total[0] >> 3 ) & 0x3F; + padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); + + md5_update( ctx, md5_padding, padn ); + md5_update( ctx, msglen, 8 ); + + PUT_UINT32( ctx->state[0], digest, 0 ); + PUT_UINT32( ctx->state[1], digest, 4 ); + PUT_UINT32( ctx->state[2], digest, 8 ); + PUT_UINT32( ctx->state[3], digest, 12 ); +} + + +/* Uses a static buffer, so beware of how it's used. */ +char *md5_asciistr(uint8 digest[16]) +{ + static char str[33]; + static char trans[16]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; + int x; + + for(x=0;x<16;x++) + { + str[x*2]=trans[digest[x]&0x0F]; + str[x*2+1]=trans[digest[x]>>4]; + } + return(str); +} diff --git a/fceu-server/md5.h b/fceu-server/md5.h new file mode 100644 index 00000000..6c5d4e87 --- /dev/null +++ b/fceu-server/md5.h @@ -0,0 +1,37 @@ +/* FCE Ultra Network Play Server + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +#ifndef _MD5_H +#define _MD5_H + +struct md5_context +{ + uint32 total[2]; + uint32 state[4]; + uint8 buffer[64]; +}; + +void md5_starts( struct md5_context *ctx ); +void md5_update( struct md5_context *ctx, uint8 *input, uint32 length ); +void md5_finish( struct md5_context *ctx, uint8 digest[16] ); + +/* Uses a static buffer, so beware of how it's used. */ +char *md5_asciistr(uint8 digest[16]); + +#endif /* md5.h */ diff --git a/fceu-server/server.cpp b/fceu-server/server.cpp new file mode 100644 index 00000000..1cdfa5de --- /dev/null +++ b/fceu-server/server.cpp @@ -0,0 +1,914 @@ +/* FCE Ultra Network Play Server + * + * Copyright notice for this file: + * Copyright (C) 2004 Xodnizel + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "types.h" +#include "md5.h" +#include "throttle.h" + +#define VERSION "0.0.5" +#define DEFAULT_PORT 4046 +#define DEFAULT_MAX 100 +#define DEFAULT_TIMEOUT 5 +#define DEFAULT_FRAMEDIVISOR 1 +#define DEFAULT_CONFIG "/etc/fceu-server.conf" + +// MSG_NOSIGNAL and SOL_TCP have been depreciated on osx +#ifdef __APPLE__ +#define MSG_NOSIGNAL SO_NOSIGPIPE +#define SOL_TCP IPPROTO_TCP +#endif + +typedef struct { + uint32 id; /* mainly for faster referencing when pointed to from the Games + entries. + */ + char *nickname; + int TCPSocket; + void *game; /* Pointer to the game this player is in. */ + int localplayers; /* The number of local players, 1-4 */ + + time_t timeconnect; /* Time the client made the connection. */ + + /* Variables to handle non-blocking TCP reads. */ + uint8 *nbtcp; + uint32 nbtcphas, nbtcplen; + uint32 nbtcptype; +} ClientEntry; + +typedef struct +{ + uint8 id[16]; /* Unique 128-bit identifier for this game session. */ + uint8 joybuf[5]; /* 4 player data + 1 command byte */ + int MaxPlayers; /* Maximum players for this game */ + ClientEntry *Players[4]; /* Pointers to player data. */ + int IsUnique[4]; /* Set to 1 if player is unique client, 0 + if it's a duplicated entry to handle multiple players + per client. + */ + uint8 ExtraInfo[64]; /* Expansion information to be used in future versions + of FCE Ultra. + */ +} GameEntry; + +typedef struct +{ + unsigned int MaxClients; /* The maximum number of clients to allow. */ + /* You should expect each client to use + 65-70Kbps(not including save state loads) while + connected(and logged in), when using the default + FrameDivisor value of 1. + */ + unsigned int ConnectTimeout; /* How long to wait(in seconds) for the client to provide + login data before disconnecting the client. + */ + unsigned int FrameDivisor; /* The number of updates per second are divided + by this number. 1 = 60 updates/sec(approx), + 2 = 30 updates/sec, etc. */ + unsigned int Port; /* The port to listen on. */ + uint8 *Password; /* The server password. */ +} CONFIG; + +CONFIG ServerConfig; + +int LoadConfigFile(char *fn) +{ + FILE *fp; + ServerConfig.Port = ServerConfig.MaxClients = ServerConfig.ConnectTimeout = ServerConfig.FrameDivisor = ~0; + if(fp=fopen(fn,"rb")) + { + char buf[256]; + while(fgets(buf, 256, fp) > 0) + { + if(!strncasecmp(buf,"maxclients",strlen("maxclients"))) + sscanf(buf,"%*s %d",&ServerConfig.MaxClients); + else if(!strncasecmp(buf,"connecttimeout",strlen("connecttimeout"))) + sscanf(buf,"%*s %d",&ServerConfig.ConnectTimeout); + else if(!strncasecmp(buf,"framedivisor",strlen("framedivisor"))) + sscanf(buf,"%*s %d",&ServerConfig.FrameDivisor); + else if(!strncasecmp(buf,"port",strlen("port"))) + sscanf(buf,"%*s %d",&ServerConfig.Port); + else if(!strncasecmp(buf,"password",strlen("password"))) + { + char *pass = 0; + sscanf(buf,"%*s %as",&pass); + if(pass) + { + struct md5_context md5; + ServerConfig.Password = (uint8 *)malloc(16); + md5_starts(&md5); + md5_update(&md5,(uint8*)pass,strlen(pass)); + md5_finish(&md5,ServerConfig.Password); + puts("Password required to log in."); + } + } + } + } + + else + { + printf("Cannot load configuration file %s.\n", fn); + return(0); + } + + if(~0 == (ServerConfig.Port & ServerConfig.MaxClients & ServerConfig.ConnectTimeout & ServerConfig.FrameDivisor)) + { + puts("Incomplete configuration file"); + return(0); + } + //printf("%d,%d,%d\n",ServerConfig.MaxClients,ServerConfig.ConnectTimeout,ServerConfig.FrameDivisor); + printf("Using configuration file located at %s\n", fn); + return(1); +} + +static ClientEntry *Clients; +static GameEntry *Games; + +static void en32(uint8 *buf, uint32 morp) +{ + buf[0]=morp; + buf[1]=morp>>8; + buf[2]=morp>>16; + buf[3]=morp>>24; +} + +static uint32 de32(uint8 *morp) +{ + return(morp[0]|(morp[1]<<8)|(morp[2]<<16)|(morp[3]<<24)); +} + +static char *CleanNick(char *nick); +static int NickUnique(ClientEntry *client); +static void AddClientToGame(ClientEntry *client, uint8 id[16], uint8 extra[64]) throw(int); +static void SendToAll(GameEntry *game, int cmd, uint8 *data, uint32 len) throw(int); +static void BroadcastText(GameEntry *game, const char *fmt, ...) throw(int); +static void TextToClient(ClientEntry *client, const char *fmt, ...) throw(int); +static void KillClient(ClientEntry *client); + +#define NBTCP_LOGINLEN 0x100 +#define NBTCP_LOGIN 0x200 +#define NBTCP_COMMANDLEN 0x300 +#define NBTCP_COMMAND 0x400 + +#define NBTCP_UPDATEDATA 0x800 + +static void StartNBTCPReceive(ClientEntry *client, uint32 type, uint32 len) +{ + client->nbtcp = (uint8 *)malloc(len); + client->nbtcplen = len; + client->nbtcphas = 0; + client->nbtcptype = type; +} + +static void RedoNBTCPReceive(ClientEntry *client) +{ + client->nbtcphas = 0; +} + +static void EndNBTCPReceive(ClientEntry *client) +{ + free(client->nbtcp); + client->nbtcplen = client->localplayers; + client->nbtcphas = 0; + client->nbtcptype = 0; + client->nbtcp = 0; +} + +static uint8 *MakeMPS(ClientEntry *client) +{ + static uint8 buf[64]; + uint8 *bp = buf; + int x; + GameEntry *game = (GameEntry *)client->game; + + for(x=0;x<4;x++) + { + if(game->Players[x] == client) + { + *bp = '0' + x + 1; + bp++; + *bp = ','; + bp++; + } + } + if(*(bp-1) == ',') bp--; + + *bp = 0; + return(buf); +} + +/* Returns 1 if we are back to normal game mode, 0 if more data is yet to arrive. */ +static int CheckNBTCPReceive(ClientEntry *client) throw(int) +{ + if(!client->nbtcplen) + throw(1); /* Should not happen. */ + int l; + + while(l = recv(client->TCPSocket, client->nbtcp + client->nbtcphas, client->nbtcplen - client->nbtcphas, MSG_NOSIGNAL)) + { + if(l == -1) + { + if(errno == EAGAIN || errno == EWOULDBLOCK) + break; + throw(1); /* Die now. NOW. */ + } + client->nbtcphas += l; + + //printf("Read: %d, %04x, %d, %d\n",l,client->nbtcptype,client->nbtcphas, client->nbtcplen); + + /* We're all full. Yippie. */ + if(client->nbtcphas == client->nbtcplen) + { + uint32 len; + + switch(client->nbtcptype & 0xF00) + { + case NBTCP_UPDATEDATA: + { + GameEntry *game = (GameEntry *)client->game; + int x, wx; + if(client->nbtcp[0] == 0xFF) + { + EndNBTCPReceive(client); + StartNBTCPReceive(client, NBTCP_COMMANDLEN, 5); + return(1); + } + for(x=0,wx=0; x < 4; x++) + { + if(game->Players[x] == client) + { + game->joybuf[x] = client->nbtcp[wx]; + wx++; + } + } + RedoNBTCPReceive(client); + } + return(1); + case NBTCP_COMMANDLEN: + { + uint8 cmd = client->nbtcp[4]; + len = de32(client->nbtcp); + if(len > 200000) /* Sanity check. */ + throw(1); + + //printf("%02x, %d\n",cmd,len); + if(!len && !(cmd&0x80)) + { + SendToAll((GameEntry*)client->game, client->nbtcp[4], 0, 0); + EndNBTCPReceive(client); + StartNBTCPReceive(client,NBTCP_UPDATEDATA,client->localplayers); + } + else if(client->nbtcp[4]&0x80) + { + EndNBTCPReceive(client); + if(len) + StartNBTCPReceive(client,NBTCP_COMMAND | cmd,len); + else /* Woops. Client probably tried to send a text message of 0 length. Or maybe a 0-length cheat file? Better be safe! */ + StartNBTCPReceive(client,NBTCP_UPDATEDATA,client->localplayers); + } + else throw(1); + return(1); + } + case NBTCP_COMMAND: + { + len = client->nbtcplen; + uint32 tocmd = client->nbtcptype & 0xFF; + + if(tocmd == 0x90) /* Text */ + { + char *ma, *ma2; + + ma = (char *) malloc(len + 1); + memcpy(ma, client->nbtcp, len); + ma[len] = 0; + asprintf(&ma2, "<%s> %s",client->nickname,ma); + free(ma); + ma = ma2; + len=strlen(ma); + SendToAll((GameEntry*)client->game, tocmd, (uint8 *)ma, len); + free(ma); + } + else + SendToAll((GameEntry*)client->game, tocmd, client->nbtcp, len); + EndNBTCPReceive(client); + StartNBTCPReceive(client,NBTCP_UPDATEDATA,client->localplayers); + return(1); + } + case NBTCP_LOGINLEN:len = de32(client->nbtcp); + if(len > 1024 || len < (16 + 16 + 64 + 1)) + throw(1); + EndNBTCPReceive(client); + StartNBTCPReceive(client,NBTCP_LOGIN,len); + return(1); + case NBTCP_LOGIN: + { + uint32 len; + uint8 gameid[16]; + uint8 *sexybuf; + uint8 extra[64]; + + len = client->nbtcplen; + sexybuf = client->nbtcp; + + /* Game ID(MD5'd game MD5 and password on client side). */ + memcpy(gameid, sexybuf, 16); + sexybuf += 16; + len -= 16; + + if(ServerConfig.Password) + if(memcmp(ServerConfig.Password,sexybuf,16)) + { + TextToClient(client,"Invalid server password."); + throw(1); + } + sexybuf += 16; + len -= 16; + + memcpy(extra, sexybuf, 64); + sexybuf += 64; + len -= 64; + + client->localplayers = *sexybuf; + if(client->localplayers < 1 || client->localplayers > 4) + { + TextToClient(client,"Invalid number(%d) of local players!",client->localplayers); + throw(1); + } + sexybuf++; + len -= 1; + + AddClientToGame(client, gameid, extra); + /* Get the nickname */ + if(len) + { + client->nickname = (char *)malloc(len + 1); + memcpy(client->nickname, sexybuf, len); + client->nickname[len] = 0; + if((client->nickname = CleanNick(client->nickname))) + if(!NickUnique(client)) /* Nickname already exists */ + { + free(client->nickname); + client->nickname = 0; + } + } + uint8 *mps = MakeMPS(client); + + if(!client->nickname) + asprintf(&client->nickname,"*Player %s",mps); + + printf("Client %d assigned to game %d as player %s <%s>\n",client->id,(GameEntry*)client->game - Games,mps, client->nickname); + + int x; + GameEntry *tg=(GameEntry *)client->game; + + for(x=0; xMaxPlayers; x++) + if(tg->Players[x] && tg->IsUnique[x]) + { + if(tg->Players[x] != client) + { + try + { + TextToClient(tg->Players[x], "* Player %s has just connected as: %s",MakeMPS(client),client->nickname); + } catch(int i) + { + KillClient(tg->Players[x]); + } + TextToClient(client, "* Player %s is already connected as: %s",MakeMPS(tg->Players[x]),tg->Players[x]->nickname); + } + else + TextToClient(client, "* You(Player %s) have just connected as: %s",MakeMPS(client),client->nickname); + } + } + EndNBTCPReceive(client); + StartNBTCPReceive(client,NBTCP_UPDATEDATA,client->localplayers); + return(1); + } + } + } + return(0); +} + +int ListenSocket; + +static char *CleanNick(char *nick) +{ + int x; + + for(x=0; x' || nick[x] == '*' || (nick[x] < 0x20)) + nick[x] = 0; + if(!strlen(nick)) + { + free(nick); + nick = 0; + } + + return(nick); +} + +static int NickUnique(ClientEntry *client) +{ + int x; + GameEntry *game = (GameEntry *)client-> game; + + for(x=0; xMaxPlayers; x++) + if(game->Players[x] && client != game->Players[x]) + if(!strcasecmp(client->nickname, game->Players[x]->nickname)) + return(0); + return(1); +} + +static int MakeSendTCP(ClientEntry *client, uint8 *data, uint32 len) throw(int) +{ + if(send(client->TCPSocket, data, len, MSG_NOSIGNAL) != len) + throw(1); + return(1); +} + +static void SendToAll(GameEntry *game, int cmd, uint8 *data, uint32 len) throw(int) +{ + uint8 poo[5]; + int x; + + poo[4] = cmd; + + for(x=0;xMaxPlayers;x++) + { + if(!game->Players[x] || !game->IsUnique[x]) continue; + + try + { + if(cmd & 0x80) + en32(poo, len); + MakeSendTCP(game->Players[x],poo,5); + + if(cmd & 0x80) + { + MakeSendTCP(game->Players[x], data, len); + } + } + catch(int i) + { + KillClient(game->Players[x]); + } + + } +} + +static void TextToClient(ClientEntry *client, const char *fmt, ...) throw(int) +{ + char *moo; + va_list ap; + + va_start(ap,fmt); + vasprintf(&moo, fmt, ap); + va_end(ap); + + + uint8 poo[5]; + uint32 len; + + poo[4] = 0x90; + len = strlen(moo); + en32(poo, len); + + MakeSendTCP(client, poo, 5); + MakeSendTCP(client, (uint8*)moo, len); + free(moo); +} + +static void BroadcastText(GameEntry *game, const char *fmt, ...) throw(int) +{ + char *moo; + va_list ap; + + va_start(ap,fmt); + vasprintf(&moo, fmt, ap); + va_end(ap); + + SendToAll(game, 0x90,(uint8 *)moo,strlen(moo)); + free(moo); +} + +static void KillClient(ClientEntry *client) +{ + GameEntry *game; + uint8 *mps; + char *bmsg; + + game = (GameEntry *)client->game; + if(game) + { + int w; + int tc = 0; + + for(w=0;wMaxPlayers;w++) + if(game->Players[w]) tc++; + + for(w=0;wMaxPlayers;w++) + if(game->Players[w]) + if(game->Players[w] == client) + game->Players[w] = NULL; + + time_t curtime = time(0); + printf("Player <%s> disconnected from game %d on %s",client->nickname,game-Games,ctime(&curtime)); + asprintf(&bmsg, "* Player %s <%s> left.",MakeMPS(client),client->nickname); + if(tc == client->localplayers) /* If total players for this game = total local + players for this client, destroy the game. + */ + { + printf("Game %d destroyed.\n",game-Games); + memset(game, 0, sizeof(GameEntry)); + game = 0; + } + } + else + { + time_t curtime = time(0); + printf("Unassigned client %d disconnected on %s",client->id, ctime(&curtime)); + } + if(client->nbtcp) + free(client->nbtcp); + + if(client->nickname) + free(client->nickname); + + if(client->TCPSocket != -1) + close(client->TCPSocket); + memset(client, 0, sizeof(ClientEntry)); + client->TCPSocket = -1; + + if(game) + BroadcastText(game,"%s",bmsg); +} + +static void AddClientToGame(ClientEntry *client, uint8 id[16], uint8 extra[64]) throw(int) +{ + int wg; + GameEntry *game,*fegame; + + retry: + + game = NULL; + fegame = NULL; + + /* First, find an available game. */ + for(wg=0; wgMaxPlayers = 4; + memcpy(game->id, id, 16); + memcpy(game->ExtraInfo, extra, 64); + } + + + int n; + for(n = 0; n < game->MaxPlayers; n++) + if(game->Players[n]) + { + try + { + uint8 b[5]; + b[4] = 0x81; + MakeSendTCP(game->Players[n], b, 5); + break; + } + catch(int i) + { + KillClient(game->Players[n]); + /* All right, now the client we sent the request to is killed. I HOPE YOU'RE HAPPY! */ + /* Since killing a client can destroy a game, we'll need to see if the game was trashed. + If it was, then "goto retry", and try again. Ugly, yes. I LIKE UGLY. + */ + if(!game->MaxPlayers) + goto retry; + } + } + + int instancecount = client->localplayers; + + for(n=0; nMaxPlayers; n++) + if(!game->Players[n]) + { + game->Players[n] = client; + if(instancecount == client->localplayers) + game->IsUnique[n] = 1; + else + game->IsUnique[n] = 0; + instancecount --; + if(!instancecount) + break; + } + + /* Game is full. */ + if(n == game->MaxPlayers) + { + for(n=0; nMaxPlayers; n++) + if(game->Players[n] == client) + game->Players[n] = 0; + TextToClient(client, "Sorry, game is full. %d instance(s) tried, %d available.",client->localplayers,client->localplayers - instancecount); + throw(1); + } + + client->game = (void *)game; +} + + + + +int main(int argc, char *argv[]) +{ + + struct sockaddr_in sockin; + socklen_t sockin_len; + int i; + char* pass = 0; + /* If we can't load the default config file, use some defined values */ + if(!LoadConfigFile(DEFAULT_CONFIG)) { + ServerConfig.Port = DEFAULT_PORT; + ServerConfig.MaxClients = DEFAULT_MAX; + ServerConfig.ConnectTimeout = DEFAULT_TIMEOUT; + ServerConfig.FrameDivisor = DEFAULT_FRAMEDIVISOR; + } + char* configfile = 0; + + + for(i=1; ilocalplayers; + + while(CheckNBTCPReceive(client)) {}; + } // catch + catch(int i) + { + KillClient(Games[whichgame].Players[n]); + } + } // A games clients + + /* Now we send the data to all the clients. */ + for(n = 0; n < Games[whichgame].MaxPlayers; n++) + { + if(!Games[whichgame].Players[n] || !Games[whichgame].IsUnique[n]) continue; + try + { + MakeSendTCP(Games[whichgame].Players[n], Games[whichgame].joybuf, 5); + } + catch(int i) + { + KillClient(Games[whichgame].Players[n]); + } + } // A game's clients + } // Games + + SpeedThrottle(); + } // while(1) +} diff --git a/fceu-server/throttle.cpp b/fceu-server/throttle.cpp new file mode 100644 index 00000000..846f3e8f --- /dev/null +++ b/fceu-server/throttle.cpp @@ -0,0 +1,102 @@ +/* FCE Ultra Network Play Server + * + * Copyright notice for this file: + * Copyright (C) 2004 Xodnizel + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + + +#include +#include +#include "types.h" +#include "throttle.h" + +#ifdef TODO +THROTTLE *MakeThrottle(uint32 fps) +{ + + +} + +/* Returns 1 if it's time to run, 0 if it's not time yet. */ +int TestThrottle(THROTTLE *throt) +{ + +} + +/* Pass it a pointer to an array of THROTTLE structs */ +/* It will check */ +void DoAllThrottles(THROTTLE *throt) +{ + + +} + +void KillThrottle(THROTTLE *throt) +{ + +} + +#endif + +static uint64 tfreq; +static uint64 desiredfps; + +int32 FCEUI_GetDesiredFPS(void) +{ + //if(PAL) + // return(838977920); // ~50.007 + //else + return(1008307711); // ~60.1 +} + +void RefreshThrottleFPS(int divooder) +{ + desiredfps=(FCEUI_GetDesiredFPS() / divooder)>>8; + tfreq=1000000; + tfreq<<=16; /* Adjustment for fps returned from FCEUI_GetDesiredFPS(). */ +} + +static uint64 GetCurTime(void) +{ + uint64 ret; + struct timeval tv; + + gettimeofday(&tv,0); + ret=(uint64)tv.tv_sec*1000000; + ret+=tv.tv_usec; + return(ret); +} + +void SpeedThrottle(void) +{ + static uint64 ttime,ltime; + + waiter: + ttime=GetCurTime(); + + if( (ttime-ltime) < (tfreq/desiredfps) ) + { + usleep(1000); + goto waiter; + } + if( (ttime-ltime) >= (tfreq*4/desiredfps)) + ltime=ttime; + else + ltime+=tfreq/desiredfps; +} + diff --git a/fceu-server/throttle.h b/fceu-server/throttle.h new file mode 100644 index 00000000..b8357b56 --- /dev/null +++ b/fceu-server/throttle.h @@ -0,0 +1,23 @@ +/* FCE Ultra Network Play Server + * + * Copyright notice for this file: + * Copyright (C) 2004 Xodnizel + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * */ + + +void RefreshThrottleFPS(int divooder); +void SpeedThrottle(void); diff --git a/fceu-server/types.h b/fceu-server/types.h new file mode 100644 index 00000000..7b831930 --- /dev/null +++ b/fceu-server/types.h @@ -0,0 +1,38 @@ +/* FCE Ultra Network Play Server + * + * Copyright notice for this file: + * Copyright (C) 2004 Xodnizel + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __FCEU_TYPES +#define __FCEU_TYPES + +#include +typedef int8_t int8; +typedef int16_t int16; +typedef int32_t int32; + +typedef uint8_t uint8; +typedef uint16_t uint16; +typedef uint32_t uint32; + +typedef unsigned long long uint64; +typedef long long int64; +#define INLINE inline +#define GINLINE inline + +#endif