Monday, August 13, 2007

"update homebrew via WiFi ..."

So, i finally successfully included Ben Campbell's "slurping" as part of my NDS WiFi attempt.
I guess it will save me hours in future development as i can now simply retrieve an update of the program as part of running the program itself.

Ideally, i'd have also include a reset of the software or at least a reset of the cartridge so that you're back at the .nds selection menu after the upgrade is complete, but this didn't worked as expected.

  • "Exec.cpp" from Bjoern Giesler's DSFTP works fine and allows me to transfer execution to another program. However, despite all my attempts, it seems that the started program cannot cannot access WiFi hardware when started in that way. This may not be a problem for a one-shot update of a non-WiFi related tool (like SEDS atm), but it certainly kills the idea of a debugging session free of DS power-cycling. (edit: maybe my code before exec() is missing Wifi_DisconnectAP(); ?)

  • libcartreset by Lick required a bit of source-tweaking (it assumed booleans in C :P) to compile, but it simply didn't work. Not the way i used it, at least, and i failed to find a decent tutorial on how to use it. All it does is halting the program, period. It may break any attempt to use the FAT library (or anything else that is cartridge-related) between the "cartSetMenuMode" and the "passmeloopEnter" calls, too.

  • Rebootlib by Lick is clearly something more complex. It supports more hardware, makes use of a DLDI-compliant "bootstrapping stub" that is patched at reboot-time against the running hardware. It is clearly designed to work with a more recent release of the DevkitPro than the one i have and required a couple of fixes on the registers name so that it almost compiles. Yet it expects some external _dldi_io symbol -- i guess this one would come from my own nds if it were DLDI-compliant -- which i cannot provide unfortunately.
All in one, it simply looks like it's time for me to drop my "working" release of devkitpro, upgrade to the latest one, find out how DLDI patches work and pray for my software to work flawlessly with that updated libfat ... Then screw the new devkitpro so that i can still use the "non-jumpy drawing" patch of padrinator

edit: installation of devkitpro r20 in progress ...
edit: good news #1 just found out the following comment in touch.c from the latest libnds:
$Log: touch.c,v $
Revision 1.19 2006/12/16 22:29:37 wntrmute
Incorporate Padrinator's touch code

edit: good news #2, in case everything else fails, there is "reboot.cpp" to be studied in tftpds-2.4beta

3 comments:

  1. aie. mon desmume se bloque sur les fichiers produits :P
    une "instruction non def" à une adresse bien curieuse (pas multiple de 4 pour du code RISC ?)

    ReplyDelete
  2. De mieux en mieux. J'ajoute un petit "throw EmulatorException(...)" et impossible de l'intercepter:

    terminate called after throwing an instance of 'EmulatorException'
    Abort

    On dirait bien que ma condition "next_instruction==0" est rencontrée avant même la première ligne de main() :P

    ReplyDelete
  3. comme d'autres, j'ai eu droit à mon "undefined reference to `cardPolledTransfer'" dans le driver NJSD. D'autres symboles (venant du fichier "card.o" de libnds) sont également manquant dans les autres drivers pour SLOT-1.

    Allez comprendre. ils sont bien dans libnds9.a, et demandés par libfat.a, mais impossible de faire comprendre au linker de les mettre ensemble. Bref, j'ai fini par rajouter à la main "card.o" (le fichier avec les fonctions génériques) dans la bibliothèque libfat.a :P

    ReplyDelete

this is the right place for quickstuff