Code Monkey home page Code Monkey logo

Comments (6)

misson20000 avatar misson20000 commented on August 30, 2024

This is currently blocked on applet services. I may want to see if there is a way to register an existing process as an applet, or if I can launch processes through applet services and hide them from crash handling a different way.

from twili.

misson20000 avatar misson20000 commented on August 30, 2024

CreateSelfLibraryAppletCreatorForDevelop sounds promising, but it gives me error 0x7a880 on hardware (2.0.0 console). Might take some work to figure out if there's a way around that.

from twili.

misson20000 avatar misson20000 commented on August 30, 2024

If we're going to be having applet services launch our processes, there are a number of problems, for which to solve we will likely have to depend on Atmosphere-PM/LDR.

I don't see a way to get pm to not signal a crash event, unless we were willing to race NS, hoping we get to use pm:shell#ClearProcessNotificationFlag before NS receives the crash event. This seems like a bad ideaβ„’ to me and would likely be somewhat fragile. We'll have to either make Atmosphere-PM hide the crash event, or look into whether there's any way to get ns to not trigger a fatal error upon receiving a crash event. ns:dev sounds promising.

from twili.

misson20000 avatar misson20000 commented on August 30, 2024

I've gotten nx-hbmenu to work under Twili by using a combination of two processes. Turns out, applet services don't much care who calls OpenApplicationProxy. Because of this, we can use one process to open the application proxy, retrieve IDebugFunctions, and close the application proxy. Then, we can launch the main application (in this case, nx-hbmenu). The application will wait for the "acquire foreground" message. We can cause this message to be sent by using IDebugFunctions to OpenMainApplication, and then calling IApplicationAccessor#RequestForApplicationToGetForeground.

Problems:

  • qlaunch gets confused by there being an application running
  • exiting the application freezes up UI
  • I'm not really sure how OpenApplicationProxy actually works. Does it create a new IntegratedApplication object every time? Does the IApplicationAccessor returned by IDebugFunctions#OpenMainApplication access a different application object, or is it the same one every time shared by multiple processes opening the application proxy?
    • Because of this, I'm not sure when exactly I can RequestForApplicationToGetForeground and have it work

from twili.

misson20000 avatar misson20000 commented on August 30, 2024

Temporary solution, for 3.0.0+:

  • Override creport with a stub to notify Twili when a process crashes instead of causing a fatal error.
  • Override album with a stub ("shadowbeast")
    • Control Mode: The first instance of shadowbeast runs in control mode, where it receives messages from Twili that tell it to launch more shadowbeast instances whenever Twili receives an NRO to be run in applet mode.
    • Host Mode: Any instances of shadowbeast launched by the control instance will connect to Twili, query the size of the NRO, use svcMapPhysicalMemory to allocate a buffer, and then have Twili map in the NRO. Shadowbeast host mode combines the function of Twili's process creation and HBABIShim.

from twili.

misson20000 avatar misson20000 commented on August 30, 2024

Finally works πŸŽ‰

from twili.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.