Mr Random is making a new Frontend
#51
@canes everybody loves pictures. PCSX2Bonus is quite simple tho. Initial startup you're prompted to choose 2 directories, 1 for games and another for pcsx2, and then it'll do the magic of gathering information about the games you have. This is the kind of abstraction i'm looking for. I'd argue that connecting to GameFaqs.come and downloading their pictures is a bit phony and slow, but it get's the job done.

@CK1 That the emulator is working out of the box is not gonna be visible to the user? No they probably aren't gonna be noticing that the games aren't failing. (No i'm serious, it's like being a bassist. You're only noticed if you made a mistake)

Ok a little about how I use pcsx2 or even my computer at home:
I don't even have access to the keyboard because i don't need it, it's better that way. I just use the joystick for mouse in Windows mode, i use joy2key so when it detects pcsx2.exe all key bindings will stop being handled by j2k (by design) and just leave pcsx2 to do it's own thing. (I do have one key bound on R3(1sec) => Alt+F4). Meaning there is no way i can access the emulation settings during runtime. I recently got my hands on Onimusha and found that the game is just a black screen. Most probably i need to apply some settings for(which i didn't get to because this project) it. Like many other games. So if a game can't work autonomously with pcsx2 i just consider the game broken and I'll get rid of it.

Loading a pair of settings along with a game is what PCSX2Bonus does. I simply just want to implement that directly into pcsx2 and not by some funky 3rd party. An application that opens an application seems awfully hacky.

Also, the game front end in pj64 which is probably gonna be all i make in pcsx2. We'd probably need a dialogue to choose games directory, but that's all.
   
*cough* even pj64 has some concept of per game settings.

(06-02-2016, 05:32 AM)dogen (Page 2) Wrote: Well, making it easier to start games won't help people with configuring it.

Don't get me wrong, I'm fine with a slicker interface, but I don't think it'll lower the barrier of entry much. Pcsx2 has a lot of options, and a lot of games require messing with them. That's not going away any time soon.
 ^ Unless we had a collection of configurations. A kind of database if you will. <_<


I know we have the widescreen patches and cheats and patches and whatnot. I'm not gonna change existing working code that so why even bring it up? I think we keep coming back to same conclusions, am i missing the point?
Reply

Sponsored links

#52
I like pictures as much as the next person, but I absolutely HATE thumbnail image force as only means of listing things to much space is wasted and make clutter some might like that but I dont.

I rather See List by name and "if" highlighted it show an image or clicked it goes to new page with it description/info  and image. When one has  30+ Listing and have to do needless scrolling all cause it only showed 5 per row/column (example) cause of the image, (dish network does this with the hopper system and I absolutely cant stand it)

Listing by name (text) is far better special when there lot of listings, leave the image for when you select said listing description/info
Reply
#53
Hi, it's been a while now. But i finally have some progress. I'm getting more accustomed to C++ but there's still a long way to go.


       


So what are these pictures? They are the last version. Ok i know the MainFrame looks like ass with that list. But it works. I somehow managed to add a new section to the settings, you'll see the folder options has a new one called "Roms". So the list is enumerated by the directory files and when you double click an entry it will launch given game. There still is a fair load of glitches i need to fix before this can be official. For example if you change the size of any column the application crashes. Whoopdidoo.
Also the list needs to show some more comprehensive information instead of just the filename.
I also need to make the window resizable and the inner list should just scale with it. wxWidgets have something called "sizers" which seems so handle layout and sizing or something, but i have little luck with it.


I like to talk about code, so the next section is gonna be a bit funky for non-coders:

Ok for a week i was stuck at a problem with creating a new frame and making event routing without making any codesmells in MainFrame.cpp.
As it turns out C++ has a very poor grasp on the cencept "Event Driven Programming" they had static function pointers but mixing in OOP things get greasy. I studied about std::function<> and just basic function pointers "void(*)(int p)" but it's impossible to refer to a member function without also having to specify the class name e.g: void(MainFrame::*)(GameModel* pickedGame). This made it nearly impossible to create a generic solution. What i came up with was not really satisfactory. But it did what i needed.

   

You're supposed to create a derived class of the Action<> class where the first type parameter is the type of the "function parameter". This is an extension of the "Observer Pattern". The reason why this is important is because of a programming pattern i've learned with experience is the most solid in *most* cases. UI programming being one of those cases. The idea is that the MainFrame.cpp has some functions that's private and without exposing these private members i need GameListFrame.cpp to make MainFrame.cpp react and do something. The concept is: MainFrame and listen to messages from GameListFrame *but it will not take orders*. This decoupling effectively makes GameListFrame a reusable piece of functionality because it only takes care of it's own responsibility. Making a list of games that is but it's not dictating what "opening" a game actually means, but merely passes a message any possible subscribers.

It seems wxWidgets has some built-in function for Event Driven Programming but the documentation is pretty much useless. There is Bind and Connect and some other funky things but whatever.

Then about the enumeration of the files in the folder. Somehow it appeared as if pcsx2 provided some functions for this. But i couldn't find the function so i ended up using wxDir::GetAllFiles(path.ToString(), outArr, L"*.iso", wxDIR_FILES); It's still using the wxWidgets function so it should still be ok concerning cross platform compatibility. I have a problem currently with the 3rd parameter. It's supposed to be a pattern to define what files are allowed but again the documentation.


const wxString &filespec = wxEmptyString' Wrote:Only files matching the filespec are taken, with empty spec matching all the files.

This is the public documentation. Nothing i couldn't have guessed by looking at the parameter name LOL.
I did guess my way that "*.iso" finds all the iso files. I seems familiar, but i need to make it match iso, mdf, nrg, bin and img. I tried separating with comma and semicolons but to no avail. Chances are i'm gonna need to dig some 1000 lines "example" project to find the pattern syntax.

Right this moment I'm searching for the code that reads the ISO information. As far as i can see the DiskSerial is a global variable that is set upon calling _reloadElfInfo(wxString elfpath) in CDVD.cpp:343. The global variable DiscSerial has plenty of reads, but only really ever assigned in this function. After this i need to figure out how the CRC is calculated. (I'm guessing the binary from the internal ELF).


Later that a bit of effort will be needed to integrate a database of some sort. I'm still uncertain whether or not to change the existing database. I'm guessing some people really appreciate being able to edit the database in plaintext rather than needing a program to do it. And SQLite does require yet another 3rd party library. That would be up one of the more frequent developers of the project to decide. (According to the SVN the GamesIndex.dbf is 6 years old with numerous developers and contains roughly 10k entries).

All this just to get a couple of more columns in the MainFrame. I have plenty work work on so i'll get back at it.

Ok, btw here's a funny error message i got from C++
[Image: attachment.php?aid=60313]
It's some kind of elvish language, i can't understand it.
   
Reply
#54
Code isn't too bad but could still be worked on , also nice progress. I think you're finally heading in the right direction Tongue

Note: Make sure to remove all the redundant code , trailing white spaces and mixed white spaces from the code else you'll be having a nightmare after making a pull request Tongue
Reply
#55
Hey good job, starting is always the most difficult part
[Image: newsig.jpg]
Reply
#56
I'm sure people won't mind adding there own image. A lot of people, Myself included would prefer having an image to go with there game.
Reply
#57
Looks nice. Some suggestions:
  • Show only file names, not the full paths.
  • Change Roms to ISOs.
  • Make sure it searches files in the subfolders.
Reply
#58
Having a bit of an issue with the information displayed. Currently working on working out the specs for the GameIndex.dbf afaik it's just lazy key-pairing.
  1. I suppose in the first rev showing 1 filename column and leave it at that until i crack the riddles of the database.
  2. Consider this "*.iso; *.mdf; *.nrg; *.bin; *.img"
  3. Subfolders. Sure thing.
Reply
#59
Read GameDatabase.h.
Reply
#60
Thumbs Up 
Keep up the good work @CyberFox. I'm loving your ideas and enthusiasm. Don't listen to the haters on this forum. They don't speak for the rest of us. New features are a definite welcome in my book
OS: Windows 10 Pro (64 bit)
CPU: Intel i5-8400 2.8 GHz (4.0 GHz Turbo)
GPU: Gigabyte GeForce RTX 2060 Gaming OC (6 GB)
RAM: Ripjaws V Series, 2x8 GB DDR4 (2666 MHz)
Motherboard: GIGABYTE B360M D3H
Power supply: EVGA SuperNOVA G3 550 W
Reply




Users browsing this thread: 1 Guest(s)