Welcome!
Final Burn Neo => FBN Development => Topic started by: Twinaphex on November 13, 2012, 08:04:20 AM
-
Here is the latest patch for the libretro FBA port - click on 'Raw' to get a raw diff file that you can save somewhere - from there it can be applied to the repository.
https://gist.github.com/4065706
Hopefully this can be synced upstream. It contains JNI Makefiles for building the Android port and an Xbox 1 solution as well. The other libretro targets have been updated as well.
The 'include' changes to the cpu/ folder files were necessary for the Xbox 1 port - MSVC 2003 seemed to have issues with the sheer number of include paths - cutting that down to just one or two includes for the CPU directories seemed to fix all the issues. Overall, I think it's more sustainable to do this as well rather than 'including' every new cpu folder that might get added - so I hope you guys won't mind.
So, to recap - libretro FBA now supports the following platforms as of this patch:
* PS3
* Xbox 360
* Xbox 1
* Wii
* Gamecube
* Android
* PC (Windows/Linux)
* Mac (OSX)
* Raspberry Pi
* Pandora
-
Awesome! :D
-
thanks!
-
Thanks for this - I'm going to look through it over the weekend with a view to committing.
-
Treblewinner - Would be real nice if you could merge this into mainline this weekend, because I have another patch coming up that will add PSP libretro support as well - but first this patch still needs to be merged in.
-
Would it be possible to add opendingux and dingoo a-320 native os support ?
Thanks !
-
Would it be possible to add opendingux and dingoo a-320 native os support ?
Thanks !
I don't own those devices.
-
Currently Dimitri Smagin started an open dingux port (A port of Final Burn Alpha to Dingoo a320 (OpenDingux), based on legacy fba 0.2.96.71 (ezxfba, fba2x and fba-pandora).
https://github.com/dmitrysmagin/fba-a320
A native port seems quite harder due to a320 limited amount of RAM (32 Mb) and would probably need some kind of caching file for lots of romsets.
I think that slaanesh started a native port but i would not expect him to share his source.
Wait and see.
Anyway, the dingoo a320 is still an amazing device.
-
I updated the compile guides and posted them in the FB Alpha section. The two new guides require the next version of FB Alpha which won't be too far behind!
Can we have the libretro patch pushed upstream finally before the next version of FB Alpha hits? I don't mean to sound annoyed but in a way I kind of am (can't lie) - it's been over five weeks and counting since I submitted this diff patch and I can't really continue on my end until this gets merged. If I had an easy way of giving you pull requests I would do that but I've tried twice/thrice now and it just isn't working out with this version management website.
-
Sorry for the delay - it was a big patch and I kept putting off going through it. I've committed it now with the following exceptions;
Index: src/burn/burn.cpp
===================================================================
--- src/burn/burn.cpp (revision 850)
+++ src/burn/burn.cpp (working copy)
@@ -8,7 +8,9 @@
// filler function, used if the application is not printing debug messages
static INT32 __cdecl BurnbprintfFiller(INT32, TCHAR* , ...) { return 0; }
// pointer to burner printing function
+#ifndef __LIBRETRO__
INT32 (__cdecl *bprintf)(INT32 nStatus, TCHAR* szFormat, ...) = BurnbprintfFiller;
+#endif
INT32 nBurnVer = BURN_VERSION; // Version number of the library
Index: src/burn/burn.h
===================================================================
--- src/burn/burn.h (revision 850)
+++ src/burn/burn.h (working copy)
@@ -209,7 +209,9 @@
#define PRINT_IMPORTANT (2)
#define PRINT_ERROR (3)
+#ifndef __LIBRETRO__
extern INT32 (__cdecl *bprintf) (INT32 nStatus, TCHAR* szFormat, ...);
+#endif
INT32 BurnLibInit();
INT32 BurnLibExit();
Index: src/burn/burn_gun.cpp
===================================================================
--- src/burn/burn_gun.cpp (revision 850)
+++ src/burn/burn_gun.cpp (working copy)
@@ -155,10 +155,17 @@
UINT8* pTile = pBurnDraw + nBurnGunMaxX * nBurnBpp * (y - 1) + nBurnBpp * x;
UINT32 nTargetCol = 0;
+#ifdef __LIBRETRO__
+ if (num == 0) nTargetCol = BurnHighCol(0xfc, 0x12, 0xee, 0);
+ if (num == 1) nTargetCol = BurnHighCol(0x1c, 0xfc, 0x1c, 0);
+ if (num == 2) nTargetCol = BurnHighCol(0x15, 0x93, 0xfd, 0);
+ if (num == 3) nTargetCol = BurnHighCol(0xf7, 0xfa, 0x0e, 0);
+#else
if (num == 0) nTargetCol = BurnHighCol(P1Colour, 0);
if (num == 1) nTargetCol = BurnHighCol(P2Colour, 0);
if (num == 2) nTargetCol = BurnHighCol(P3Colour, 0);
if (num == 3) nTargetCol = BurnHighCol(P4Colour, 0);
+#endif
for (INT32 y2 = 0; y2 < 17; y2++) {
Index: src/burn/drv/neogeo/d_neogeo.cpp
===================================================================
--- src/burn/drv/neogeo/d_neogeo.cpp (revision 850)
+++ src/burn/drv/neogeo/d_neogeo.cpp (working copy)
@@ -932,7 +932,7 @@
{ "", 0x00000, 0x00000000, 0 }, // 12
#endif
{ "sp-1v1_3db8c.bin", 0x20000, 0x162f0ebe, BRF_ESS | BRF_PRG | BRF_BIOS | BRF_SELECT | BRF_OPT }, // 13 Deck ver. 6 (Git Ver 1.3)
-#if !defined (ROM_VERIFY)
+#if !defined (ROM_VERIFY) && !defined(__LIBRETRO__)
{ "uni-bios_3_0.rom", 0x20000, 0xa97c89a9, BRF_ESS | BRF_PRG | BRF_BIOS | BRF_SELECT | BRF_OPT }, // 14 Universe BIOS ver. 3.0 (free)
// { "uni-bios_3_0.rom", 0x20000, 0x4cd01e5f, BRF_ESS | BRF_PRG | BRF_BIOS | BRF_SELECT | BRF_OPT }, // 14 Universe BIOS ver. 3.0 (full)
#else
I can't see any reason to commit these. If they are necessary I could be convinced, but I feel they should be handled by your port.
-
Hi, thanks for adding the patch - I might have another one coming up shortly.
Regarding burn_gun.cpp - what I do with BurnHighCol is that I've made that into a macro so that I don't have to go through a function pointer. Now, this approach works everywhere except for the usage of BurnHighCol in burn_gun.cpp - P1Colour, P2Colour and so on don't seem to properly expand into three params, so since the values are always the same and hardcoded anyways I changed the lines using BurnHighCol to that shown in the patch.
Regarding d_neogeo.cpp - it seems the FBA libretro port is more strict right now about certain ROM files being included in ZIPs than mainline FBA - the uni-bios_3_0.rom file is not present in a lot of neogeo.zip files that people use, so I commented it out. I guess I can just not define ROM_VERIFY instead in the future.
Regarding bprintf - as with BurnHighCol, that was turned by me into a macro and therefore I commented out the function pointer definition for Libretro.
Changing these function pointers to macros was done for speed considerations since I target a whole host of platforms now (everything from Raspberry to PS3s/360s to PCs and Android/iOS) where function calls can be very costly - never mind 'virtuals'.
-
Hi, thanks for adding the patch - I might have another one coming up shortly.
Regarding burn_gun.cpp - what I do with BurnHighCol is that I've made that into a macro so that I don't have to go through a function pointer. Now, this approach works everywhere except for the usage of BurnHighCol in burn_gun.cpp - P1Colour, P2Colour and so on don't seem to properly expand into three params, so since the values are always the same and hardcoded anyways I changed the lines using BurnHighCol to that shown in the patch.
Regarding d_neogeo.cpp - it seems the FBA libretro port is more strict right now about certain ROM files being included in ZIPs than mainline FBA - the uni-bios_3_0.rom file is not present in a lot of neogeo.zip files that people use, so I commented it out. I guess I can just not define ROM_VERIFY instead in the future.
Regarding bprintf - as with BurnHighCol, that was turned by me into a macro and therefore I commented out the function pointer definition for Libretro.
Changing these function pointers to macros was done for speed considerations since I target a whole host of platforms now (everything from Raspberry to PS3s/360s to PCs and Android/iOS) where function calls can be very costly - never mind 'virtuals'.
for burn_gun.cpp, I'll change it in mainline not to use macros (a bit unnceccesary anyway). Should resolve the issue.
for release builds I would recommend not having ROM_VERIFY defined (it's a debugging feature, and I also undefine it for release builds). I suppose the proper fix to the issue though is for lib retro to support use of optional roms (BRF_OPT).
I'll have a think on the bprintf situation.
-
I believe that latest patch (r929) you pushed nails it for my needs, yes.
I'll pull from repo and look at what other changes I've done since so that I can make a new patch file for you. This time there won't be any sweeping changes - changes should be mostly confined to libretro.cpp.
-
Hi there treblewinner,
here is a new patch.
https://gist.github.com/4371288
Hopefully this can be merged.
-
This second patch (to be applied after the first one) should take care of the BRF_OPT ROM issues I have been having with the libretro port -
https://github.com/libretro/fba-libretro/commit/37677034f730bd07b66b7ee2d6c229c8b2a87d47