thank you for replying :D
i hope you get back to coding your ds soon, it's really fun :D
thank you for replying :D
i hope you get back to coding your ds soon, it's really fun :D
Sorry, but I don't get the clue... This code:Originally Posted by 21o6
[pascal]Program Touch;
{$APPTYPE ARM9}
{$DEFINE ARM9}
{$MODE OBJFPC}
uses
cTypes;
{$INCLUDE NDS.INC}
var
touchXY: touchPosition;
begin
irqInit();
irqSet(IRQ_VBLANK, nil);
irqEnable(IRQ_VBLANK);
videoSetMode(0);
videoSetModeSub(MODE_0_2D or DISPLAY_BG0_ACTIVE);
vramSetBankC(VRAM_C_SUB_BG);
SUB_BG0_CR^ := BG_MAP_BASE(31);
BG_PALETTE_SUB[255] := RGB15(31,31,31);
consoleInitDefault(pu16(SCREEN_BASE_BLOCK_SUB(31)) , pu16(CHAR_BASE_BLOCK_SUB(0)), 16);
while true do
begin
swiWaitForVBlank();
touchXY := touchReadXY();
iprintf(#27 + '[16;0H' + 'Touch x, px = %04X, %03i' + #10, [touchXY.x, touchXY.px]);
iprintf('Touch y, py = %04X, %03i' + #10, [touchXY.y, touchXY.py]);
end;
end.[/pascal]
gives to me your same results without dividing anything. On DS phat, for px and py I get values in the range 1-252, 1-192 :scratch:
tested it on emulator and hardware ... x is increasing, y is empty and
px/py are way out of bounds.
so it's my compiler's fault?
yep, you'r .nds works.
oh great ...
now what? recompile fpc4nds AGAIN? i don't think that'll help...
Try to download the sources from SVN now, because I have uploaded some changes I had in my local SVN repository. If you have some compiling problems, please let me know and I'll try to help youOriginally Posted by 21o6
downloaded the new package 0809, recompiled fpc without errors...
result = the same
:(
tried it. it did more stuff than before, but that didn't change anything.
maybe there's something i forgot to tell. let's see:
i am using your build_fpc4nds.bat.
i have updated devkitpro with it's automated installer.
i am using the latest source of fpc (using the address from the batch-file)
and the latest libndsfpc.
directorys are:
d:\fpc for the fpc-source
d:\fpc4nds for youknowwhat
d:\arm-nds for binutils.
looking at the output when compiling fpc, there is no error, just a bunch
of warnings, for example something like tthread.inc is a stub and such.
my fpc.cfg, located in d:\fpc4nds\bin\arm-nds is:
-Tnds
-FuD:\fpc4nds\units\arm-nds
-XParm-nds-
-FDD:\fpc4nds
-FDD:\fpc4nds\bin\arm-nds
-FiD:\fpc4nds\libnds
-FlC:\devkitpro\libnds\lib
-FlC:\devkitpro\devkitARM\lib\gcc\arm-eabi\4.1.1
-FlC:\devkitpro\devkitARM\lib\gcc\arm-eabi\4.1.1\thumb
-FlC:\devkitpro\devkitARM\arm-eabi\lib
-FlC:\devkitpro\devkitARM\arm-eabi\lib\thumb
my batch-file for compiling arm9 is:
ppcarmnds %1.pp9 -Sg
@j:\nds\no$gba %1
... ppcarmnds is located in d:\fpc4nds\bin\arm-nds, which is included
in the path.
my batch-file for compiling arm9 and arm7 is
ppcarmnds %1.pp9 -Sg
ppcarmnds %1.pp7 -Sg
ndstool -c %1.nds -9 %1.arm9.bin -7 %1.arm7.bin
j:\nds\no$gba %1
PATH is:
PATH=c:\devkitPro\msys\bin;C:\WINDOWS\system32;C:\ WINDOWS;C:\WINDOWS\System32\Wb
em;C:\FPC214\bin\i386-Win32;D:\FPC4NDS\bin\arm-nds;c:\devkitpro\devkitarm\bin
... i have tried only with PATH=d:\fpc4nds\bin\arm-nds too.
oh, btw ... i can't compile the snow-demo you've made.
it says:
snow.pp(46,19) Error: Duplicate identifier "QRAN_SHIFT"
snow.pp(47,41) Error: Duplicate identifier "QRAN_MASK"
snow.pp(48,26) Error: Duplicate identifier "QRAN_MAX"
snow.pp(49,24) Error: Duplicate identifier "QRAN_A"
snow.pp(50,27) Error: Duplicate identifier "QRAN_C"
snow.pp(258,40) Error: Identifier not found "VRAM_A_MAIN_BG_0x6000000"
snow.pp(259,40) Error: Identifier not found "VRAM_B_MAIN_BG_0x6020000"
snow.pp(260,39) Error: Identifier not found "VRAM_C_SUB_BG_0x6200000"
maybe that give's you a clue. the converted 3d-examples you provided
did work properly (didn't test anything else yet).
i guess that's it. only thing i can try now is formating my hdd and
reinstalling XP ... sounds like a great idea xD
Bookmarks