Yes, I was using r16; oops! I rolled back my wiidev directory (from svn) a while ago and didn't realise I'd gone back to r16 from r17. Anyway, I've spent some time trying to debug/test the journal code in sqlite... but have made no progress at all in fixing the problem. My only suggestion remaining is you move the database creation code out of the app, and provide a 'pre maby DrTwox - Coding
I have devkitPPC r17 and svn libogc (updated yesterday) and your example code compiles fine (once gettimeofday is removed) and generates a non-corrupt database... I really don't know what the problem is. The last thing I can suggest is you instruct sqlite to create the journal file in memory, not on disk: /* Include this just after the call to sqlite3_open_v2 in db.c sqlite3_exec( db, "Pby DrTwox - Coding
(I could be very wrong about this; someone with more knowledge can correct me!) GX does have hardware accelerated lights (as you've found from those functions), but a shader in OpenGL can also manipulate geometry and individual pixels as well; which I believe GX can't do. Shaderby DrTwox - Coding
What version of devkitPPC are you using? I had to remove your gettimeofday() functions as it clashes with the existing function in devkitPRO/devkitPPC/powerpc-gekko/include/sys/time.h... otherwise the app compiled and ran fine; no corrupt database on a FAT32 formatted card. sqlite> .schema CREATE TABLE game ( id TEXT, version TEXT, region TEXT, title TEXT, synopsis TEXT, title_EN TEXby DrTwox - Coding
I think the problem may be in the journal file; if I run a simple loop to insert 1024 strings into a table, no problem. If I 'wrap' the inserts into a BEGIN/COMMIT transaction the database will corrupt. Try disable transactions in your db.c for now and see what happens. Will investigate more later... 83 /* Disabling transactions slows down db creation, but at least it works! *by DrTwox - Coding
I've looked at db.c in your code, and I can't see anything wrong at all; but I'm no sqlite expert :P WiiMP hasn't suppored database creation in some time - it's too slow for what I need it to do, so I wrote a PC app to handle the creation. I dug out some old test code I wrote way back when I did the port, and it has the same issue as you are having too; i.e. corrupt databy DrTwox - Coding
Check out the source for Dragon Media Player for code to play those three formats on the Wii. Reading the metadata information for Vorbis and FLAC is fairly simple as they both use the same tag format; read the specs here. The reference decoders also contain code to read the metadata for those formats. Id3 is less trivial as there are different versions (v1, v2, v2.2, v2.3 and 2.4) and IMO each oby DrTwox - Coding
I probably won't have time to look into this until the weekend, but you could have a look in the functions unixWrite and seekAndWrite and see what you can discover.by DrTwox - Coding
sqlite3_soft_heap_limit takes the bytes to use as the heap size; though it will use more than this if required to successfully execute a command; hence why it's called a 'soft limit'. If you want to force a strict upper memory limit look at the section called "Zero-malloc memory allocator" in the previous link, though you will have to compile sqlite3.c from source to enable it.by DrTwox - Coding
Have you printed the error anyway, too see what the sqlite error is?by DrTwox - Coding
I'm not familiar with the mallinfo function - I learn something new every day! Have you tried the same code on Linux to compare the memory usage? Perhaps this is more of a question for a sqlite3 mailing list; I simply did the port, and the internal workings of the library are a mystery to me :) Anyway, this part here... if(rc != SQLITE_OK) { /* This crash if I usby DrTwox - Coding
scognito, If you are using sqlite.c and not the library, you will need to add -DSQLITE_OS_UNIX and -DSQLITE_OS_LIBOGC to the CFLAGS in your Makefile. This will build sqlite3 with the changes I've made. In your DB_Open() function, the call to open the database should look something like this: s32 result; result = sqlite3_open_v2( "sd:/path/to/database.db", &db, SQLITE_OPEN_READOby DrTwox - Coding
Did you look at Tantric's libGUI code? It should have what you're seeking.by DrTwox - Coding
My millisecond timer looks like this, it seems to work okay for simple stuff #include < ogc/lwp_watchdog.h > extern u32 GFX_GetTime() { return ( ticks_to_millisecs(gettime()) ); } extern u32 GFX_GetElapsedTime(const u32 last) { return ( ticks_to_millisecs(gettime()) - last ); }by DrTwox - Coding
Have you looked at the source for the iPhone Wolf 3d port? John Carmack has released it here.by DrTwox - Homebrew Applications
Thanks for having a look at it. I've had a bit of a mess around with smb_devoptab.c, I'll see what I can do... unfortunately that's probably very little :Pby DrTwox - Coding
QuoteArikadoYou should really add this to the wiki (if its not on there already). Thanks for the tip. I put an entry on the Libraries page... I'm interested if anyone is actually using it (besides myself!)by DrTwox - Coding
I've updated the SQLite port in WiiMP SVN to version 3.6.11; now with full read/write support. Check the SQLite3 homepage for code examples if you want to use it. WiiMP @ Google Code EDIT: I've upload a pre-compiled library and some example code. Grab it here: Google Code downloadsby DrTwox - Coding
Now it finds one file and stops :P Here's the test app I'm using: (Forgive how messy it is - it is just a test after all!) #include < stdio.h > #include < stdlib.h > #include < unistd.h > #include < string.h > #include < gccore.h > #include < network.h > #include < errno.h > #include < wiiuse/wpad.h > #include < fat.h >by DrTwox - Coding
Awesome, thank you! Available in libogc SVN in the next few days?by DrTwox - Coding
Hi all. I have a function to recurse through a directory tree, processing each file found. It works on Linux, Windows and the Wii SD or USB devices... however, if trying to recurse a SMB share, it doesn't work. e.g. Using the follow directory tree as an example... directory1/ sub_directory1/ file1 file2 file3 sub_directory2/ file4by DrTwox - Coding
Okay, I figured as much... towlower is available in wctypes.h, and this seems to work for basic Latin characters. int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n) { while (n--) { wint_t c1 = towlower(*s1); wint_t c2 = towlower(*s2); wint_t diff = c1 - c2; if (diff != 0) { return diff; } if (!c1) { return 0; } ++s1; ++s2; } returnby DrTwox - Coding
I presume these two functions are not in devkitPPC/newlib as they don't appear to be in wchar.h. Is this a limitation of devkitPPC/newlib locale support or are they GNU only extensions, not standard? Edit: Also, to further prove my ignorance, in /devkitPRO/devkitPPC/powerpc-gekko/include/limits.h is #define MB_LEN_MAX 1 ... shouldn't that be larger? Obviously you could just useby DrTwox - Coding
QuoteTantricEdit exception.c from libogc and compile. Excellent! Thanks for the help.by DrTwox - Coding
I saw this screenshot over at the mplayer-ce site: MPlayer-ce crash At the bottom it says "Reload in 4 seconds"... how can I enable this feature?by DrTwox - Coding
Hi there! Unfortunately I am of no great programming skill, and I have my own project to work on, so I can't really help with that side of things... however, here are some links to get you started on this project: Game Development: Harder Than You Think The Art of Computer Game Design GameDev.net - General Game Design You will need more than a control scheme idea to attract a compby DrTwox - Homebrew General
Thanks for the help Arikado! However, I don't see any functional difference between what you've suggested (and previous posts) to what I'm doing... yet mine crashes instantly when the callback functions are triggered. I must be missing/overlooking something obvious, but I just can't see it!by DrTwox - Coding
D'oh... no, I didn't check the SVN repo! Feel free to nuke this post....by DrTwox - Coding
I get nothing but instant crashes too. Here's my code: controls.c static signed int shutdownType = -1; /* Not 0 as ogc/system.h uses that for SYS_RESTART */ static void WiiResetCB(void) { shutdownType = SYS_RESTART; } static void WiiPowerCB(void) { shutdownType = SYS_POWEROFF; } static void WiimotePowerCB(int chan) { shutdownType = SYS_POWEROFF; } extern vby DrTwox - Coding