#56956 - Didou - Wed Oct 12, 2005 4:49 pm
Hi,
It seems that there are a serious compatibility between the NDSlib and the libnds. I updgraded from devkitpro R12 to R16, then now ReboNDS doesn't behave at all as before (even after I did modifications to make it compil-able).
Amongst others,
* sounds length has to be provided in bytes instead of u32,
* touchpad seems to behave strangely (need to "click" twice in some cases),
* emulators do not run anymore the code (Ideas, Dualis) that ran before,
Is there a kind of check-list of what to do and not too do to port from the old NDSlib to the new libnds ?
It seems that interrupts init have changed. May be its the reason why the emulators do not work anymore... In particular, Ideas remains frozen on swiWaitForVblank.
Which emulator is now usable to test when coding with the R16 ? Should I remain in R12 ?
-- Didou
#57031 - Normmatt - Thu Oct 13, 2005 4:08 am
ive had that same problem with the games not running in any emulator using devkitarm r16a so i reverted back to r15 which works fine
#57676 - Didou - Mon Oct 17, 2005 7:17 pm
Hi,
Normmatt wrote: |
ive had that same problem with the games not running in any emulator using devkitarm r16a so i reverted back to r15 which works fine |
I even tried to use the R15. It doesn't suck as with the R16+libnds for the touchpad ... but I lose the sound !!!!
WHICH version is to be used ??? It's really amazing ! Everything was perfect on the R12 !!!
Do I need to change some compil options ?
-- Didou
#57746 - wintermute - Tue Oct 18, 2005 5:05 am
Normmatt wrote: |
ive had that same problem with the games not running in any emulator using devkitarm r16a so i reverted back to r15 which works fine |
Using an emulator as a yardstick for the compiler isn't a good idea. IdeaS appears to have problems with the bios functions for some reason. Dualis doesn't currently emulate arm7.
Didou wrote: |
I even tried to use the R15. It doesn't suck as with the R16+libnds for the touchpad ... but I lose the sound !!!!
WHICH version is to be used ??? It's really amazing ! Everything was perfect on the R12 !!!
Do I need to change some compil options ?
-- Didou |
r12 was *far* from perfect, there were a number of fairly serious problems in the linkscripts and crt0 setup. Later versions set up the mpu and cache properly which will obviously cause you problems if you don't take the cache into consideration when using DMA or using shared memory to communicate with the ARM7 ( the standard IPC struct is placed in uncached memory which helps)
Touchpad reading is still problematic, one of the reasons for this is that some people insist on keeping the protective layer of plastic on the touchscreen.
#57756 - Mollusk - Tue Oct 18, 2005 7:32 am
Wintermute, while we're at it
Quote: |
the standard IPC struct is placed in uncached memory which helps |
Deku, for his mod player, places his arm9-arm7 commands right after the IPC, so that it's placed in the uncached memory, I guess... Now the question is, how much stuff can I place there, after the IPC ? (I'd like to add some new arm9-arm7 communication stuf...)
_________________
PAlib official forum : http://www.palib.info
PAlib official tutorials: http://www.palib.info/wiki
Updates, help, code examples, tutorials, etc...
#57757 - wintermute - Tue Oct 18, 2005 7:48 am
please don't.
Work is being done on implementing proper inter processor communication. Eventually the IPC struct will be removed, shared memory is a particularly poor way of implementing any form of "communication".
#57758 - Mollusk - Tue Oct 18, 2005 7:48 am
ok, then what would be the best and proper way ?
_________________
PAlib official forum : http://www.palib.info
PAlib official tutorials: http://www.palib.info/wiki
Updates, help, code examples, tutorials, etc...
#57774 - Didou - Tue Oct 18, 2005 12:15 pm
Hi
Quote: |
wintermute: Later versions set up the mpu and cache properly which will obviously cause you problems if you don't take the cache into consideration when using DMA or using shared memory to communicate with the ARM7 ( the standard IPC struct is placed in uncached memory which helps) |
Cache, humm... So this would perhaps explain the "one shot delay" I get when I read the touchpad position. Is there a need and/or a way to flush it so that it would be sure that the shared memory is really in the same state for both the ARM7 and ARM9 ?
The point is that in another part of the game, I use exactly the same mechanism and it works ! May be the binary context around changes the cache or whatever...
-- Didou
#57820 - Didou - Tue Oct 18, 2005 7:03 pm
Hi again,
I reduced the program in order to make it shorter and show clearly the problem. it now simply prints the pointer position and moves a sprite at the hit point location. It's hence really shorter.
It makes clear the "one shot shift", i.e. at each pen hit, the location of the previous pen hit is reported.
I put the source and .ds file at: http://francois.pessaux.neuf.fr/files/core.zip
Cheers,
-- Didou
#57845 - Didou - Tue Oct 18, 2005 9:39 pm
Hi, again, again,
I just try (on real hardware) the code I posted above with the libnds-20051018.tar.bz2....
New episod ... no reaction to the stylus ! Previously I used the libnds-20050921.tar.bz2 version...
Euh... Is there something compatible from one versin to another ;)
-- Didou
#57870 - wintermute - Wed Oct 19, 2005 12:02 am
That version of libnds hasn't been officially announced as yet, it needs an ndstool update. Basically I started the SF release then ran into problems with the updater that I'm still working on.
I tried compiling your code but there seems to be another odd issue in that it's stalling on the swiWaitForVBlank which is why you're getting no reponse at all. Right now I can't see why that should be the case but I can reproduce your "one shot" issue with the old arm7 core and some of my own touch screen test code.
Expect some more updates in a day or two.
#58170 - wintermute - Fri Oct 21, 2005 1:26 pm
devkitARM release 17 is now available along with libnds and example code updates. There's now a TouchTest example in the input section of the examples which works correctly for me.
Could you try the example and verify it works for you?