gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > first release libcartreset 0.7

#107893 - Lick - Thu Nov 02, 2006 10:12 pm

I released the reset to gbaslot cartridge code as a library.

Here?s the project page.

- Lick
_________________
http://licklick.wordpress.com

#107911 - Darkflame - Fri Nov 03, 2006 1:41 am

Very nice work.
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.

#107968 - kevinc - Fri Nov 03, 2006 3:38 pm

But... but... is it a static module or a dynamic loaded module?!


/ ok I'll shut up :)
_________________
http://akzeac.blogspot.com

#107970 - 0xtob - Fri Nov 03, 2006 4:40 pm

Cool stuff, Lick! Quite easy to include too. Unfortunately, it's dependent on libfat, so I cannot add it to NitroTracker yet because I need file listing :-/

Anyways, it would be cool if you could also provide buildscripts for Linux/OSX. Here are my translated versions:

build.sh
Code:
mv Makefile.arm7 Makefile
make clean
rm -rf lib/
make
mkdir lib
cp ./build/libcartreset7.a ./lib/libcartreset7.a
mv Makefile Makefile.arm7

mv Makefile.arm9 Makefile
make clean
make
cp ./build/libcartreset9.a ./lib/libcartreset9.a
mv Makefile Makefile.arm9

rm -rf build/


clean.sh
Code:
mv Makefile.arm7 Makefile
make clean
mv Makefile Makefile.arm7

mv Makefile.arm9 Makefile
make clean
mv Makefile Makefile.arm9

rm -rf lib/

rm -rf build/


Remember to use Unix-style line breaks in the scripts.

Thank you!
Tob

#107979 - Izhido - Fri Nov 03, 2006 7:16 pm

Cool. Um... what does this library do? :)

#107990 - felix123 - Fri Nov 03, 2006 8:55 pm

It helps homebrew developers include a soft reset function in their software.

#107994 - simonjhall - Fri Nov 03, 2006 10:12 pm

0xtob wrote:
Anyways, it would be cool if you could also provide buildscripts for Linux/OSX. Here are my translated versions:

Hi, just a heads-up: if you run one of these scripts and it fails (to compile), next time you run it the last makefile used won't have been renamed back to the original name so it'll fail!

To make it easier you can do
Code:
make -f My_Makefile
to choose to use a certain makefile...

#108002 - Lick - Fri Nov 03, 2006 11:48 pm

0xtob wrote:
Cool stuff, Lick! Quite easy to include too. Unfortunately, it's dependent on libfat, so I cannot add it to NitroTracker yet because I need file listing :-/

Anyways, it would be cool if you could also provide buildscripts for Linux/OSX. Here are my translated versions:

build.sh
Code:
mv Makefile.arm7 Makefile
make clean
rm -rf lib/
make
mkdir lib
cp ./build/libcartreset7.a ./lib/libcartreset7.a
mv Makefile Makefile.arm7

mv Makefile.arm9 Makefile
make clean
make
cp ./build/libcartreset9.a ./lib/libcartreset9.a
mv Makefile Makefile.arm9

rm -rf build/


clean.sh
Code:
mv Makefile.arm7 Makefile
make clean
mv Makefile Makefile.arm7

mv Makefile.arm9 Makefile
make clean
mv Makefile Makefile.arm9

rm -rf lib/

rm -rf build/


Remember to use Unix-style line breaks in the scripts.

Thank you!
Tob

Thanks Tob-sama! You reminded me that I should code a libfat independent function. I'm going to do a new release soon with cartSetMenuMode(int DeviceType = DEVICE_TYPE_AUTODETECT), hehehhe. You still have to link to libfat though (increases filesize bout 30KB?), since it's going to be a pain if I have to move the current code outside of the lib. I mean, let's just keep it simple and waste that 30KB.
And I'll add the Linux/OSX scripts as well!

Izhido wrote:
Cool. Um... what does this library do? :)

By calling its functions, you can return to the Supercard bootmenu or M3 bootmenu or ... bootmenu.

simonjhall wrote:
To make it easier you can do
Code:
make -f My_Makefile
to choose to use a certain makefile...

This method failed me so I scripted the rename sequences. Weird enough, on my system it seems that when I call 'make' it's actually a stub that calls the real 'make' with default defined parameters. Blegh.

- Lick
_________________
http://licklick.wordpress.com

#108008 - Lick - Sat Nov 04, 2006 12:53 am

Sorry for double post, but the last one was pretty bloated.

I updated libcartreset for 0xtob to try out (read below). http://lick.huuf.net/cartreset/libcartreset_bin-0.71.zip. The only change is the addition of a devicetype parameter for cartSetMenuMode() and the #define DEVICE_TYPE_AUTO 0x00000000.
If this define, or zero is passed to the function, it will initialize libfat (fatInitDefault) and run the libfat-detection code. If it's non-zero (like DEVICE_TYPE_SCSD) then it will skip this whole procedure and go straight to the cartresetting code.
The problem with this is that you still have to link to -lfat and that might increase the filesize. Also, I'm not sure if libfat will collide with the fatlib you're using. I guess not, because if you pass the devicetype yourself, it will never initialize libfat.

Anyway, 0xtob, or someone else, please test this out and if it works, I'll make it official.

- Lick
_________________
http://licklick.wordpress.com

#108011 - Lick - Sat Nov 04, 2006 2:13 am

Here it is, the nolibfat version of libcartreset.

Works in a similar way as the normal version, but you need to pass the deviceType to cartSetMenuMode() yourself. [In the normal version that function did the detection internally using libfat..]
_________________
http://licklick.wordpress.com

#109814 - Sektor - Tue Nov 21, 2006 1:12 pm

libcartreset 0.72 is out now and is supposed to work on Supercard Lite.

Minor error in the libcartreset readme: "-lcartreset7.a -lfat -lnds7" , you don't add the .a extension in the makefile.

FlashbackDS is using 0.71. I didn't make a hotkey but you can return to menu by using the quit option.
_________________
GTAMP.com/DS

#109839 - Lick - Tue Nov 21, 2006 5:46 pm

Yup, I have posts in so many topics, forums.. I forgot about this one. At any rate, check out my blog (licklick.wordpress.com) for the latest releases of -mostly- everything. [i just noticed that i never posted about DSLiveWeather "Vesper" on my blog.. oops]

DSLiveWeather is updated too, but no major changes.
_________________
http://licklick.wordpress.com

#109843 - Izhido - Tue Nov 21, 2006 6:06 pm

Hmm... bet this is happening to many people here. Y'know? Maybe we could "stick" a new thread containing links to our blogs... this should make easier for people to find news about current projects, straight from their creators, without them having to dig deep into the forum posting just for updates...

... though, now that I think about that, it kind of defeats the purpose of a discussion forum... or maybe not?

Discuss. :D :D :D

- Izhido

#109847 - Lick - Tue Nov 21, 2006 6:31 pm

Well the news fetchers should at least check out http://planet.dev-scene.com.
_________________
http://licklick.wordpress.com