Git Product home page Git Product logo

Comments (2)

jason0597 avatar jason0597 commented on June 25, 2024

this seems to be the final thing before release!

from ntrboot_flasher_nds.

jason0597 avatar jason0597 commented on June 25, 2024

Here's the theory for the code:

=================================================================
The basic principle is that we have this vector that will contain nothing but std::string in it

We will write our logMessage so that upon each call, the vector is expanded by one, and the string sent to this function (logMessage), is parsed
from const char* to std::string and then stored in our vector (which was expanded previously to fit this)

In the end of all this, we must write our entire vector to ntrboot.log, and we can achieve this by writing a new function called writeBufferLog()
which is called immediately after a flashcart_core function call from menu.cpp (either cart->initialize, InjectFIRM or DumpFlash)

logMessage is called, I don't even know how many times, and with each call, a new line is created as well

So, every time we call a flashcart_core function (3 times in total: cart->initialize, InjectFIRM and DumpFlash), we will
immediately follow it by writeBufferLog()

The hardest part of all this is figuring out how va_list works. I must learn how to grab all the unknown number of parameters,
and combine them together in one solid packaged std::string to give to std::vector.

This may or may not work. The trickiest parts are string formatting (%d, %s and all that) everything properly to our std::string
by using asprintf()

from ntrboot_flasher_nds.

Related Issues (10)

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.