spacemeowx2 / ldn_mitm

Play local wireless supported games online
GNU General Public License v2.0
692 stars 98 forks source link

Update for AMS 0.19.0 #89

Closed SteveCookTU closed 3 years ago

SteveCookTU commented 3 years ago

With the latest system update, much had to be written to introduce the TIPC protocol. As stated by SciresM, Homebrew which uses atmosphere extensions (including the mitm API) will need to be re-compiled in order to function on 0.19.0.

kvn1351 commented 3 years ago

Yeah, please give this some love!

RQV14 commented 3 years ago

Got error when i update my firmware to 12 and launch atmosphere and the error is the folder for idn_mitm which is 4200000000000010

SteveCookTU commented 3 years ago

Got error when i update my firmware to 12 and launch atmosphere and the error is the folder for idn_mitm which is 4200000000000010

It is expected until the sysmodule is updated for the current version of AMS and firmware 12.0.0. We just have to wait till then.

Skalke commented 3 years ago

try to build with latest Atmosphere-libs, maybe it will work fine

ezpccomputer commented 3 years ago

try to build with latest Atmosphere-libs, maybe it will work fine

can u help to do that........ i dont understand about computer language

spacemeowx2 commented 3 years ago

You can see https://github.com/spacemeowx2/ldn_mitm/actions is broken for a while. I think it needs toolchain upgraded.

ezpccomputer commented 3 years ago

thanks for work.............

Skalke commented 3 years ago

Maybe HID updated in new firmware, SciresM wrote image

/github/workspace/ldnmitm_config/source/main.cpp: In function 'void die(const char*)':
/github/workspace/ldnmitm_config/source/main.cpp:30:9: error: 'hidScanInput' was not declared in this scope
   30 |         hidScanInput();
      |         ^~~~~~~~~~~~
/github/workspace/ldnmitm_config/source/main.cpp:31:33: error: 'CONTROLLER_P1_AUTO' was not declared in this scope
   31 |         u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
      |                                 ^~~~~~~~~~~~~~~~~~
/github/workspace/ldnmitm_config/source/main.cpp:31:21: error: 'hidKeysDown' was not declared in this scope
   31 |         u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
      |                     ^~~~~~~~~~~
/github/workspace/ldnmitm_config/source/main.cpp: In function 'int main(int, char**)':
/github/workspace/ldnmitm_config/source/main.cpp:138:9: error: 'hidScanInput' was not declared in this scope
  138 |         hidScanInput();
      |         ^~~~~~~~~~~~
fatal: ref HEAD is not a symbolic ref
/github/workspace/ldnmitm_config/source/main.cpp:139:33: error: 'CONTROLLER_P1_AUTO' was not declared in this scope
  139 |         u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
      |                                 ^~~~~~~~~~~~~~~~~~
/github/workspace/ldnmitm_config/source/main.cpp:139:21: error: 'hidKeysDown' was not declared in this scope
  139 |         u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
      |                     ^~~~~~~~~~~
/github/workspace/ldnmitm_config/source/main.cpp:141:21: error: 'KEY_B' was not declared in this scope
  141 |         if (kDown & KEY_B) {
      |                     ^~~~~
/github/workspace/ldnmitm_config/source/main.cpp:145:21: error: 'KEY_LSTICK' was not declared in this scope
  145 |         if (kDown & KEY_LSTICK) {
      |                     ^~~~~~~~~~
/github/workspace/ldnmitm_config/source/main.cpp:152:21: error: 'KEY_X' was not declared in this scope
  152 |         if (kDown & KEY_X) {
      |                     ^~~~~
/github/workspace/ldnmitm_config/source/main.cpp:157:21: error: 'KEY_Y' was not declared in this scope
  157 |         if (kDown & KEY_Y) {
      |                     ^~~~~
SteveCookTU commented 3 years ago

The old API for HID was deprecated in libnx version 4.0.0 as of December of 2020. By the looks of it, all old API calls were completely removed.

Skalke commented 3 years ago

so maybe @spacemeowx2 will u think about #88 ?

spacemeowx2 commented 3 years ago

I don't have much time doing this. PRs are welcome

SteveCookTU commented 3 years ago

I don't have much time doing this. PRs are welcome

Trying to update on my end but the use of the interface autogen is erroring out everywhere. Once I get this figured out I should be able to send a PR.

SteveCookTU commented 3 years ago

So close yet so far. I refactored the autogen and editted some other things. Currently sitting at the creation of the service. It fails to assert when initializing the "out" class for the shared pointer of type ICommunicationInterface and ILdnConfig. I'm pretty sure something changed in atmosphere but I can't follow the commit trail for this one specific thing.

sf::MakeShared is also called in ldnmitm_service.cpp but there is no definition for it anywhere that I can find in Atmosphere

berichan commented 3 years ago

sf::MakeShared is also called in ldnmitm_service.cpp but there is no definition for it anywhere that I can find in Atmosphere

Unsure about your first issues, but libstrat was updated to a more accurate sf allocation impl so what you're probably looking for has moved to SfObjectFactory::CreateSharedEmplaced. XorTroll inlines MakeShared to the new lib call(s) (I haven't read the whole thing) in uLaunch but possibly this commit/function is useful to you: https://github.com/XorTroll/uLaunch/commit/2cdb53e92290394f7a22ee65fbf74a378ce991d9#diff-bbae46615ba6b57ceaafa85a00e1375350a6110f7c3645282915a81a527b015dR48

SteveCookTU commented 3 years ago

Thank you this is perfect. The other issue was related, and had to use sf::SharedPointer where the original was using std::shared_ptr. If it's not obvious I'm new to the homebrew development but wanted to lend a hand.

SteveCookTU commented 3 years ago

Got it to build with all of the atmosphere changes since the past release. Upon opening a game (testing with Pokemon Shield), it crashes with a Userland ARM data abort (code 2168-0002). Attempting to debug

SteveCookTU commented 3 years ago

Submitted PR #90

Diliz commented 3 years ago

Thanks for the work @SteveCookTU 👍

mattliu62 commented 3 years ago

@SteveCookTU Legend