Closed JustMeDaFaq closed 2 years ago
NE_GetPolygonCount
and NE_GetVertexCount
don't work on emulators, sorry.
I've checked your code, and NE_WaitForVBL(NE_UPDATE_PHYSICS||NE_CAN_SKIP_VBL);
is wrong (you are using logical or instead of bitwise or). Try with NE_WaitForVBL(NE_UPDATE_PHYSICS | NE_CAN_SKIP_VBL);
and see if that fixes the CPU count.
Also, have you checked on real hardware?
NE_GetPolygonCount
andNE_GetVertexCount
don't work on emulators, sorry.I've checked your code, and
NE_WaitForVBL(NE_UPDATE_PHYSICS||NE_CAN_SKIP_VBL);
is wrong (you are using logical or instead of bitwise or). Try withNE_WaitForVBL(NE_UPDATE_PHYSICS | NE_CAN_SKIP_VBL);
and see if that fixes the CPU count.Also, have you checked on real hardware?
Tested on real hardware too, yeah! :)
Thanks for pointing out, it still shows 400, which seems to be 4 percent tho. Any idea for the poly & vertex counts not showing? Is it may because bottom screen doesnt have any?
@AntonioND
NVM, i needed to put those functions after stuff has been drawn. getting polycon and vertex count is now working too :) Sorry for taking up your time and thanks for pointing out || vs | :)
Yes, you need to call them afterwards.
Also, don't call NE_HBLFunc();
manually, I've just seen you do that before waiting for VBL.
The CPU usage should range from 0 to 100, so there is still something wrong. Can you try without NE_CAN_SKIP_VBL
?
Yes, you need to call them afterwards.
Also, don't call
NE_HBLFunc();
manually, I've just seen you do that before waiting for VBL.The CPU usage should range from 0 to 100, so there is still something wrong. Can you try without
NE_CAN_SKIP_VBL
?
Its still giving me 400-600 percent.
printf("\nCpuInPercent %i",NE_GetCPUPercent());
Thats with NE_HBLFunc();
commented out @AntonioND
Also with NE_CAN_SKIP_VBL disabled.
Also doing:
printf("\nTexMemory %i",NE_TextureFreeMemPercent());
Always returns 0. Tested on both, emulator and device. Same goes for NE_TextureFreeMem
Edit:That one is an issue of my project. Like, i just assumed its using all vbanks by default
Oh, yeah, the mem free functions are broken, sorry. I will take a look at the CPU usage issue...
EDIT: Wait, no, that's the defragmentation function, the mem free one should work.
I have NE_TextureFreeMem working. Only issue is the CPU in percent know, which seems to show me correct numbersif i format it like printf("\nTexMemory %03d",NE_TextureFreeMemPercent()); tho.
Vbanks G, H and I arent used currently by NE am i correct?
Oooh so the CPU usage function works, it's just that you're not erasing what was printed before. If you print 100 one frame, and 4 the following one, you'll get 400 unless you erase the zeroes.
And yeah, only banks A-E are used. You can disable individual banks of A-D, but E is always used (for texture palettes).
Thanks, got it all working :)
Hi, im having issues with these three functions: NE_GetPolygonCount NE_GetVertexCount NE_GetCPUPercent
First two always return 0, while the GetCPUPercent one is returning numbrs between 400-600.
I attached an example project and the resulting compiled .nds Compiled.zip free_camera.zip