MoonShell Tutorial
This is the update to the tutorial on how to install and use MoonShell, the DS' fabulous multimedia player.

MoonShell can read music (mp3,ogg...), videos (dpg by using the bundled converter), pictures (jpg, gif, bmp...), and text (basic txt format only).


(MacLike skin)

Let's get started!

==================================================

First, you'll need a flashcart. Either a standard one with flash memory (EZFA, F2A...), or one with external memory cards such as CF/SD/miniSD... (SuperCard, M3, GBA MP, EZ4...).

You'll also need:

- A PassMe (also known as SuperKey, SuperPass 1&2, Passkey, EZpass, Max Media Launcher...), FlashMe, or WifiMe
- A DS
- A memory card reader

Table of Contents:
1- Downloads and pre-made packages
2- Customize and install MoonShell
3- You own an ordinary flashcart (EZFA, F2A...)
4- You own a GBA MP, an M3 CF/SD, a SuperCard CF/SD, an EZ4...
5- MoonShell usage
6- Converting videos with dpgenc (Dgptools)
7- Converting videos with BatchDPG
8- Image Thumbnails


==================================================

1- Downloads and pre-made packages:

If you are in a hurry and want to get started quickly, just grab dpgtools (or BatchDPG), one of the pre-made packages below (see the pre-made packages section), and start reading from section 5 of this tutorial. Remember to install the required programs though (Avisynth and .net framework).

- MoonShell 1.71, latest version, for all flashcarts. Included in this download is Dpgtools 1.31.

Moonshell w/dpgtools 1.31

 - BatchDPG, a great alternative to Dpgtools: (I have included a previous version if you still want to it)

BatchDPG 1.3 Beta 5 w/ Multithread Support Latest Version. Note: Must use Moonshell 1.6 or higher with this.

BatchDPG v1.0 older version, but still works.


AviSynth, needed by BatchDPG before running.
MS .NET Framework 1.1 or higher, need by BatchDPG before running. This is the link to .NET 3.0 .
FFDShow Often this codec is needed, and i recommend using this.

Pre-made packages

These are for those who are impatient/newbies or just plain lazy, and just want to have a functional MoonShell and a nice skin without having to go through steps 2, 3 and 4 below. Please note that they are still customizable and you can change the skin, settings, etc. anytime:

MoonShell for Ds-link MicroSD
MoonShell for Ewin2 MicroSD
Moonshell for EZ-Flash 5 MicroSD
MoonShell for EZ-Flash 4 MicroSD
Moonshell for G6 Lite
MoonShell for M3 CF
MoonShell for M3 SD
MoonShell for Max Media CF
MoonShell for GBAMP CF
MoonShell for GBAMP SD
MoonShell for NinjaDS SD v1.41
MoonShell for NeoFlash MagicKey 2-3 SD
Neoflash Neo 2 SD
M3 DS Simply/R4 DS
MoonShell for SuperCard CF
Moonshell for Supercard DSone
MoonShell for SuperCard Lite
MoonShell for SuperCard SD/miniSD DLDI patch by Chishm
MoonShell for SuperCard SD/miniSD DLDI patch by Moonlight
MoonShell for flashcarts (EZFA, F2A, etc) Note: This is version 1.5. New versions do not have this option. Special instructions: unzip, put media files in files_EXFS folder, run CreateNDSROM_for_EXFS.bat, then flash the newly created .ds.gba or .nds (depends on your flashcart).

All you need to do is download the correct zip file for your flashcart, unzip it to the root of your CF/SD, and that's it.
If you use one of these packages, you can ignore section 2, 3, and 4 of this tutorial and hop on to section 5: MoonShell usage.

Also visit The Official Website for news, older versions, a SDK, and more.

Note: When running on a Supercard product, you may see an error message on bottom screen that goes away. This is normal.


2- Customize and install MoonShell

Start by inserting your CF/SD in your card reader and hooking it up to your computer (you don't have to, but it does make things a bit easier). Then go where you extracted the MoonShell zip file, and launch Setup.exe:



Choose between Japanese and English here (and check the box to save the setting so it doesn't ask you again next time), and press OK




Then choose the letter corresponding to your CF/SD, and press OK. You can also choose one of your hard disks (C:, D: etc.), and once Setup is done, copy the newly appeared files (BOOT_MP*.nds and the "moonshl" folder) on your CF/SD.
(Choose "EXFS for FlashCart" if you own an ordinary flashcart. This is disabled in ver 1.6)

After pressing OK, you'll have this:



This is the main interface. Let's check it out part by part:




Start by checking these 4 boxes. It's useful, and if you change your mind later you can just delete the extra files from the "moonshl" folder.




Check the box if you want to activate the clock plugin. It's a clock that appears on the top screen when the DS in inactive (just like a screen saver). Use the drop-down list to choose the type and style of the clock.




This drop-down list determines the type of character encoding MoonShell uses. Especially useful if you listen to music with tags in other languages, such as Japanese, Korean, Chinese... Leave the default setting if you don't know what this is for.



 
Here, check the box corresponding to your linker in the "Rom image" section, and uncheck the others. This should be straightforward.

When you're done, click the Setup button.

Note: Due to the slot 1 cards using moonshell as an OS, moonshell has renamed the shell folder to moonshl and the global.ini to moonshl.ini[/i]

An nds file and a "moonshl" folder will appear on your CF/SD. Before closing itself, setup will ask you if you want to edit the moonshl.ini file. See below for more details on this file.

- moonshl: This folder contains a file called moonshl.ini. This file is used to pass configuration options to MoonShell, and you should have a look at it. The file is self-explanatory, just open it up in a text editor, and everything is explained inside.

In the directory where you extracted the MoonShell zip, there is a folder called misc, which contains another folder called "skins".

- skins: As you might have guessed, this folder contains skins for MoonShell. Each folder corresponds to a different skin. Look at the preview.png file (which is in each skin's folder) to see what the skin looks like. Once you chose one, copy everything that's in the folder and paste in the "moonshl" folder of your CF/SD. If you did things correctly, you should get a message asking you if you want to overwrite some files. Say Yes.

If you downloaded a skin from the Internet, the procedure is the same. Copy all the .bmp and skin.ini to the moonshl folder.

Now, let's feed some media to MoonShell.

NOTE: Video width issue:
  While you can set the height and width of video files in BatchDPG, Moonshell 1.71 won't play them unless the width is 256 pixels.  You can still download a premade Moonshell 1.6 packages from the old 1.6 Tutorial thread and use them, as it will run fine with the current installation and will play the video files regardless of width. Your other option is to reconvert all the video files that do not fit this width profile. Currently, this solution is much easier. (Thank you to Dantheman for finding this issue and workaround!)


3- You own an ordinary flashcart (EZFA, F2A...)

With this kind of flashcart, you are limited to 30Mb of data (mp3/dpg/jpg...). Once MoonShell is extracted and customized ( see 2- ) put your media files in the files_EXFS folder (if you can't find it, it means you haven't run Setup.exe yet), then run CreateNDSROM_for_EXFS.bat. This batch file will create a _BOOT_MP_EXFS.ds.gba. Just flash it and use it.


4- You own a GBA MP, an M3 CF/SD, a SuperCard CF/SD, an EZ4...

Once MoonShell is extracted and customized ( see 2- ), just copy your mp3, dpg, jpg and other files to your CF/SD, and run MoonShell on your DS. As opposed to an ordinary flashcart, there is no limit to the total size of the media (except the size of your CF/SD).


5- MoonShell usage


(BlueMoon skin)

In the current version (at least on the SuperCard) it is normal to see an error screen, but don’t worry it goes away.

Once MoonShell is launched, on the bottom screen you'll see the date and time (or even more, depending on your skin and moonshl.ini), and on the top screen, there will be a file navigator. Using MoonShell is pretty straightforward: choose the file you want to read with the D-pad, press A to read it, and B to stop/go upwards in the folder tree.

X raises the volume, Y lowers it (0% to 400%), L pauses the video/song, and R is used to play the next song/video/picture. The D-Pad and stylus are used for the rest.

If you touch the bottom screen, it will exit full screen and switch to the touch screen and play the scene with a menu in which you can seek the frame to watch.


6- Converting videos with dpgenc (dpgtools v1.31)

BatchDPG is a great alternative to dpgenc. See section 7 for more information.

Note: I currently use BatchDPG, and do not have many answers for dpgenc (dpgtools).

Run the dpgenc.exe executable from where you extracted dpgtools. You'll have this:



The first thing you will want to do is change to the desired language. Click on the Language tab.

Next you will want to adjust your Options to your desired settings. Click on the Option tab.



Let's see this part by part:




- Drop-down menu: Method of video detection. Three choices here, auto detect. If that doesn’t work, try the other two.



- Sampling rate: Sound quality. The higher the better, but only one setting is available: 32000.

- Bitrate: As above, sound quality. The higher the better. 128kbps or 96kbps seem to be a good setting.

- Volume: Lets you add some sound volume.

- Drop-down menu: Method used to extract the sound track of the video. Many methods are available: mencoder, ffmpeg, extractwave or demuxed file. Use mencoder or ffmpeg.




- Pixel format: Four choices. RGB18 default, RGB15 for speed, RGB21 for quality, and RGB24 old version default.

- Video width: Self-explanatory. The maximum setting is 256 (horizontal resolution of the DS screen). The lower the setting, the smaller the video, and the uglier the video when stretched out to fill the whole screen. Use 256!

- Video Aspect ratio: Self-explanatory: 16/9 (movie), 4/3 (TV), 1:2.35(CinemaScope) or auto detect.

- Video Bitrate: Self-explanatory. The higher the setting, the better the quality, and the larger the video. Avoid using high settings, or else the video won't be smooth (with a sort of black fuzz when a character is moving) and the video might even stop for a few seconds if there is too much action on the screen.

- Video Framerate: Same advice as above. 18fps seems to be a good setting for some anime or a TV show (4/3). You can use higher settings for a movie (16/9), with 24 or 25fps (keep in mind that it's useless to put a higher framerate than the original video). If you get some black blur when there is lots of action on the video, lower this setting.

- Video Brightness: Self-explanatory. The higher the brighter. Only use if your videos are too dark or bright on your DS.

- Blur: The more the cursor is on the left, the blurrier the video. 95% is a good setting, as it removes most visible image compression.

- Flip video: What's this for? I don't really know. Maybe it's useful if you have a matrox G400, or if you want to watch movies with the DS upside-down 

- The last line: Lets you customize mencoder's commands and switches. You shouldn't modify this, unless you want to add some filters or switches. If you're interested in this, first read mencoder's manual.



The above greyed out setting can be activated by checking the advanced box in the bottom left corner.

Once you're done adjusting your settings, press Apply.

==================================================

Next you will want to adjust the output path.

Now you are ready to drop in videos to convert. Once you drop in the videos, the conversion process starts automatically.



==================================================

Here are TheSticks suggestions on settings for Dpgtools:

- Anime (4:3) ~23min, AVI (Xvid+MP3):
The conversion speed is about 23fps on my Pentium M 1.3GHz. I get a 55Mb dpg with good quality (sound and video), no black blur when there's motion. However, when there's lots of action on the screen, the video freezes for 1 or 2 seconds.

- Movie (16:9), live action, ~2h, AVI (Xvid+AC3):
The conversion speed is about 35fps on my Pentium M 1.3GHz. I get a 266Mb dpg with good quality (sound and video), no black blur when there's motion. No video freezing here.


7- Converting videos with BatchDPG

LS5's BatchDPG is a great alternative to dpgenc. It has been recently updated by Firon and LS5. Among other enhancements, we have the possibility to create a list of videos to convert, better video quality, and the ability to add external subtitles to the video.

Run the BatchDPGMTv3.exe executable from where you extracted BatchDPG. You'll have this:



The defaults settings are good, and the optimal framerate is calculated automatically. If you want the primo quality, see suggestions below.
1- Pick your video (Media File) and a subtitle file if you have one
2- Choose the temporary and output directory (respectively Temp dir and Output dir).
3- Click on Add
4- Repeat steps 1 and 3 for each one of the videos you wish to convert
5- Click on Run to start converting.

PLEASE NOTE THAT DUAL CORE FUNCTION IS BROKEN, PLEASE LEAVE AT 1 FOR NOW

If you have a Dual Core CPU, you can set the CPU Cores to 2 for faster encoding, otherwise set it to 1 if you don't or else it may cause problems.


For those who want more information on each individual setting

Input
Media file: Where you pick the file to convert to watch
Subtitle file: If your video has an external subtitle file, BatchDPG can also incorporate it. But at the moment, it only takes SRT, SSA and ASS files. ( No, not that type of ass. )

Output
Temp dir: This is where all the temporary files during converting are placed. I recommend making a folder called "temp" in your BatchDPG installation path and selecting that. If nothing is input, the source folder will be the temp folder by default.
Output file: Where the converted .DPG file sits in wait once it is done converting.

Video
FPS: The framerate of the video. You can only use whole numbers meaning no decimals are allowed. By default, it is set to "auto." I recommend leaving it at auto.
Profile: If you pick a high, it uses mencoder ( an external video encoder ) resulting in better quality at the cost of almost double the converting time of medium. If you pick the "low," it will give roughly the same quality as DPGTools. Now has feature of Ultra for even better quality.
Width & Height: Basically, you can set the width and height of the outputted video in pixels. BatchDPG automatically finds these numbers, except in a few cases where it doesn't and asks for a manual input.
Bitrate & Max Bitrate: A higher number results in a better quality video at the cost of size. The video bitrate is the target bitrate, so if the scene doesn't require that much bitrate, it will actually be lower. However, if a scene does require more than the target bitrate, it will not be higher than the max bitrate. I recommend setting the max bitrate 1.5 or 2 times the target.
Resizer --- unsure at the moment, but author states 'Spline 16' works the best.

Audio
Bitrate: Everything about video bitrate applies here in audio as well except for the fact that the bitrate you choose for audio is constant, not variable.
Samplerate: 48000hz is much better than 32000hz, however the DS can only take on 48000hz in mono audio mode, so 48000hz is recommended if you are using mono audio mode.
Mode: It helps to lower filesize by letting you use a smaller audio bitrate without sacrificing much quality.
Normalize: Normalizing is when it raises the audio track of the video to the highest possible without losing quality. I recommend using this option.

Other
After encoding: Self-explanatory
Process priority: It only affects the mencoder if you decide to use it. Basically, if you set it to low, it will use less of the computer resources so other programs do not lag as much, and vice-versa.
CPU Cores self-explanatory. NOTE: Leave at 1 for now, this feature is broken!
Buttons
Add, delete, clear and run: Self-explanatory.
About: Display version information.



Playback Issues

Sync Issues There is a problem with DPGs made by this version that cause the video to go out of sync when you seek. It appears to be a Moonshell issue.

Conversion errors: If you ever have any conversion errors, I would recommend getting a few extra codecs for both the audio and video. I recommend getting the K-Lite Full Codec pack and picking the default settings as that seems to fix most of the conversion problems.
Video skips slightly:n your "moonshl.ini" in the moonshl folder of MoonShell with Notepad and edit the following - Dithering=1 / GOPSkip=1 and replace the 1's with 0's. Also, if the video bitrate and frame rate is too high, it may cause more in-video skips. You can also play around with the AdaptiveDelayControl. What it does if set to 1 is focus mainly on video and sound sync and if set to 0, focus solely on video. I recommend setting it to 0 if you watch animation and 1 if you watch normal shows.

(So in a nutshell this is what he is settings he is saying to use in moonshl.ini)

Dithering=0
GOPSkip=0
AdaptiveDelayControl=0

BatchDPG 1.3 Beta 5 Recommended Settings For Moonshell 1.71

Suggestions for batchdpg by Yee

Fullscreen
FPS: 20
Video bitrate: 386
Max bitrate: 512
Passes: 3
Profile: Ultra
Resizer - Spline16
Width: 256
Height: 192
Audio bitrate: 128
Samplerate: 32768
Mode: Joint Stereo
Normalize: On

Widescreen
FPS: 22
Video bitrate: 386
Max bitrate: 512
Passes: 3
Profile: Ultra
Resizer - Spline16
Width: 256
Height: 144
Audio bitrate: 128
Samplerate: 32768
Mode: Joint Stereo
Normalize: On

* If you guys want, you can lower the amount of passes to reduce encoding time at the possible expense of quality.
* Those are the recommended settings, remember that you can always play around and make your own settings : )


For Batchdpg v1.0 Settings and info, click on spoiler Wink
Spoiler (click to show/hide)
LS5's BatchDPG is a great alternative to dpgenc. Among other enhancements, we have the possibility to create a list of videos to convert, better video quality, and the ability to add external subtitles to the video.


The defaults settings are good, and the optimal framerate is calculated automatically. You shouldn't have to modify those settings.

1- Pick your video (Media File) and a subtitle file if you have one
2- Choose the temporary and output directory (respectively Temp dir and Output dir).
3- Click on Add
4- Repeat steps 1 and 3 for each one of the videos you wish to convert
5- Click on Run to start converting.

For those who want more information on each individual setting

Input
Media file: Where you pick the file to convert to watch
Subtitle file: If your video has an external subtitle file, BatchDPG can also incorporate it. But at the moment, it only takes SRT, SSA and ASS files. ( No, not that type of ass. )

Output
Temp dir: This is where all the temporary files during converting are placed. I recommend making a folder called "temp" in your BatchDPG installation path and selecting that. If nothing is input, the source folder will be the temp folder by default.
Output file: Where the converted .DPG file sits in wait once it is done converting.

Video
FPS: The framerate of the video. You can only use whole numbers meaning no decimals are allowed. By default, it is set to "auto." I recommend leaving it at auto.
Profile: If you pick a high, it uses mencoder ( an external video encoder ) resulting in better quality at the cost of almost double the converting time of medium. If you pick the "low," it will give roughly the same quality as DPGTools.
Width & Height: Basically, you can set the width and height of the outputted video in pixels. BatchDPG automatically finds these numbers, except in a few cases where it doesn't and asks for a manual input.
Bitrate & Max Bitrate: A higher number results in a better quality video at the cost of size. The video bitrate is the target bitrate, so if the scene doesn't require that much bitrate, it will actually be lower. However, if a scene does require more than the target bitrate, it will not be higher than the max bitrate. I recommend setting the max bitrate 1.5 or 2 times the target.

Audio
Bitrate: Everything about video bitrate applies here in audio as well except for the fact that the bitrate you choose for audio is constant, not variable.
Samplerate: 48000hz is much better than 32000hz, however the DS can only take on 48000hz in mono audio mode, so 48000hz is recommended if you are using mono audio mode.
Mono: It helps to lower filesize by letting you use a smaller audio bitrate without sacrificing much quality.
Normalize: Normalizing is when it raises the audio track of the video to the highest possible without losing quality. I recommend using this option.

Other
After encoding: Self-explanatory
Process priority: It only affects the mencoder if you decide to use it. Basically, if you set it to low, it will use less of the computer resources so other programs do not lag as much, and vice-versa.

Buttons
Add, delete, clear and run: Self-explanatory.
About: Display version information.


Playback Issues

Conversion errors: If you ever have any conversion errors, I would recommend getting a few extra codecs for both the audio and video. I recommend getting the K-Lite Full Codec pack and picking the default settings as that seems to fix most of the conversion problems.
Video skips slightly:n your "moonshl.ini" in the moonshl folder of MoonShell with Notepad and edit the following - Dithering=1 / GOPSkip=1 and replace the 1's with 0's. Also, if the video bitrate and frame rate is too high, it may cause more in-video skips. You can also play around with the AdaptiveDelayControl. What it does if set to 1 is focus mainly on video and sound sync and if set to 0, focus solely on video. I recommend setting it to 0 if you watch animation and 1 if you watch normal shows.

(So in a nutshell this is what he is settings he is saying to use in moonshl.ini)

Dithering=0
GOPSkip=0
AdaptiveDelayControl=0


Recommended settings for BatchDpg v1.0 Kept these just in case you are using 1.0 Wink

Suggestions for batchdpg by Yee

FPS: Auto
Video bitrate: 300 ( or 150 if you want space over quality since BatchDPG uses Variable Bitrate )
Max bitrate: 300
Profile: High
Width: 256
Height: 192
Audio bitrate: 64
Samplerate: 32000
Normalize: On


8- Image Thumbnails

 

To use this, first put the images you want to see on your DS (and that you want thumbnails for) in an empty folder. Then go to the folder where you extracted MoonShell, and you'll find an executable called CreateThumbnail.exe. Run it, choose an image from the folder you just created, and press OK. The program will create thumbnails for all the images in the folder in a _THUMBNL.MSL file. Just copy the folder on your CF/SD, and you're done.

You may also modify the options in CreateThumbnail.ini (which appears after the first time you run the CreateThumbnail program) and moonshl.ini to tweak the color depth and miniature sizes.

(I personally have not tried this thumbnail feature yet)

==================================================

Any mistakes or suggestions, Do NOT post! Please pm me!



Updated and Edited by Onekelly (Heyyouguys).
First off, full credit goes to TheStick for writing the original tutorial.

Secondly, credit also goes out to Yee for letting me use his text from his tutorial on Batchdpg on gbatemp.net


Do not duplicate this tutorial without my knowledge!