|
Post by Gamesoul Master on Aug 14, 2006 11:09:31 GMT -5
I don't suppose you'd know anything about Java programming (specifically, how to run a program with a simple command, like using "system("psxfin.exe");" in C++)?
|
|
|
Post by Ultima on Aug 14, 2006 11:14:09 GMT -5
I do believe there was some kind of exec function in Java, but I don't remember anymore -- haven't programmed in Java in more than 2 years =T Lemme take a quick look through my old stuff though. Edit: Nope, I never used exec in my Java "career," though I did glance over it. It used to require the use of a Runtime instance, but nowadays, it seems, ProcessBuilder is used instead. You'll find more information here.
|
|
|
Post by Gamesoul Master on Aug 14, 2006 11:42:49 GMT -5
Yeah, I was already looking through that. I find myself using the Runtime.exec method anyway (instead of the ProcessBuilder that seems to be liked so much). Just something about the original that I like better (and understand better). I had really been hoping for an easier way, but I should've figured that Java wasn't going to make anything easier for me. If not for my custom GUI classes, *that'd* probably be harder to implement, too, than if I used C++. Well, I'm committed now...
Edit: I've now managed to port all the existing functionality over to Java, so now I guess it's time to start working on the GUI. Hopefully it won't give me any problems, but I hope nobody expects *too* much out of the first GUI release... It'll probably be a simple conversion of current features over to a GUI. Later versions will contain the extra features that have been requested.
|
|
|
Post by patrickp on Aug 14, 2006 16:49:11 GMT -5
Actually, I just mentioned this in the 'pSX 1.9 Request Thread,' Ultima: you can use file names with spaces and long filenames not included in quotes if you write them according to the 8.3 filename convention. eg 'Program Files' becomes 'Progra~1,' 'Documents and Settings' becomes 'Docume~1' etc. So your unworking psxfin -a1,"C:\Documents and Settings\<username>\Desktop\memcard2.bin" becomes psxfin -a1,C:\Docume~1\<username>\Desktop\memcard2.bin with <username> also modified if it's too long or has spaces. edit: sorry, ultima, haven't tried your frontend yet. Brain isn't working well today; maybe tomorrow...
|
|
|
Post by Gamesoul Master on Aug 14, 2006 16:52:52 GMT -5
Just remembered why I stopped programming in Java a couple years ago. Inability to convert the compiled code into an .exe file. So, unless I wanna distribute a program that people can use as long as they have a decent JVM installed, I'm gonna have to finish teaching myself C++ GUI. Figures. Just when things were going so well too...
|
|
|
Post by Ultima on Aug 15, 2006 2:04:36 GMT -5
Tada, I completed my version with profiles and memory card support! Enjoy! I'm not responsible if your computer blows up, or the world comes to an end. In short, this is provided for free with no guarantees rapidshare.de/files/29450569/pSX_Frontend_v1.01.rar.htmlThanks a bunch, patrickp, I'd totally forgotten about 8.3 short path+name. You are duly credited. I'd still rather there be full paths, though, as short paths are unreadable and ugly. As such, the request will still stand @gamesoul Master: GUI programming is horrible, period I tried with Java about 2 years ago for a project, and while I got it going, it was ugly (not just the interface itself, but the code as well). I never got around to learning GUI programming with C, and never bothered to learn C++ (shamefully).
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 15, 2006 5:07:15 GMT -5
Ultima: Found a bug. The ini file is always saved to the last used path rather than the workpath. For example, if I pick a memcard from the default cards folder, and save a profile after that, the ini (which includes the profiles) is saved in the cards folder, and not the base folder.
A suggestion too. How about either fetching the paths from psx.ini for cards, images and suchs, or alternately you could make it so that the frontend has it's own paths? Right now it's a bit annoying to browse folders when making profiles because I don't keep my images in the root/cdimages path.
Did that make sense? :-D
|
|
|
Post by Gamesoul Master on Aug 15, 2006 6:13:11 GMT -5
Ultima: What language is your frontend programmed in, roughly (I say roughly because you said you were using a GUI-compiler to create it)? As for the Java coding... my code looks great, especially considering I make a lot of custom classes to simplify my coding (hell, I even did a lot of work on making the Java code being worked with look as much like C/C++ as possible... I had it down to very minor differences when I called it quits at that time). But the GUI looks... not very nice (it doesn't use any Windows-based templates for appearance), and I can't convert my code to an .exe that I know everybody could use (although one utility I found seemed to make it *more* portable, but not enough). C++ is *the* language to learn, as far as I'm concerned (and of course, learning the C behind it at the same time). I have absolutely no complaints about programming in C++, except that I need to learn more about GUI programming (which is my own fault for always preferring the console interface). Until I get a GUI working in C++ for it, I don't think there's too much more optimization I can do with the program. One thing I do intend to implement in the next day or two, though, is allowing the command-line options to be input by the user (or input nothing for no options). Certainly better for the user (and 100x easier to code) than providing a console-list choice for each option (even using "goto" statements, which are usually a trademark of my small programs. People complain about them, but the programs I use them in are too small for the "breaks" in code to be any kind of concern). @herra: If his code is based in C/C++ (which I don't think it is, based on what's been said so far), then getting those values is *very* simple, and would be a good idea. If he's using some Basic derivative or something... then I'm not sure. I'd imagine that it would be nearly as easy, as I'd almost guarantee that there are API-equivalent commands in Basic-type languages (being as popular as they are).
|
|
|
Post by Ultima on Aug 15, 2006 8:04:03 GMT -5
Everything was done using AutoIt, actually, including the GUI. AutoIt has its own programming language, called *drumroll* AutoIt Script. I have to say, my code is still ugly as ever when it comes to GUI, I'll have to *try* and clean it up later. And yeah, AutoIt Script is BASIC like. As such, there are built-in functions for reading/writing INI files.
@herra: Silly oversight, I fixed the frontend.ini thing saving all over the place. I haven't gotten around to even touching psx.ini directly yet, but will in a bit.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 15, 2006 10:02:36 GMT -5
Excellent. In case you want, I could host the frontend for you when you get it to a point when updates are less frequent. rapidshare sucks.
|
|
|
Post by patrickp on Aug 15, 2006 10:19:08 GMT -5
Incidentally, Ultima, good thinking to assign version numbers. Be a good idea for yours as well, GM! When you're a packrat like me, and can't bear to throw anything away, it's so useful to know which ones they are! ;-) ************************************************** Update: have done a quick test run, _very_ impressed, Ultima! Lots of wrinkles to iron out, but it does the job. I think Herra already commented about the .ini file being saved to the last folder selected; my workaround for that is to select the emu executable last, so that the emu folder is the last one selected. Doing that, I get saved profiles back again (since I have your executable in the pSX folder). Mind you, I rather like the persistence of folder location; it's always a pain when configuring pSX to have to navigate back to where all my images, memcards etc are for each folder I set as default - if it stayed at the last one it would make life much easier! However, I suppose setting the location of the frontend as default would, perhaps fix your .ini location problem? Are you planning to include BIOS selection? Seems to me if maybe you could incorporate GM's method in your frontend, that would make for a _very_ effective little application. Might be a good idea, as well, to have it close once it's started pSX? On the other hand, having it stay open means you can select your settings, try them, and then save the profile once you've tested it... perhaps you could have a setup mode where it stays open, and then a play mode where it closes once the emu runs? The other thing has to do with the selection of save states: looks like you've got it set ATM so you select a specific save state; is this a good idea, to start the emu with a save state selected? I would have thought that what's wanted is to select the save state _folder_ (which it won't do), then run the save state once the game has started? 2nd edit: goes without saying - you have to create a hip icon for this, too, you realise? Also, is a flash GUI really needed? This format is perfectly useable.
|
|
|
Post by Ultima on Aug 15, 2006 13:19:16 GMT -5
Yeah I already fixed the folder thing where it keeps going back to the frontend's current directory. As for the psxfrontend.ini bug... read right above Herra's last post About the closing thing... I'd been debating on that, but I don't see any reason to do so. I guess it shouldn't be *that* hard to add an option though (not unlike the "Restore Last Session" option). The savestate thing is already a commandline argument, so I don't see why it wouldn't be safe, though TBH, I never actually tested that feature. I'm not very good with graphics, so I decided to steal TheCloudofSmoke's icon instead. If anyone feels like making an icon for me, I'll see about including it (no guarantees ). This reminds me, though, that I should properly accredit TheCloudofSmoke for the icon. What do you mean by flash GUI? For the next version, I added a feature to export profiles to shortcuts.
|
|
|
Post by patrickp on Aug 15, 2006 13:59:26 GMT -5
Nope; I'm using v1.01, Ultima, and it still saves the .ini file wherever the last path was selected. 'Flash GUI' just means a smart, slick or impressive GUI. The shortcut export thing is an interesting idea. Any chance of implementing the BIOS selection bit?
|
|
|
Post by TheCloudOfSmoke on Aug 15, 2006 14:40:23 GMT -5
This is a really good frontend. I think it's worthy of it's own stickied thread and it should have a better home rather than that crappy rapidshare. I can whip you up an icon if you want, but if someone else wants to give it a shot, go ahead. I have a few suggestions (some of which might have already been requested). Is there a way to change change the screen size of pSX through the frontend? That would be really nice to have. Bios selection, ini support where you can edit all of the options of the emulator, multiple iso loader or something similar in which the user can add his/her favorite isos for quick loading, and maybe joypad profiles. Keep up the good work Ultima .
|
|
|
Post by Ultima on Aug 15, 2006 15:02:28 GMT -5
I'm not sure if there's any way to be able to change the screen size, but I certainly don't see an option from the commandline. It seemed like there was such an option in pSX 1.0 and 1.1 (-m<w>,<h>,<d>) but I never actually figured out how to use it. Thanks for the complements patrickp: I meant that I already fixed it for the next version And I'm guessing you meant "flash y" GUI... I wasn't sure if you meant Flash as in Adobe Flash The BIOS thing I'll see about, I still haven't really played around with psx.ini yet.
|
|