Author Topic: Question about Github code contributions  (Read 3014 times)

Offline fprietog

  • Member
  • ***
  • Posts: 121
  • Karma: +23/-0
  • El cerebro de la bestia
Question about Github code contributions
« on: May 12, 2025, 11:10:04 PM »
Hello,

I have a question about Github code contributions. Do you allow pull requests from any user?

In my case, as I've now a way to compile and test the FBNeo builds, I want to add some games that are missing from the software lists that are worth the effort. For instance, I love SNES games so I started with "Double Dragon V - The Shadow Falls" (USA & Europe versions) that It's currently only available for Megadrive.

So, I've forked the FBNeo repo, modified the file d_snes.cpp to add both versions of the game following the naming convention of the other games and the instructions of burnint.h to fill the structs. After testing I think that the game is working as expected.

At this point I want to know if it's possible to contribute it to your repo, and if so, the steps to do it correctly.

BTW, I'm a programmer but I learnt C and C++ almost 30 years ago and never used them (I'm mainly an ILE RPG programmer for IBM Power, formerly known as AS400).

Thanks and best regards.
« Last Edit: May 12, 2025, 11:27:15 PM by fprietog »

Offline dink

  • Administrator
  • *****
  • Posts: 5331
  • Karma: +522/-1
  • pie? I nearly bought one!
Re: Question about Github code contributions
« Reply #1 on: May 13, 2025, 12:50:06 AM »
Hi fprietog,
Of course, anyone can contribute.  It's actually a very welcome and nice thing :)

As for making a pull request, I've never actually done this.  I'm sure any video on youtube for making a github PR would help, though!

Feel free to add whatever you'd like.  If you need help with anything, or would like me to check/give feedback on anything before submitting, you could post or pm it.

best regards,
- dink

Offline fprietog

  • Member
  • ***
  • Posts: 121
  • Karma: +23/-0
  • El cerebro de la bestia
Re: Question about Github code contributions
« Reply #2 on: May 13, 2025, 12:56:00 AM »
@dink, thank you very much for your offer of help!.

My fork of your repo is at https://github.com/fprietog/FBNeo

I'm going to do a Pull Request. First time too.

Edit: done. It's in your hands now :D
« Last Edit: May 13, 2025, 01:00:25 AM by fprietog »

Offline Gab75

  • FBNeo Contributor
  • *****
  • Posts: 1735
  • Karma: +85/-0
  • Logic is the beginning of wisdom, not the end...
Re: Question about Github code contributions
« Reply #3 on: May 13, 2025, 01:20:13 AM »
Hi fprietog,
Thanks! Your contribution is very welcome! :)

Offline dink

  • Administrator
  • *****
  • Posts: 5331
  • Karma: +522/-1
  • pie? I nearly bought one!
Re: Question about Github code contributions
« Reply #4 on: May 13, 2025, 01:42:33 AM »
success! :)

Offline fprietog

  • Member
  • ***
  • Posts: 121
  • Karma: +23/-0
  • El cerebro de la bestia
Re: Question about Github code contributions
« Reply #5 on: May 13, 2025, 01:43:55 AM »
@Gab75 Thank you very much! I'll follow your tradition and will publish the changes done in a post with screenshots  :smilie:

Offline fprietog

  • Member
  • ***
  • Posts: 121
  • Karma: +23/-0
  • El cerebro de la bestia
Re: Question about Github code contributions
« Reply #6 on: May 13, 2025, 01:46:19 AM »
success! :)
Fantastic!

I realize that some SNES games doesn't match the MAME rom names so history.xml doesn't work for these... I'll correct the ones I found when adding games.

Offline fprietog

  • Member
  • ***
  • Posts: 121
  • Karma: +23/-0
  • El cerebro de la bestia
Re: Question about Github code contributions
« Reply #7 on: May 13, 2025, 04:39:14 AM »
I hate to quote myself but I have a question...

I realize that some SNES games doesn't match the MAME rom names so history.xml doesn't work for these... I'll correct the ones I found when adding games.

Well, I want to add support for the game "Super Ghouls'n Ghosts (Euro)" as clone of the USA version. These are the related games:

Game NameFBNeoMAME
Super Ghouls'n Ghosts (USA)supergngsgngu
Chou Makaimura (Japan)choumakaimurachomakai

For the USA version, if I change the FBNeo ROM name "supergng" by the MAME ROM name "sgngu" the game info will show the history.xml info.
But the side effect is that it's pictures of the Titles, Previews, etc, will disappear as these will become missnamed.
Same for the Japanese version.

What do you think: should I leave the current FBNeo ROM name and forget about the history.xml info or should I change it to MAME ROM name?

I personally prefer the MAME ROM name and having the history available. I can also replace the previews and titles renamed in the FBNeo-extras Github repo minimizing the problem.

In any case, it's something quite important to decide by myself... So please, tell me what to do.  :confused:

Thanks and best regards.

Offline Gab75

  • FBNeo Contributor
  • *****
  • Posts: 1735
  • Karma: +85/-0
  • Logic is the beginning of wisdom, not the end...
Re: Question about Github code contributions
« Reply #8 on: May 13, 2025, 06:31:13 AM »
The MAME "zipped files name structure" is based on a 8 characters limit (at least for the parent title) while the FBN "zipped files name structure" often uses a more free and variable name system (in this way the zipped game is easier to identify).
IMHO it's better to leave things be, also because there would be a lot of files (archives and pictures) to rename!
Obviously I also wait the opinion of Others! :)

PS: for "Super Ghouls'n Ghosts (Euro)" the zipped file (FBN style) should be named: supergnge

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1195
  • Karma: +68/-2
  • Helper
Re: Question about Github code contributions
« Reply #9 on: May 13, 2025, 09:05:04 AM »
There are 2 lookup tables for games named differently from MAME :
- https://github.com/finalburnneo/FBNeo/blob/master/src/burn/hiscore.cpp#L336-L375 for hiscore.dat
- https://github.com/finalburnneo/FBNeo/blob/master/src/burner/win32/sel.cpp#L1235-L1276 for history.dat (i think ?)

It might be a good idea to merge those 2 tables into one (in some separate header file for easy include ?), and expand it with additional entries ?

One reason those romsets are named differently from MAME is that their content is usually different (single file for FBNeo, multiple files for MAME).
« Last Edit: May 13, 2025, 09:11:06 AM by barbudreadmon »

Offline dink

  • Administrator
  • *****
  • Posts: 5331
  • Karma: +522/-1
  • pie? I nearly bought one!
Re: Question about Github code contributions
« Reply #10 on: May 13, 2025, 09:11:28 AM »
For the consoles I worked on: I made it a point to not follow MAME at all. Especially since they're not based on any MAME code.  (except for the cpu and/or sound core)

best regards,
- dink

Offline fprietog

  • Member
  • ***
  • Posts: 121
  • Karma: +23/-0
  • El cerebro de la bestia
Re: Question about Github code contributions
« Reply #11 on: May 13, 2025, 10:39:10 AM »
There are 2 lookup tables for games named differently from MAME :
- https://github.com/finalburnneo/FBNeo/blob/master/src/burn/hiscore.cpp#L336-L375 for hiscore.dat
- https://github.com/finalburnneo/FBNeo/blob/master/src/burner/win32/sel.cpp#L1235-L1276 for history.dat (i think ?)

It might be a good idea to merge those 2 tables into one (in some separate header file for easy include ?), and expand it with additional entries ?
Sounds interesting, lot's of work, but interesting. At first sight I'm not sure if these tables are only for arcade or also for home system games as there isn't a single entry with prefix like nes_ or snes_...

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1195
  • Karma: +68/-2
  • Helper
Re: Question about Github code contributions
« Reply #12 on: May 14, 2025, 04:04:05 AM »
Home systems support shouldn't be a concern.

Populating that list still seems like less work than changing driver names.

The only concern i might have is speed since the list has to be iterated until a match is found. I'm wondering if there is faster way to do this without using functions that require recent cpp revisions.