PDA

View Full Version : Mupen 0.4 Command Line Version



jogibear9988
May 20th, 2005, 09:54
If compiled the Command Line Version of Mupen64 because i want to use it within from another Program, and the other Version didnt start the emulation automatic. So I've made some chanches to mupen64_nogui, so that the emulation parameters can be set on the command line!

I've uploaded the changes! Wold be nice if you could include them and if you allow binary nogui download!


If you look for my patch file, It's in one of my last posts!!!

Tillmann
May 20th, 2005, 11:25
cool this could be nice for multi front-ends devs... :)

blight
May 20th, 2005, 13:44
Your patch looks like a dirty hack... Better use something like http://www.emutalk.net/showthread.php?t=27254 which works just as well, until someone properly implements argument parsing.

jogibear9988
May 21st, 2005, 16:41
dirty hack??
i now have created a new version. and with the other, you can't set fullscreen mode on startup.

i now have created 5 command line switches and if not useed the emulator will start as he was before!

jogibear9988
May 21st, 2005, 17:09
he rmy new version:

changes:

fullscreen selectable!
command line parameters now work!

please test



!!! Atachment removed, it was obsolete!!!

ciruZ
May 22nd, 2005, 00:31
Even your new version look like a dirty hackfor me, too.
You're not using a good way of command line argument parsing.
Something like that would be better:
./mupen64 --fullscreen --video Glide64.so --audio jttl_audio.so --input cip.so --rsp mupen64_hle_rsp_azimer.so --dynarec Mario64.v64
If --video / --audio / --input / --rsp isn't specified, the one specified in the config file should be used. ;)

You should try to completly rewrite the main.c instead of doing dirty things like this:


int somefoo()
{
//lot
//of
//outcommented
//code
return 1;
}

Commenting the warning about a hacked rom out is also a bad idea. You should write a small notice to stdout.
You should avoid german messages like "Eingegebene Parameter", also. Better write "Given parameters".

Ok, that was everything I can say about it after a _VERY_ short look at it :).

jogibear9988
May 22nd, 2005, 03:00
ok, i'm trying to programing this...

ut in the current version the plugins from the ini files are not used too!

i'm looking now for inventing a good comand line interface for my next patch

jogibear9988
May 22nd, 2005, 23:42
a good command line parsing is no implemented! now im working on the config file!
i think i copy the config.c function from the gui gtk version. and i think i use the same config file.

so, the new patches from me will be ready tommorow!

Testers???

jogibear9988
May 23rd, 2005, 09:50
@ciruZ or others who could help

if made now a patch wich sould be able to use better command line parameters and config file reading!

therefor i have copied the config.c and .h from the gui-gtk and changed the includes. also i've made some changes to my main.c to support it.

also i have changed the makefile to compile with the config.c

but after running my mupen_nogui i get only the error "Speicherzugriffsfehler" (I think it's "memory access error" in english).

any help???


!!! Atachment removed, it was obsolete!!!

jogibear9988
May 23rd, 2005, 12:21
So, Now I hope this Version has the full functionality.

It uses the Config File from teh Gui Version.

Commandline Parameters override the InI settings!
I have also added 3 Ini Parameters:
No Ask
Fullscreen
and
Emulation Mode

To Compile copy my 4 files in the sourcecode main directory and edit your makefile so tha config.o is the OBJ list:

Bevore editing:
...
main/mupenIniApi.o \
main/savesates.o
...

After:
...
main/mupenIniApi.o \
main/svestates.o \
main/config.o
...


So please test...
It would be nice if this patch could find his way to the offical sources...


!!! Atachment removed, it was obsolete!!!

Hacktarux
May 23rd, 2005, 17:55
Three questions:

1) wouldn't it be possible to use config.c and config.h from gtk gui directly. Is there something different in yours ? If they are exactly the same it's better to have only one file in the source code tree, i'll not forget to copy modifications from one file to the other.

2) what does "Gewaehlte" mean ?

3) can you do a patch ? It's much easier to track your source code modifications with a patch :)

ciruZ
May 23rd, 2005, 18:59
To point 2: It means selected. That's what I critized before: It's not a good idea to use german texts in something that others should be able to use, too.

jogibear9988
May 23rd, 2005, 20:05
sorry, i thougt i had removed all the german comments.

the config.c is the same, only the config.h is different!

I'm checking if the config could be the same.

Does it work on your systems too??

I can do a patch, if you say me how! I've never done this befor and of course I programm in C only for 3 days, so if you can help me...

jogibear9988
May 23rd, 2005, 22:45
here is my New Update as Patch

jogibear9988
May 23rd, 2005, 22:48
in this version i've used the same confg.c and config.h for mupen,
but if've only tested to build the nongui executable.

But I think the other had to work, too!

jogibear9988
May 23rd, 2005, 23:03
how to use the patch:

go into the emu64 dir and enter

patch -p1 < patch.txt

ciruZ
May 24th, 2005, 15:06
Can you please stop double posting? Thanks.

I can do a patch, if you say me how! I've never done this befor and of course I programm in C only for 3 days, so if you can help me...
diff -Nru old_dir new_dir is the best way ;).
And: Unidiffs have nothing to do with C, it's just Unix ;).

jogibear9988
May 25th, 2005, 07:37
Thanks for the information, but if have already done a Patch file.

Yes I'm I will stop it, it wasn't my intetinon to double post...