I am trying to compile the NDS_loader sources. After the usual changes, the code compiles, but refuses to run.
I downloaded the default_arm7_src-0.5.12 package and added the nds_loader_arm7.c to it. I call that function in the main.c idle loop.
I ran make on it and transferred the 2 default files to the libnds folder.
I use the load.bin from the original package. As the original NDS_loader.nds program is running fine, I assume that bin is fine as well.
I can follow the execution of the arm 9 code till the last instructions were it reaches the swi_softreset().
At that moment, the arm7 should notice the condition to start the code at VRAM_C 0x0600:0000 and should execute a swi_softreset() as well.
If I run the program on no$gba, it says that it jumped to some empty memory in VRAM.
I haven't found a way to debug that far. It looks like something seriously changed in the latest libraries causing the loader not to run anymore. Mayby the source that came with the nds_loader.nds isn't consistent with the nds file itself.
Debugging is extremly fustrating. If I try to run the code on the latest desmume with the biosses enabled and the swi calls executed by the bios, I don't see the adress at 0x027F:FE34 changing to 0x0600:0000. If I disable the biosses, I see the adress changing, but things aren't running. The original nds isn't running either that way. If I try no$gba, I get the jump to empty vram warning. I get it with the original ndsloader as well.
Does anyone have a clue what I am missing here?
PS. I changed parts of the fat_browse code as well. It was acting very weired with the original code. (Altough it compiled fine.)
NDS_loader
Re: NDS_loader
Have an identical issue - trying to modify the bootstrap loader from HBMenu to customize it for a DSTT clone card, and the generated loader stalls.
I'm using source from fincs' blog on drunkencoders, and he has a pre-compiled version in there. Using the pre-compiled version binary, all is well. Trying to compile from source (which is almost identical to the HBMenu source), flops.
Did you make any headway with this? My next step is to downgrade devkitarm, but I've been hedging thinking it's my error.
~trini
I'm using source from fincs' blog on drunkencoders, and he has a pre-compiled version in there. Using the pre-compiled version binary, all is well. Trying to compile from source (which is almost identical to the HBMenu source), flops.
Did you make any headway with this? My next step is to downgrade devkitarm, but I've been hedging thinking it's my error.
~trini
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: NDS_loader
Actually you don't have an identical issue, this topic is asking about code which I'm not sure was ever released publicly. The old NDS_Loader code doesn't work with recent toolchains.
There's a bootstrap loader for DSTT cards already included with hbmenu, doesn't that work?
hbmenu was also recently updated for a minor issue with devkitARM r31, if you need to compile then grab it from svn and do a clean build.
There's a bootstrap loader for DSTT cards already included with hbmenu, doesn't that work?
hbmenu was also recently updated for a minor issue with devkitARM r31, if you need to compile then grab it from svn and do a clean build.
Re: NDS_loader
its in svn, but not in the latest version.WinterMute wrote:There's a bootstrap loader for DSTT cards already included with hbmenu, doesn't that work?
also not sure if that works with DSTT clones, but its worth a shot.
Re: NDS_loader
My bad for the OT post - i'll open another thread if i can't figure it out in a few days.
The card is pretty crappy, but *i think* it's the most commonly available clone card marketed, and it's dirt cheap ($5.00) - figured it was worthwhile to get a clean loader. I've dumped my code on filetrip (dont have anywhere else to host it). It's not really in a 'release' state, but i can probably clean it up over the weekend if you guys think it's worthwhile including in the hbmenu distro.
~peace
The bootstrap loader is for 'R4i-sdhc' cards - although they're marketed as R4, they're DSTT clones (was the only thing i could find locally :S). They have some stupid hardware protection on the cards (watermark checking at 512 byte sectors, *possibly* algorithmic hashing of the first half word of each sector in the boot binary). fincs figured out an injection method to get the HBMenu bootstrap code into the dirty nds (vendor supplied R4.dat), I modified it to generate a totally clean (i.e. no offending code) binary.WinterMute wrote:There's a bootstrap loader for DSTT cards already included with hbmenu, doesn't that work?
Problem wasn't with HBMenu itself (although I admittedly didn't try to compile it on r31), since I was only trying to generate a clean bootstub loader.WinterMute wrote:hbmenu was also recently updated for a minor issue with devkitARM r31, if you need to compile then grab it from svn and do a clean build.
The card is pretty crappy, but *i think* it's the most commonly available clone card marketed, and it's dirt cheap ($5.00) - figured it was worthwhile to get a clean loader. I've dumped my code on filetrip (dont have anywhere else to host it). It's not really in a 'release' state, but i can probably clean it up over the weekend if you guys think it's worthwhile including in the hbmenu distro.
~peace
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: NDS_loader
You sure you're not confusing it with the original R4? Cheapest I can see the R4i sdhc for is around $12.
A clean loader for the card would definitely be worth adding to the hbmenu distro.
A clean loader for the card would definitely be worth adding to the hbmenu distro.
Re: NDS_loader
Card is the red-box v1.4 r4isdhc. I got it when i picked up my DSiLL, store tacked equivalent of $5.00 onto the bill - they probably had margin on the DS though, so maybe it retails alone for more.
Anyway, as promised attached is the source - I've isolated it in a separate directory so you guys can review it easier, just need to drop it into the hbmenu/BootLoader directory. Only replaces the Makefile, adding the R4.DAT build and clean targets.
~peace
Trini
Anyway, as promised attached is the source - I've isolated it in a separate directory so you guys can review it easier, just need to drop it into the hbmenu/BootLoader directory. Only replaces the Makefile, adding the R4.DAT build and clean targets.
~peace
Trini
- Attachments
-
- r4i-bootstrap-hbmenu.7z
- Bootstrap source for HBMenu for R4i-sdhc DSTT clone cards
- (10.48 KiB) Downloaded 542 times
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests