fpc/packages/libndsfpc/examples/graphics/Printing/print_both_screens/printBothScreens.pp
Legolas 3f9327d340 * NDS: updated the rtl, libnds and fixed the examples. Now it should work fine with devkitARM r26
- Removed (again) old libgba examples

git-svn-id: trunk@13585 -
2009-08-23 13:57:45 +00:00

41 lines
816 B
ObjectPascal

program printBothScreens;
{$mode objfpc}
uses
ctypes, nds9;
var
touch: touchPosition;
topScreen, bottomScreen: PrintConsole;
begin
videoSetMode(MODE_0_2D);
videoSetModeSub(MODE_0_2D);
vramSetBankA(VRAM_A_MAIN_BG);
vramSetBankC(VRAM_C_SUB_BG);
consoleInit(@topScreen, 3,BgType_Text4bpp, BgSize_T_256x256, 31, 0, true, true);
consoleInit(@bottomScreen, 3,BgType_Text4bpp, BgSize_T_256x256, 31, 0, false, true);
consoleSelect(@topScreen);
iprintf(#10#10#9'Hello DS dev''rs'#10);
iprintf(#9'www.drunkencoders.com'#10);
iprintf(#9'www.devkitpro.org');
consoleSelect(@bottomScreen);
while true do
begin
touchRead(touch);
iprintf(#27'[10;0H' + 'Touch x = %04i, %04i'#10, touch.rawx, touch.px);
iprintf('Touch y = %04i, %04i'#10, touch.rawy, touch.py);
swiWaitForVBlank();
end;
end.