RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Hope lr-fbneo support kof 97 practice mode(kof97pm.zip)

    Scheduled Pinned Locked Moved Ideas and Development
    emulatorshbmamekof hack romlr-fbneo
    42 Posts 4 Posters 8.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ninjaN
      ninja @barbudreadmon
      last edited by ninja

      @barbudreadmon Thanks for your help. Now I can run kof97pm on my RetroPie.

      But there are still some small problems. For example, I cannot see clearly the words on the screen when playing kof97pm.

      I guess it's because the support codes added to d_neogeo.cpp might not be complete. So I attached these codes below:

      // The King of Fighters '97 Practice Mode
      
      static struct BurnRomInfo kof97pmRomDesc[] = {
              { "232pm-p1.p1",   0x100000, 0x34ccabae, 1 | BRF_ESS | BRF_PRG }, //  0 68K code 
              { "232-p2.sp2",   0x400000, 0x158b23f6, 1 | BRF_ESS | BRF_PRG }, //   1
      
              { "232-s1.s1",   0x020000, 0x8514ecf5, 2 | BRF_GRA },          //  2 Text layer tiles
      
              { "232-c1.c1",   0x800000, 0x5f8bf0a1, 3 | BRF_GRA },           //  3 Sprite data
              { "232-c2.c2",   0x800000, 0xe4d45c81, 3 | BRF_GRA },           //  4 
              { "232-c3.c3",   0x800000, 0x581d6618, 3 | BRF_GRA },           //  5 
              { "232-c4.c4",   0x800000, 0x49bb1e68, 3 | BRF_GRA },           //  6 
              { "232-c5.c5",   0x400000, 0x34fc4e51, 3 | BRF_GRA },           //  7 
              { "232-c6.c6",   0x400000, 0x4ff4d47b, 3 | BRF_GRA },           //  8 
      
              { "232-m1.m1",   0x020000, 0x45348747, 4 | BRF_ESS | BRF_PRG }, //  9 Z80 code
      
              { "232-v1.v1",   0x400000, 0x22a2b5b5, 5 | BRF_SND },           // 10 Sound data
              { "232-v2.v2",   0x400000, 0x2304e744, 5 | BRF_SND },           // 11 
              { "232-v3.v3",   0x400000, 0x759eb954, 5 | BRF_SND },           // 12 
      };
      
      STDROMPICKEXT(kof97pm, kof97pm, neogeo)
      STD_ROM_FN(kof97pm)
      
      static void kof97pmCallback()
      {
              lans2004_sx_decode();
      }
      
      static INT32 kof97pmInit()
      {
              NeoCallbackActive->pInitialise = kof97pmCallback;
      
              return NeoInit();
      }
      
      struct BurnDriver BurnDrvkof97pm = {
              "kof97pm", "kof97", "neogeo", NULL, "1997",
              "The King of Fighters '97 (Practice Mode)\0", NULL, "hack", "Neo Geo MVS",
              NULL, NULL, NULL, NULL,
              BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_PREFIX_CARTRIDGE | HARDWARE_SNK_NEOGEO, GBF_VSFIGHT, FBF_KOF,
              NULL, kof97pmRomInfo, kof97pmRomName, NULL, NULL, NULL, NULL, neogeoInputInfo, neogeoDIPInfo,
              kof97pmInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
              0x1000, 304, 224, 4, 3
      };
      

      Did I miss anything important ?
      And what do these codes mean exactly?

      mituM B 2 Replies Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @ninja
        last edited by

        @ninja Are you running the game with fbneo directly or with lr-fbneo ?

        ninjaN 1 Reply Last reply Reply Quote 0
        • ninjaN
          ninja @mitu
          last edited by ninja

          @mitu lr-fbneo recompiled by myself
          words.jpg

          1 Reply Last reply Reply Quote 0
          • B
            barbudreadmon @ninja
            last edited by

            @ninja is there a reason for using a custom init ? it doesn't work if you call NeoInit directly instead of your custom kof97pmInit ? HBMAME is using standard init for that hack.

            FBNeo developer - github - forum

            ninjaN 1 Reply Last reply Reply Quote 0
            • ninjaN
              ninja @barbudreadmon
              last edited by

              @barbudreadmon
              Well, I just copied the codes for kof97pla from d_neogeo.cpp and modified them for my kof97pm.

              Acutally, I even don't understand what they mean.

              B 2 Replies Last reply Reply Quote 0
              • B
                barbudreadmon @ninja
                last edited by barbudreadmon

                @ninja said in Hope lr-fbneo support kof 97 practice mode(kof97pm.zip):

                Well, I just copied the codes for kof97pla from d_neogeo.cpp and modified them for my kof97pm.

                This code is meant to decode sx rom before loading it, it seems to be required for kof97pla (see init_kof97pla at the beginning of https://raw.githubusercontent.com/Robbbert/hbmame/master/src/hbmame/drivers/kof97.cpp), but it doesn't seem to be required for kof97pm (or any other kof97 hack for that matter), see this code around the end of hbmame's kof97.cpp file :

                ...
                HACK( 2003, kof97pla,  kof97,    neogeo_noslot, neogeo, neogeo_state,kof97pla, ROT0, "bootleg", "Kof'97 (Plus)(set 1)", MACHINE_SUPPORTS_SAVE )
                HACK( 2003, kof97plc,  kof97,    neogeo_noslot, neogeo, neogeo_state, neogeo,   ROT0, "ZKW", "Kof'97 Plus (Black Edition)", MACHINE_SUPPORTS_SAVE )
                HACK( 2006, kof97plus, kof97,    neogeo_noslot, neogeo, neogeo_state, neogeo,   ROT0, "bootleg", "Kof'97 (Plus 2006)", MACHINE_SUPPORTS_SAVE )
                HACK( 1997, kof97pm,   kof97,    neogeo_noslot, neogeo, neogeo_state, neogeo,   ROT0, "Kof1996", "Kof'97 (Practice Mode)", MACHINE_SUPPORTS_SAVE )
                ...
                

                The 7th member is either kof97pla (will trigger the call to the init_kof97pla function at boot) or neogeo (will call the standard neogeo init)

                FBNeo developer - github - forum

                1 Reply Last reply Reply Quote 0
                • B
                  barbudreadmon @ninja
                  last edited by

                  @ninja also, if you look at this line in your code :

                  	{ "232-s1.s1",   0x020000, 0x8514ecf5, 2 | BRF_GRA },          //  2 Text layer tiles
                  

                  You can see it's about the text layer in the comment, the file is named 232-s1.s1, the .s1 extension means it's one of the sx files you are decoding.

                  FBNeo developer - github - forum

                  ninjaN 1 Reply Last reply Reply Quote 0
                  • ninjaN
                    ninja @barbudreadmon
                    last edited by

                    @barbudreadmon But I cannot find this file in kof97pm.zip, there is only 232pm.p1 in this zip file.

                    B 1 Reply Last reply Reply Quote 0
                    • B
                      barbudreadmon @ninja
                      last edited by barbudreadmon

                      @ninja that's probably because you are using split romsets, so 232pm.p1 is loaded from kof97pm.zip and every other files are loaded from parent kof97.zip

                      FBNeo developer - github - forum

                      ninjaN 1 Reply Last reply Reply Quote 0
                      • ninjaN
                        ninja @barbudreadmon
                        last edited by ninja

                        @barbudreadmon Yes, you are right. I am using split romsets. There is a 232.s1 file in the kof97.zip.

                        So is this file not suitable for playing kof97pm ?

                        ninjaN 1 Reply Last reply Reply Quote 0
                        • ninjaN
                          ninja @ninja
                          last edited by

                          @ninja
                          I modified the d_neogeo.cpp again, and now the code for kof97pm is shown below:

                          static struct BurnRomInfo kof97pmRomDesc[] = {
                                  { "232pm-p1.p1",   0x100000, 0x34ccabae, 1 | BRF_ESS | BRF_PRG }, //  0 68K code 
                                  { "232-p2.sp2",   0x400000, 0x158b23f6, 1 | BRF_ESS | BRF_PRG }, //   1
                          
                                  { "232-s1.s1",   0x020000, 0x8514ecf5, 2 | BRF_GRA },          //  2 Text layer tiles
                          
                                  { "232-c1.c1",   0x800000, 0x5f8bf0a1, 3 | BRF_GRA },           //  3 Sprite data
                                  { "232-c2.c2",   0x800000, 0xe4d45c81, 3 | BRF_GRA },           //  4 
                                  { "232-c3.c3",   0x800000, 0x581d6618, 3 | BRF_GRA },           //  5 
                                  { "232-c4.c4",   0x800000, 0x49bb1e68, 3 | BRF_GRA },           //  6 
                                  { "232-c5.c5",   0x400000, 0x34fc4e51, 3 | BRF_GRA },           //  7 
                                  { "232-c6.c6",   0x400000, 0x4ff4d47b, 3 | BRF_GRA },           //  8 
                          
                                  { "232-m1.m1",   0x020000, 0x45348747, 4 | BRF_ESS | BRF_PRG }, //  9 Z80 code
                          
                                  { "232-v1.v1",   0x400000, 0x22a2b5b5, 5 | BRF_SND },           // 10 Sound data
                                  { "232-v2.v2",   0x400000, 0x2304e744, 5 | BRF_SND },           // 11 
                                  { "232-v3.v3",   0x400000, 0x759eb954, 5 | BRF_SND },           // 12 
                          };
                          
                          STDROMPICKEXT(kof97pm, kof97pm, neogeo)
                          STD_ROM_FN(kof97pm)
                          
                          struct BurnDriver BurnDrvKof97pm = {
                                  "kof97pm", "kof97", "neogeo", NULL, "1997",
                                  "The King of Fighters '97 (Practice Mode)\0", NULL, "hack", "Neo Geo MVS",
                                  NULL, NULL, NULL, NULL,
                                  BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_PREFIX_CARTRIDGE | HARDWARE_SNK_NEOGEO, GBF_VSFIGHT, FBF_KOF,
                                  NULL, kof97pmRomInfo, kof97pmRomName, NULL, NULL, NULL, NULL, neogeoInputInfo, neogeoDIPInfo,
                                  NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
                                  0x1000, 304, 224, 4, 3
                          };
                          
                          

                          Then I re-compiled the fbneo_libretro.so, and now I can play kof97pm with RetroPie on my Raspberry Pi 3.

                          B 1 Reply Last reply Reply Quote 1
                          • B
                            barbudreadmon @ninja
                            last edited by

                            @ninja good work :)

                            Do you want me to commit it or do you want to send the code to https://github.com/finalburnneo/FBNeo yourself ? If you intend to send a PR yourself, please replace those spaces by single tabs for indentation.

                            FBNeo developer - github - forum

                            ninjaN 1 Reply Last reply Reply Quote 0
                            • ninjaN
                              ninja @barbudreadmon
                              last edited by

                              @barbudreadmon
                              I have already forked a branch(patch-1) and added my code to d_neogeo.cpp.

                              And I just replaced spaces by single tabs for indentation, according to your requirement.

                              B 1 Reply Last reply Reply Quote 0
                              • B
                                barbudreadmon @ninja
                                last edited by

                                @ninja I guess https://github.com/alifare/FBNeo is your fork of the project. Well, you didn't create any PR to get it merged into official fbneo, and it's unusable in that state anyway since you added the 838 additional commits from the libretro fork (we don't want those in the https://github.com/finalburnneo/FBNeo repo).
                                Do you prefer i handle the addition of your code myself ?

                                FBNeo developer - github - forum

                                ninjaN 2 Replies Last reply Reply Quote 0
                                • ninjaN
                                  ninja @barbudreadmon
                                  last edited by

                                  @barbudreadmon said in Hope lr-fbneo support kof 97 practice mode(kof97pm.zip):

                                  handle

                                  Can you tell me how to get it merged into official fbneo ?

                                  I know it's more convenient and time-saving to let you do it youself. But this is a good opportunity for me to learn new skills, and I am a good student : )

                                  1 Reply Last reply Reply Quote 0
                                  • ninjaN
                                    ninja @barbudreadmon
                                    last edited by

                                    @barbudreadmon
                                    I just "submit review" on github.com, but I am not sure if I did it right.

                                    B 1 Reply Last reply Reply Quote 0
                                    • B
                                      barbudreadmon @ninja
                                      last edited by

                                      @ninja you didn't, as i said you must not submit the 838 additional commits from the fork, only the changes to d_neogeo.cpp

                                      FBNeo developer - github - forum

                                      ninjaN 1 Reply Last reply Reply Quote 0
                                      • ninjaN
                                        ninja @barbudreadmon
                                        last edited by ninja

                                        @barbudreadmon So I should have forked only d_neogeo.cpp ?

                                        B 1 Reply Last reply Reply Quote 0
                                        • B
                                          barbudreadmon @ninja
                                          last edited by

                                          @ninja yes

                                          FBNeo developer - github - forum

                                          ninjaN 1 Reply Last reply Reply Quote 0
                                          • ninjaN
                                            ninja @barbudreadmon
                                            last edited by

                                            @barbudreadmon Can I delete other files and commits except for d_neogeo.cpp in my fork?
                                            Or do I have to create a new fork?

                                            B 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.