Aller au contenu


Submitter

File Information

  • Submitted: juin 29 2009 17:44
  • Last Updated: juin 29 2009 17:44
  • File Size: 2,43 Mo
  • Views: 23
  • Downloads: 1

Download AMAP4DS source

- - - - -




_________________________________________________
AMAP4DS-Open-Source
(A map for DS) Open Source - Build your own map !

TUTORIAL TO ADD YOUR OWN MAP TO AMAP4DS

(Windows systems)
_________________________________________________



AMAP4DS is a simple, fast and easy to use map viewer for the Nintendo DS.
Official website to find new maps: http://www.andreani.net/ds

>> This text file is a tutorial about adding your own maps to the AMAP4DS map viewer homebrew for the Nintendo DS.


_______
HOW TO:

To add a map to AMAP4DS you will have to use some (free) development tools to be able to compile C code on your computer.
You will have to prepare 5 graphics files for the new map you want to insert into AMAP4DS. Each file must have a specific size.
To have the best quality zoom, you must create the 5 graphics of your map at different zoom sizes.
Each map (.bmp file) corresponds to a zoom level:

- Zoom 0 (Thumbnail) => map_256.bmp
- Zoom 1 => map_512.bmp
- Zoom 2 => map_768.bmp
- Zoom 3 => map_1024.bmp
- Zoom 4 => map_1536.bmp

Ok, let's go !


_______________________________
DEVELOPMENT TOOLS INSTALLATION:

- Install the "devkitPro" library (this will allow you to create code for the Nintendo DS).
Go to: http://sourceforge.n...ckage_id=160396
and download the "devkitPro Updater". Install it and run it (be sure to select the "ARM" and/or "NDS" libraries).
This will create a new folder to your "C:" hard disk. You shoul install it to: "C:\devkitPro".

- Install the ".Net framework" from Microsoft (this will allow you to use the graphic converter used below).
Go to: http://www.microsoft...&DisplayLang=en
and click the "Download" button to download the "Microsoft .NET Framework". Install it and run it.

- Install the "PA_lib" library
Go to: http://sourceforge.n...ckage_id=168612
or go to: http://palib.info/fo...es/PDdownloads/
and download the "PAlib Installer". Install it into the "C:\devkitPro" folder.

- For detailled instructions on how to install the previous development softwares, go to:
http://www.palib.inf...oku.php?id=day1
You will find a nice tutorial to do that (thanks Mollusk :-)


______________________________________________
AMAP4DS INSTALLATION - BUILDING YOUR NEW MAPS:

- Go into the "amap4ds-open-source" folder you have just downloaded and unzipped, and copy the "AMAP4DS-Cityname-Mapname" folder into your "C:\devkitPro" folder.

- In your "C:\devkitPro" folder, rename the "AMAP4DS-Cityname-Mapname" folder:
Replace the "Cityname" string by your own string (any city or place name will be fine), and replace the "Mapname" string by your own map name string (any map name will be find). For instance,if you want to create a "road" map for the city of "Dummy", you should rename the folder to: "AMAP4DS-Dummy-Road". Do not insert spaces or special characteres !
Correct naming is important when you will distribute your new map for other people to be able to find it on Google or any other site.

- More about naming: "AMAP4DS" refers to the engine map viewer name, "Cityname" and "Mapname" refers to the map you have created. All these informations will fit into one string: your folder name. This name will be the name of the ".nds" file too. The ".nds" file is the file you will copy to your DS using a flash card, or wifi, to display your new map on the DS screens.

- Now, we will suppose you have renamed the "C:\devkitPro\AMAP4DS-Cityname-Mapname" folder to "C:\devkitPro\AMAP4DS-Dummy-Road".

- Go into the "C:\devkitPro\AMAP4DS-Dummy-Road\source\gfx" folder.

- You should see the following files (you'll have to modify only these files, do not modify the others):

  - map_256.bmp
  - map_512.bmp
  - map_768.bmp
  - map_1024.bmp
  - map_1536.bmp

Ok, you will have these 5 maps to modify:

Map #1:
- Open the "map_1536.bmp" file into a graphics software (Paint Shop Pro, Photoshop, etc.).
- Prepare your new map: it must be 1536 x 1536 pixels.
- Copy your 1536 x 1536 pixels new map onto the red zone of the "map_1536.bmp" file.
- Important: replace the red zone but do not touch to the black zones (margins).
- Convert the resulting image (your map + margins) to: "Indexed colors - 256 colors - 8 bits"
- Save it to "map_1536.bmp", you've done the first map !

Map #2:
- Open the "map_1024.bmp" file into a graphics software (Paint Shop Pro, Photoshop, etc.).
- Prepare your new map: it must be 1024 x 1024 pixels.
- To build this map you must reduce your 1536 x 1536 pixels maps to 1024 x 1024 pixels.
(The smaller maps must be generated from the 1536 x 1536 pixels map for the zoom system works fine).
- Copy your 1024 x 1024 pixels new map onto the red zone of the "map_1024.bmp" file.
- Important: replace the red zone but do not touch to the black zones (margins).
- Convert the resulting image (your map + margins) to: "Indexed colors - 256 colors - 8 bits"
- Save it to "map_1024.bmp", nice job !

Map #3:
- Open the "map_768.bmp" file into a graphics software (Paint Shop Pro, Photoshop, etc.).
- Prepare your new map: it must be 768 x 768 pixels.
- To build this map you must reduce your 1536 x 1536 pixels maps to 768 x 768 pixels.
(The smaller maps must be generated from the 1536 x 1536 pixels map for the zoom system works fine).
- Copy your 768 x 768 pixels new map onto the red zone of the "map_768.bmp" file.
- Important: replace the red zone but do not touch to the black zones (margins).
- Convert the resulting image (your map + margins) to: "Indexed colors - 256 colors - 8 bits"
- Save it to "map_768.bmp", not too tired ?..

Map #4:
- Open the "map_512.bmp" file into a graphics software (Paint Shop Pro, Photoshop, etc.).
- Prepare your new map: it must be 512 x 512 pixels.
- To build this map you must reduce your 1536 x 1536 pixels maps to 512 x 512 pixels.
(The smaller maps must be generated from the 1536 x 1536 pixels map for the zoom system works fine).
- Copy your 512 x 512 pixels new map onto the red zone of the "map_512.bmp" file.
- Important: replace the red zone but do not touch to the black zones (margins).
- Convert the resulting image (your map + margins) to: "Indexed colors - 256 colors - 8 bits"
- Save it to "map_512.bmp", do you like robotic work ?

Map #5:
- Open the "map_256.bmp" file into a graphics software (Paint Shop Pro, Photoshop, etc.).
- Prepare your new map: Warning ! It must be 192 x 192 pixels (not 256 x 256 !).
- To build this map you must reduce your 1536 x 1536 pixels maps to 192 x 192 pixels.
(The smaller maps must be generated from the 1536 x 1536 pixels map for the zoom system works fine).
- Copy your 192 x 192 pixels new map onto the red zone of the "map_256.bmp" file.
- Important: replace the red zone but do not touch to the black zones (margins).
- Convert the resulting image (your map + margins) to: "Indexed colors - 256 colors - 8 bits"
- Save it to "map_256.bmp", you've done it !

- Go to your kitchen, open your fridge and drink something, you've done a good job :-)



********************************************
>> The following paragraph is facultative.
Here, you will be able to change the 2 screens which appear when the user touches the "?" icon with his Stylus, on the DS.
These are the "Credits" screens:

  - credits.bmp
  - history.bmp

- To change them, you must edit the 2 files : "credits.bmp" and "history.bmp".

  - Open the "credits.bmp" file into a graphics software (Paint Shop Pro, Photoshop, etc.).
- Prepare your new graphic: It must be 256 x 153 pixels size.
- Copy your 256 x 153 pixels new graphic to the top of the "credits.bmp" file. Your graphic should cover the AMAP4DS title only (not the gray box at the bottom of the screen). This project is open-source so you should leave the author informations, but you are free to decide :-)
- Convert the resulting image to: "Indexed colors - 256 colors - 8 bits"
- Save it to "credits.bmp", you've done the first splash "credits" top screen.

  - Open the "history.bmp" file into a graphics software (Paint Shop Pro, Photoshop, etc.).
- Prepare your new graphic: It must be 256 x 174 pixels size.
- Copy your 256 x 174 pixels new graphic to the top of the "history.bmp" file. Your graphic should cover the map background only (not the bottom gray zone with the arrow).
- Convert the resulting image to: "Indexed colors - 256 colors - 8 bits"
- Save it to "history.bmp", you've done the second splash "history" bottom screen.

>> End of facultative paragraph
**********************************************


___________________________________
CONVERTING YOUR NEW MAPS FOR THE DS

- Double-click on the "PAGfx.exe" file into the "C:\devkitPro\AMAP4DS-Dummy-Road\source\gfx" folder.
This will open a new window to convert automaticaly your files, for a few seconds.
At the end of the conversion, you will have new ".c" and ".pal.c" files into your folder.

- Important: Once you've executed "PAGfx.exe" you must check the size of the resulting ".c" files.
For a good result (and no compilation errors) you must be sure that your files do not exceed following limitations:

  - Size of "map_1536.c" file must be lower than 7000 KB
  - Size of "map_1024.c" file must be lower than 3500 KB
  - Size of "map_768.c"  file must be lower than 2000 KB
  - Size of "map_512.c"  file must be lower than 1000 KB
  - Size of "map_256.c"  file must be lower than  200 KB

- If one of your ".c" file is too large, you must reduce its size. To do that, you must edit the corresponding ".bmp" file - into your graphics software - and try to "simplify" the map. The smaller (so the better) file size is achieved with map drawn with large zones of the same colors. When you convert your image to "indexed colors", adjust the settings to have large same color zones and avoid pixelation (lots of different little pixels) of the zones.
AMAP4DS has been developped for maps (vectorized drawings), not for photos. It may be used for photos, but be careful to the size of the resulting ".c" files :-)



_________________________________________________________
COMPILING YOUR NEW APPLICATION TO CREATE THE ".NDS" FILES

- Go to the "C:\devkitPro\AMAP4DS-Dummy-Road" folder.
- Double-click on the "build.bat" file.
This will open a new window to compile automaticaly your files, for a few seconds.
At the end of the conversion, you will have 3 new files into your folder:
  
  - "AMAP4DS-Dummy-Road.ds.gba"
  - "AMAP4DS-Dummy-Road.nds"
  - "AMAP4DS-Dummy-Road.sc.nds"

(Note: If you have an error while compiling, try to reduce the complexity of your images and be sure to respect the ".c" file size limitations)

- Finished ! You can now copy one of these 3 files to your Nintendo DS depending of the linker you use.


_____
NOTE:

- If you want to distribute (internet, email, etc.) your map for the Nintendo DS, zip the 4 following files together:

  - "AMAP4DS.txt"
  - "AMAP4DS-Dummy-Road.ds.gba"
  - "AMAP4DS-Dummy-Road.nds"
  - "AMAP4DS-Dummy-Road.sc.nds"

- And rename the resulting file: "amap4ds-dummy-road.zip", so that you will distribute a complete pack for any linkers configuration, including "AMAP4DS.txt" tutorial.


________________________
IF YOU HAVE ANY QUESTION

- You can send me an email: christophe@andreani.net
- Homepage: http://www.andreani.net/ds



I hope you'll have great time using AMAP4DS.
Let me know about your creations :-)

Christ






Other files you may be interested in ..





  • 4 891 Total Files
  • 401 Total Categories
  • 13 Total Authors
  • 277 268 Total Downloads
  • AutoGG Latest File
  • Pass_Code Latest Submitter