Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nintendo DS Programming (Programming Environment) 한신대학교 컴퓨터공학과 대학원 류승택 2008. Spring.

Similar presentations


Presentation on theme: "Nintendo DS Programming (Programming Environment) 한신대학교 컴퓨터공학과 대학원 류승택 2008. Spring."— Presentation transcript:

1 Nintendo DS Programming (Programming Environment) 한신대학교 컴퓨터공학과 대학원 류승택 2008. Spring

2 2 Programming Environment ■ Prerequisite  Programming language (C, C++...) ■ Setup Environment  PC(Operation System): Windows or Linux Installing Software Visual C++ 2005 Express.Net Framework : Get it here !Get it here ! devkitPro : devkitPro updaterdevkitPro updater PAlib : PAlib InstallerPAlib Installer  Nintendo DS (Lite) or NDS Emulator NDSL Homebrew : Passthrough Device Ex) R4 Card + SD Memory(  MoonShell) Emulator : No$GBA, Dualis, iDeaS, DeSmuMeNo$GBADualisiDeaSDeSmuMe

3 3 Nintendo DS ■ handheld game console handheld game console  released in 2004 in Canada, U.S., and Japan2004 ■ HARDWARE  Input and output Dual Screen : 2 Color LCD screens each 256 x 192 pixels Touchscreen(Bottom) : input from the included stylus, the user's fingersstylus Left: D-pad (= directional pad), narrow Power buttopn Right: A, B, X, and Y buttons, narrow Select and Start button Shoulder buttons L and R stereo speakers providing virtual surround soundstereovirtual surround sound A built-in microphone

4 4 Nintendo DS Lite ■ Nintendo DS Lite Nintendo DS Lite  a slimmer, brighter, and more lightweight redesign of the Nintendo DSNintendo DS  It was announced on January 26, 2006  As of December 2007, sales of the DS Lite have reached 45.97 million units worldwide  Differences in the DS Lite over the original DS Weight: 218 g / 7.69 oz (21% lighter than the DS). Dimensions: 133 mm × 73.9 mm × 21.5 mm (42% less volume than the DS) Battery life: With a full 3 hour charge the battery will last 15 to 19 hours on the lowest brightness setting and 5 to 8 hours on the highest brightness setting Brighter, more durable top and bottom LCD screens, with four levels of brightness

5 5 Nintendo DS Lite ■ Nintendo DS (Lite)  CPU : 67 MHz ARM9 and 33 MHz ARM7  Media : GBA cartridges & Nintendo DS Game Cards  System storage : 4 MB RAM  Connectivity: Wi-Fi and LAN Speed: 1 Mbps or 2Mbps supports wireless IEEE 802.11 (Wi-Fi) standards (10–30 m, depending on conditions)IEEE 802.11 online with the Nintendo Wi-Fi Connection serviceNintendo Wi-Fi Connection Best Selling Video Console

6 6 NDS HardWare (Front Face)

7 7 NDS HardWare (Back Face)

8 8 NDS Homebrew ■ Politics of the Nintendo DS Homebrew Movement  most people will never receive the contract with Nintendo  Dedicated hobbyists spend weeks reverse engineering the Nintendo DS hardware These people make up the homebrew movement ■ Is Homebrew Legal?  Homebrew is legal for a number of reasons  impossible to publish a game made with homebrew tools ■ The downside of homebrew  software pirates often steal from the discoveries of homebrew

9 9 Passthrough Device ■ The purpose of the pass through  allow the running of programs on the Nintendo DS through the Game Boy Advance (GBA) cartridge slot or the Nintendo DS (NDS) card slot  The Slot-1 port : DS Flash Cartridge  The Slot-2 port : GBA Flash Cartridge

10 10 Installing  Installing on Windows devkitARM : devkitPro updaterdevkitPro updater PAlib: PAlib InstallerPAlib Installer Install it to the same directory as devkitPro.Net framework : PAlib now requires for you to have the.Net framework installed  Get it here !Get it here ! that PAlib is not yet compatible with devkitARM release 21 so you need to downgrade to release 20release 20 reboot your computer!!

11 11 Compiling Test ■ Emulators  No$GBA No$GBA contains almost full NDS emulation support including 3D and WIFI emulation.  Dualis Dualis it works pretty well for home brew, but isn’t as accurate as No$GBA.  iDeaS iDeaS It was the first to support 3d and sound, and... well,  DeSmuMe DeSmuMe maybe the fastest emulator for DS. doesn’t support sound and zooming/rotation

12 12 Using PALib With Visual C++ ■ Using PALib With Visual C++ 2005 or Express  Environment Setup DKP_HOME  C:\devkitPro  AppWizard: Get the AppWizard hereGet the AppWizard here extract the contents VC8_Express_Setup.js VC8_Setup.js  double click

13 13 Using PALib With Visual C++ ■ Building the First Project  the “make” tool we use to compile PALib project doesn’t like long filename and directories with spaces Tools  Options  Projects and Solution  General Change the field “Visual Studio Projects Location” to a folder with no spaces  Execute Visual C++ : File  New  Select New Project

14 14 Using PALib With Visual C++ ■ the files that were generated by the wizard  logo.bmp → this is the image your app will show in DS Loaders.  logo_wifi.bmp → the logo to use with WiFi.  main.cpp → the main program file, with some code already written for you.  Makefile → a PALib makefile optimized for Visual Studio.  ReadMe.txt → some info. ■ Add Include  Tools → Options → Project & Solutions → VC++ Directories  select “Include files” \include\nds \libnds\include ■ Bulid  F7

15 15 Using PALib With Visual C++ ■ Compiling Error 1  Invalid conversion error  C:\devkitPro\PAlib\include\nds\arm9\PA_Sound.h  add (u32*)

16 16 Using PALib With Visual C++ ■ Compiling Error 2  File Open error  C:\devkitPro\PAlib\lib\arm7\arm7.bin add arm7.bin  current project folder

17 17 Setting Up an Emulator inside Visual C++ ■ setup a NDS emulator as an External Tool  Click on “Tools”, “External Tools”  click on “Add” to create a new External Tool Command: Select NO$GBA.exe Argument: TargetDir)\$(TargetName).nds Initial directory: $(TargetDir)

18 18 Setting Up an Emulator inside Visual C++  Make a keyboard shortcut “Tools”  “Options”  “Environment”  “Keyboard” Tools.ExternalCommand9  Assign Shift+F10

19 19 First NDS Programming ■ Template's Main Code // PALib Template Application // Includes #include // Include for PA_Lib int main() { PA_Init(); // Initializes PA_Lib PA_InitVBL(); // Initializes a standard VBL PA_InitText(1, 2); PA_OutputSimpleText(1, 1, 2, "Hello World!"); // Infinite loop to keep the program running while (1) { PA_WaitForVBL(); } return 0; }

20 20 First NDS Programming ■ Decoding the Code !  #include : include PAlib into my code  int main(int argc, char ** argv) : the start of your program  PA_Init(); // Initializes PA_Lib a general initialization  PA_Lib PA_InitVBL(); // Initializes a standard VBL VBL(Verticle Blanking Interrupt) synchronize the program with the screen, at 60 frames per second If you don’t initialize the VBL, either the program will work way faster (like 100000 frames per second, which is unplayable) or not work at all

21 21 First NDS Programming ■ Decoding the Code !  PA_InitText(1,2); //Tell it to use text on screen 1, background number 2 Argument 1: screen (0 for bottom, 1 for top screen) Argument 2: background to use 0 for topmost layet, 1 for next, 2, and 3 for the bottom  PA_OutputSimpleText(1,1,1,"Hello World !"); //Print the text on screen 1 Argument 1: Screen (0-1) Argument 2: Horizontal (X) from which to start (from 0 to 31) Each tile is a 8×8 pixel square Argument 3: Vertical (Y) (from 0 to 23) Argument 4: Text  While(1) { PA_WaitForVBL(); } synchronizes the infinite loop (60 fps). 256 x 192 pixels

22 22 Presentaion Schedule 발표 주제과제발표자 00 NDS Programming 담당교수 01 Installing and Compiling 담당교수 02 Input/Output Wiki 한글화 Wiki 한글화 및 발표자료준비 송기원 03 Sprites 곽용식 04 Backgrounds 김태수 05 Dev-related Math Stuff 중간프로젝트송현돈 06 SoundSound ( 추가조사 ) 이은정 DS Hardware 07 중간 프로젝트 시연 08 PA File System 박진수 3D-Functions3D-Functions ( 추가조사 ) Video Functions 10 Quick Demos 김인기 11 Starting a Platform Game 김경현 12 More Platform Game 기말프로젝트유원희 13 Carré Rouge 지성우 Data transfer and MultiplayerData transfer and Multiplayer ( 추가조사 )

23 23 ■ PAlib Reference  PAlib Modules http://www.palib.info/Doc/PAlibDoc%20Eng/modules.html  PAlib Wiki Tutorial http://www.palib.info/wiki/doku.php  PAlib Tutorial http://www.aaronrogers.com/nintendods/PA_Lib/  WiFiMe http://www.aaronrogers.com/nintendods/wifime.php

24 24 Reference ■ 외국사이트  PAlib's DS Dev Wiki Tutorial (General : PAlib's DS Dev Wiki Tutorial) PAlib's DS Dev Wiki Tutorial  Introduction to Nintendo DS Programming (Patater) (Jaden Amero) Introduction to Nintendo DS Programming (Patater)Jaden Amero  Nintendo DS Development Tutorial (Aaron Rogers) Nintendo DS Development Tutorial (Aaron Rogers)  DS Developer DS Developer  dsdev.org/ dsdev.org/  en.wikipedia.org/wiki/Nintendo_DS en.wikipedia.org/wiki/Nintendo_DS  GBA Developer Forum GBA Developer Forum  Homebrew NDS Homebrew NDS  NDS/Tutorials NDS/Tutorials  A guide to homebrew development for the Nintendo DS A guide to homebrew development for the Nintendo DS  Other DS Wiki Other DS Wiki ■ 국내사이트  Nintendo DS Homebrew Tutor Nintendo DS Homebrew Tutor  beodeulsoft.com/ beodeulsoft.com/  네이버 블로그 NDS 프로그래밍 네이버 블로그 NDS 프로그래밍  네이버 블로그 2 네이버 블로그 2  kkamagui 프로그래밍 세상 kkamagui 프로그래밍 세상  TISTORY TISTORY  네이버 카페 네이버 카페


Download ppt "Nintendo DS Programming (Programming Environment) 한신대학교 컴퓨터공학과 대학원 류승택 2008. Spring."

Similar presentations


Ads by Google