1. xonn

    xonn GBAtemp Regular
    Member

    Joined:
    Jan 11, 2020
    Messages:
    133
    Country:
    Spain
    I posted this question some time ago, but it was unanswered then. Let's try again :)
    In TWLMenu++ there is a soft reset function that is always "listening" and resets the console when L+R+DOWN+B buttons are pressed some seconds.
    Would be possible to create any type of function that will be always ready to execute, or the only options is limited to reset?
    Thanks!
     
  2. Robz8

    OP Robz8 Coolest of TWL
    Developer

    Joined:
    Oct 1, 2010
    Messages:
    14,104
    Country:
    United States
    Depends on what you want implemented.
    There's already RAM dumping, via L+R+DOWN+A.
     
    banjo2 and alexander1970 like this.
  3. xonn

    xonn GBAtemp Regular
    Member

    Joined:
    Jan 11, 2020
    Messages:
    133
    Country:
    Spain
    I was thinking about calling lcdSwap() function.
    Would be the perfect solution to enjoy every NDS titles in GBMacros (or broken DS consoles with only one screen available).
     
    banjo2 likes this.
  4. Robz8

    OP Robz8 Coolest of TWL
    Developer

    Joined:
    Oct 1, 2010
    Messages:
    14,104
    Country:
    United States
    Don't think that's possible, since the games themselves can swap screens depending on what happens.
     
    banjo2 and alexander1970 like this.
  5. xonn

    xonn GBAtemp Regular
    Member

    Joined:
    Jan 11, 2020
    Messages:
    133
    Country:
    Spain
    In Mario Kart DS, for example, the bit is changed when a race starts, but after it remains unchanged. In a emulator, you can force the swap screen and complete the race.
    It seems that the games change this configuration just in concrete moments. Maybe some titles are constantly doing it, I don't know. Do you think it could be a "feature" to be included in next release? :D
    And, as always, thanks for your time
     
    banjo2 likes this.
  6. Robz8

    OP Robz8 Coolest of TWL
    Developer

    Joined:
    Oct 1, 2010
    Messages:
    14,104
    Country:
    United States
    How to implement it would have to be per-game, I think.
     
    Last edited by Robz8, Jan 26, 2021
    alexander1970 and banjo2 like this.
  7. xonn

    xonn GBAtemp Regular
    Member

    Joined:
    Jan 11, 2020
    Messages:
    133
    Country:
    Spain
    Maybe we're thinking in different things. I suggest a key combination (for example Select+Start) that if it's pressed, TWM calls to ndslib's lcdSwap().
    This feature will be always available and used at convenience.
     
    banjo2 likes this.
  8. Robz8

    OP Robz8 Coolest of TWL
    Developer

    Joined:
    Oct 1, 2010
    Messages:
    14,104
    Country:
    United States
    Not sure if that's possible. We'd need something that runs in the background, which checks for the top/bottom switch flag in arm9, and the screens would switch or not switch, depending on if the flag is set.
    For that to work, the key combo would have to be implemented on arm9 side, and for that, we'd have to hook into arm9's vBlank IRQ like we're doing with arm7 for the key combos to work.
    Unfortunately, unless there's enough requests, I don't feel like implementing it. :P
     
    alexander1970 and banjo2 like this.
  9. xonn

    xonn GBAtemp Regular
    Member

    Joined:
    Jan 11, 2020
    Messages:
    133
    Country:
    Spain
    Of course, this only would be implemented if it's really interesting. But I don't know why the program should check the flag, because lcdSwap() just inverts the value, regardless of its previous state (the function has no arguments due to this).
     
    Last edited by xonn, Jan 26, 2021
    banjo2 likes this.
  10. Pk11

    Pk11 A cat girl with a DSi
    Member

    Joined:
    Jun 26, 2019
    Messages:
    230
    Country:
    United States
    I took a look since it did seem easy, the problem seems to be that POWCNT1 is only accessible from the ARM9, from looking at GBAtek it doesn't look like there's any way for the ARM7 to swap the screens directly (https://web.archive.org/web/20210108175702/http://problemkaputt.de/gbatek.htm#dspowercontrol)
     
    alexander1970, banjo2 and Robz8 like this.
  11. xonn

    xonn GBAtemp Regular
    Member

    Joined:
    Jan 11, 2020
    Messages:
    133
    Country:
    Spain
    Just for learning something new, if swap function can be only called by ARM9 processor, when ARM7 detects the key combination, the next step should be send some type of "notification" to ARM9?
    Thanks!
     
    Robz8, alexander1970 and banjo2 like this.
  12. wavemotion

    wavemotion GBAtemp Regular
    Member

    Joined:
    Nov 23, 2020
    Messages:
    167
    Country:
    United States
    So I have 4 DSx consoles... three of them run TWL++ and that's all working great.

    My 2DS, however, just runs an R4i flashcart and the SD card has 3DS game updates and such... I don't want to mess with the SD card too much and the R4i with stock software is running great (all NDS games play flawlessly and have for years). I don't want to mess with the mojo too much here... but one thing that bugs me is that when I directly launch the Atari Emulators (StellaDS, A5200DS and A7800DS) they run in native DS mode and not DSi (2x faster CPU mode). Is there a way to force them to run at the faster rate? Short of installing TWL on the Flashcart, is there some easy launcher NDS file I can use to force the launch of those? Again, I'm not really wanting to shake up the workings of this particular system as I mainly use it to play a handful of 3DS games (Zelda, Pokemons, etc).
     
  13. Pk11

    Pk11 A cat girl with a DSi
    Member

    Joined:
    Jun 26, 2019
    Messages:
    230
    Country:
    United States
    Yeah, normally you can use FIFO to talk between the processors, but since nds-bootstrap needs to run alongside retail games I'm not sure that's possible, looking at the current code it doesn't seem to be using FIFO at all in the cardengine.

    NTR_Launcher lets you boot DS cards using the DSi clock speed (though I'm not 100% sure if that works for flashcards, but I think it would) so assuming it works, that'd probably be the simplest way to do it. There's no way to do it without some kind of homebrew installed to the 3DS since flashcards are launched in DS mode without the ability to change that normally.
     
  14. banjo2

    banjo2 gamer
    Member

    Joined:
    May 31, 2016
    Messages:
    1,858
    Country:
    United States
    Would something like that be possible on DSi?
     
    alexander1970 likes this.
  15. jeffyTheHomebrewer

    jeffyTheHomebrewer Neato Burrito!
    Member

    Joined:
    Aug 24, 2018
    Messages:
    601
    Country:
    United States
    been spendin' most their lives livin' in the DSi noob paradise
     
    alexander1970 likes this.
  16. Pk11

    Pk11 A cat girl with a DSi
    Member

    Joined:
    Jun 26, 2019
    Messages:
    230
    Country:
    United States
    NTR Launcher works on DSi too, the zip download is for hiyaCFW, and you can also just boot the .app file from TWiLight or Unlaunch.
     
    alexander1970, Robz8 and banjo2 like this.
  17. banjo2

    banjo2 gamer
    Member

    Joined:
    May 31, 2016
    Messages:
    1,858
    Country:
    United States
    Oh, I should've read more carefully. Thank you! :yaynds:
     
    alexander1970, Robz8 and Pk11 like this.
  18. xonn

    xonn GBAtemp Regular
    Member

    Joined:
    Jan 11, 2020
    Messages:
    133
    Country:
    Spain
    I have downloaded the TWLM++ source fron github and I'm trying to implement the idea, but first it's necessary to locate where is the code of soft reset in order to understand how it works. Any help is welcome :)
     
    banjo2 likes this.
  19. Robz8

    OP Robz8 Coolest of TWL
    Developer

    Joined:
    Oct 1, 2010
    Messages:
    14,104
    Country:
    United States
    You need to check the nds-bootstrap source code, as that runs the DS games from the SD card.
    The button combo checks are in "retail/cardengine/arm7/source/cardengine.c".
     
    alexander1970 and banjo2 like this.
  20. xonn

    xonn GBAtemp Regular
    Member

    Joined:
    Jan 11, 2020
    Messages:
    133
    Country:
    Spain
    Thanks @Robz8, it makes sense... I was searching in the wrong place :)
     
    alexander1970 and banjo2 like this.
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - questions, PARADISE, DS(i)