1 / 15

Palib_PAFS NDSL 파일 시스템

Palib_PAFS NDSL 파일 시스템. 박진 수. PAFS. it’s just a different way to add files to your rom 4MB size limit…. PAFS. 필요한 파일들 PAFS.exe PAFS.log PAFS.bat 형식 : PAFS [NDS 파일 ] [ 폴더 ] [ 옵션 ]. EX) PAFS PAFS.ds.gba Files/ /silence PAFS PAFS.nds Files/ /silence. Files. PA_FSInit ();

birch
Download Presentation

Palib_PAFS NDSL 파일 시스템

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Palib_PAFSNDSL 파일 시스템 박진수

  2. PAFS • it’s just a different way to add files to your rom • 4MB size limit…

  3. PAFS • 필요한 파일들 • PAFS.exe • PAFS.log • PAFS.bat • 형식 : PAFS [NDS파일] [폴더] [옵션] EX) PAFS PAFS.ds.gba Files/ /silence PAFS PAFS.nds Files/ /silence

  4. Files • PA_FSInit(); • ROM의 파일을 읽어옴 • PA_PAFSFile(0) • 파일의 내용

  5. Files • PA_FSFile[i].Name • 파일명 • PA_FSFile[i].Ext • 확장자 • PA_FSFile[i].Length • 크기 • PA_FSFile[i].FilePos • 파일포인터

  6. Directory • PA_FSFolder[i].Name • 디렉토리명 • PA_FSFolder[i].Nfolders • 디렉토리안의디렉토리 수 • PA_FSFolder[i].Nfiles • 디렉토리안의 파일의 수

  7. Directory u16 foldery = 6; // Where to write the folder names u16 indent = 0; void WriteFolders(u16 N){ // Recursive function to write the number of folders u16 Nfolder = N; PA_OutputText(1, indent, foldery, "%s : %d folders, %d files", PA_FSFolder[Nfolder].Name, PA_FSFolder[Nfolder].NFolders, PA_FSFolder[Nfolder].NFiles); foldery++; if (PA_FSFolder[Nfolder].NFolders > 0){ indent+=2; // Indents for the subfolders s32 k; for (k = 0; k < PA_FSFolder[Nfolder].NFolders; k++){ WriteFolders(PA_FSFolder[Nfolder].FirstFolder + k); } indent -= 2; } }

  8. RAM • PAFS stored the files in the rom instead of the ram • first one being the 4MB maximum size for the rom • second being that you have to specify in your code how much memory you want to give to the user • If you don’t specify enough, it won’t work...

  9. RAM • PA_FSRam(100000); • it tells PAFS how much memory you give him • PAFSStart = (char*)PA_FileSystem; • it means “PAFS starts in the ram...” • FSRamInit • It’s a special init to look for PAFS directly in the ram

  10. libFAT • microSD -> FAT 16 • libFAT : read and write on a disc FAT

  11. libFAT • fatInitDefault(); //Initialise fat library • Init FAT library • DIR_ITER* dir = diropen("/"); • dirnext(dir, filename, &st) • st.st_mode • File or Directory

  12. libFAT • http://irmus.tistory.com/tag/NDS%20Homebrew

  13. 3D_Functions 박진수

  14. PA_3D.h -> PA_3DSprites.h • This tutorial is out of date and does not work with the newest version of Palib • PA_3DSprites.h • Sprite 의 깊이 등의 3D 조정.

  15. PA_Init3D(); • Uses Bg0, Init 3D • PA_Reset3DSprites(); • Init or Reset 3D Sprites • PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_256COL ); • Texture, Width, Height, Texture Format • TEX_256COL, TEX_16BITS • PA_Load3DSpritePal(0, (void*)mollusk_Pal); • Slot, Pallete • PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96); • Sprinte Number, Gfx, Width, Height, Pallete, X, Y • X, Y Sprite CENTER • PA_3DSetSpriteXY(0, Stylus.X, Stylus.Y) • Sprite Number, X, Y

More Related