30 December 2007

Converting videos for use with Moonshell (NDS)

One of the tasks that I needed to do over the holidays was to get some Nintendo DS/GBA flash carts set up for some people who are just getting started in Gameboy/DS homebrew development. Even though the primary use for this card is for homebrew, I thought it would be nice to get some audio/video playback working as well.

So I installed the multimedia player (homebrew) app Moonshell onto the DS flash carts. The latest version of Moonshell can be found in Moonlight's NDS archive. As of this post, Version 1.71+1 (August 2007) is the most recent version.

To use image and music files with Moonshell, you just copy your JPG/MP3 files (or a few other formats) over to your flash card and Moonshell will show/play them just fine.

Video, however, is a different beast as Moonshell won't dynamically convert the format or the size - it expects the video file to be GBA screen-sized and to be encoded in MPG1 video/MP2 audio. This means that you need to convert the videos into DPG format, which is a special format specific to the NDS and Moonshell. To convert videos into this format, there are a few free tools available (presented in the order in which I discovered them):
  • dpgenc.exe - This is included in the dpgtools distribution that comes with Moonshell. A basic tutorial on how to use (an older version of) this is at can be found in the MaxConsole Forums.

  • BatchDPG - This is an alternative to dpgenc created by LS5, another homebrew developer. The official site still has the old original 1.0 version (with source), but updated versions from various people are also available (like Firon's 1.2 version). Be sure to review Yee and Firon's BatchDPG Guide because there are a number of pre-requisites (AviSynth, ffdshow, .Net Framework 1.1) that you'll need to have installed for this to work.

  • SUPER by eRightSoft - "Simplified, Universal Player Encoder and Recorder" - This is a general video/audio converter that contains special support for DPG files. It can be downloaded from the SUPER main page, although to get to the actual download link, you'll have to navigate through a number of links. If you get frustrated trying to find the download, here is a direct download link. The latest build is 2007.23 (4 July 2007).
All of these applications are basically GUI wrappers around ffmpeg or ffdshow, which are standard audio/video encoding/decoding libraries. The first two applications (dpgenc, BatchDPG) are specific for Moonshell DPG files whereas the last one (SUPER) is a general purpose tool that can be used for all sorts of audio/video conversions.

I tried all of these tools and had luck only with SUPER. There are clearly people out there using dpgenc and BatchDPG successfully, but I kept encountering problems with the conversion - probably codec related, but I didn't bother tracking them down since SUPER worked "out of the box" for my tasks.

Using SUPER to create DPG files...

To create DPG video files using SUPER, select "Nintendo - DS" from the dropdown list of output containers. This will simplify the interface by removing options that are not appropriate for DPG containers.

Select "Nintendo - DS" as the Output Container

Now you can drag a video file into the window to add it to the filelist. Press the "Encode" button and SUPER will chug away and drop the newly encoded video file into your output directory.

Drag your video files into the SUPER window

One nice thing about SUPER is that, while the interface is a bit busy, there is plenty of context-sensitive help that pops up when you hover over the elements in the UI. This makes it fairly easy to get started with the program and get things working. To set the output directory, for example, just hover over the Output box and a message will pop up telling you how to set the output options.

14 November 2007

Bedlam DL3 : 10 years and 1 month ago today



October 14th was the 10th anniversary of Bedlam DL3. These images are from the "I survived Bedlam DL3" t-shirt designed by Frank Lee, who was also in the Outlook group at the time Bedlam occurred.

The back of the Bedlam shirt is far more interesting - it contains choice extracts from some of the emails messages that were sent to the list.



...I see that I'm a member of this alias. I never subscribed to it, and would like to know:
a) am I supposed to be on it?
b) what is it?

Ditto!
ditto????
Ditto to the response below.
How big is this alias anyway?
Wider distribution...
same here...
Here, as well..
Here too.....
Yep. Over here, too.
yep
and here...
Myself also.........
And me.
Very good question
very very good question
in fact an excellent question
couldn't agree more
Yes, I also think so.
I concur...
Likewise...
Me too!
Me too. Any ideas?
Me, too. I have no idea, either.
me too? What is this?
Yeah, me too.
me three...
moi, aussi.
do not "me too" this is apparently a huge list
it would probably be a good idea to halt the "me too's" before they get out of hand.
At the risk of adding to the avalanche of "me too's:" Me too!
What does it mean?
It's everywhere...
I think there are a few of us...
And me.
spooky...
How odd.
Count me in on the puzzlement.
I am also not related to this alias.
I'm curious also.
OK - I am on it to. Thank you
I am now curious also.
I'm sort of liking it.
Can I be part of the fun too?
Ummm...why am I on this mail?
I'm taking care of this....
I'm still stumped.
Dear sir. Or madam.
How you doing?
what was the original question?
Uhhhh huhu huhu huhu....They said.."Member"

I don't know how I got on here either...and I'm in Tampa.
In Montreal too....
what is this message about?
Maybe if we keep this up we'll figure out what we all have in common...
Maybe someone else is trying to figure out what we all have in common......
Maybe we should all come up with a reason for being on this undecipherable alias
any explanations ???
Are we all redheads??
it has something to do with the seattle bedlam society.
It is a new High Society Club??
I think that someone's messing with us.
Perhaps this is a CIA plot...
You all have been selected by our race because or your special computer software skills and abilities
It's a conspiracy
It is Greatly Annoying.
I'm not certain how all of you got on our little football pool
CAN you all please STOP sending mail to the whole alias????
I can't resist--I have to add.
please do not announce your membership to the alias.
we are wasting many people's time!
Please stop replying all or emailing Bedlam DL 3.
PLEASE - no reply all.
Please, let's all stop sending messages on this alias
Would everyone please stop replying to all on this thread
I suggest that we all stop replying to this alias.
lets don't blast back with reply alls
hummm we all seem to be thinking the same thing.
exclude my name please
Exlude my name too, please!!!
It is unnecessarily cluttering inboxes of everyone on the alias.
I do not know why I am on it of what it is.
It's forced me to learn how to use the Inbox Assistant to auto-delete.
I guess I've joined the club too.... are there dues? :)
I'm shocked at the incompetence of all those how have sent silly responses to the list.
Please spam me when I'm done with this mail. I deserve it.
My mom doesn't know what the Bedlam DL3 alias is for.
I'm thinking of having a party at the Speakeasy for all members of the "Bedlam" alias.
How come we're Bedlam 3? Aren't we good enough to be Bedlam 1?
"Bedlam" relates to insanity
"Stop the insanity"

PLEASE, NOBODY SEND ANY MORE MAIL TO THIS ALIAS. EVER.

Reply to All.
October 14, 1997



Ah. Those were the days... For a snapshot of what it was like to be in the Outlook group at that time, check out Frank's Our LTD Album pages - the LTD was our official Outlook vehicle for a while.



OK. If I'd've been paying attention, I would've posted this exactly on the 10th anniversary. But I'm not cycling though all my t-shirts as often as I used to (probably because I have more of them now), so I didn't see my reminder t-shirt until late October.

[It looks like someone on Channel9 already posted images of the shirt back in 2005 (although all I see are broken images). Oh well.]

[Update: Fixed a typo and the image links]

03 October 2007

Milking goats on your DS

Yaknow, I was thinking just the other day that there weren't enough goat-milking games for the DS and lo! I see these new screenshots for Konami's upcoming "Lost in Blue 3".


From some of the other released screenshots (see gamebrink or nintendic), it looks like this game also affords you the opportunity to be attacked by leopards or to sing with dolphins.

I wonder if there's a Wii version coming out...

13 May 2007

Anime Shopping Guide to Tokyo

Last month, Google launched My Maps, which provides a basic point-n-click interface so you can create map annotations and then save them as custom maps. For the launch of My Maps, I created a couple of demonstration maps. One of them, Les Arrondissements de Paris, is easy to find in the Mes Cartes tab of maps.google.fr.


But the other map I created was (I felt) far more interesting and useful. It's the Tokyo Anime Shopping Guide and it contains markers, links and photos of interesting places to visit on your next anime shopping junket to Tokyo.

If you have any suggestions/updates/contributions that you'd like to see included in this map, let me know. I'll be updating this map whenever I visit Tokyo - which unfortunately isn't as often as I'd like.

30 April 2007

XNAExtras - What's going on

Many people have been asking me about the current status of XNAExtras. The short answer is that it is currently in Microsoft's hands - they own the code and if they decide to release it then I can continue doing some work with it.

28 April 2007

Teaching GBA Homebrew to Kids

This past Thursday (April 26th) was Take Your Offspring to Work Day*. This is where you bring your young-uns in to work and then you show them what you do for your job. Rather than have them come in and watch me browse the web all day, I thought it would be nice to run a class for all the kids that were coming into Google's Kirkland office.

I've been putting together a simple Intro to Programming class for a local Montessori school so this seemed like a perfect opportunity to test things out before the trial run this summer.

The full class targets 10-12 year olds and starts with a basic introduction to computer engineering (binary, bytes, how things are represented in memory, ...), and then some gaming stuff like creating your own sprites, and then some code to move them around the screen, and then either animation or more coding depending on what direction the kids want to go.

For the 1-hour TYOTWD version, I needed to simplify things a bit so I dropped the computer engineering intro and replaced it with a demo of The Legend of Zelda - The Minish Cap running in an emulator. I demoed the game using the debugger version of No$gba so that I could show how the different background layers and sprites were used in the game.

After that, I showed them how to create their own sprites using Spritely, which is a sprite editor that I am writing. Now there are a number of nice tile/map editors out there, but none of them was perfect for what I wanted to do - they are either too complicated, or force you to work with tiles (instead of sprites), or cost money, or are really map/background editors, or have some other problem.

I wrote Spritely with a mind to make it easy to create GBA/NDS sprites, and I made a bunch of simplifying assumptions along the way. It only handles 8x8 pixel tiles, only allows the sprite sizes supported by the GBA/NDS, and restricts you to 16-color palettes. But it does allow you to directly edit multi-tile sprites.

In addition, Spritely has an option to generate the source code for a complete GBA or NDS project (including makefile) that you can compile and see your sprites in action. The generated project doesn't do much - it just allows you to move your sprites around - but it demonstrates the basics. The generated code requires that you have the latest version of devKitPro installed, but that's OK since I pre-installed everything needed on the laptops that the kids were using.

So in summary, I had the kids:
  • Create some sprites using Spritely
  • Export the GBA/NDS project from Spritely into a directory
  • Open a command prompt and "cd" to that directory
  • Type "make"
  • Double-click the .gba or .nds ROM to run the program in an emulator (either VisualBoyAdvance or the standard version of No$gba)
Yes, that's right. I had 10 year olds pulling up a command prompt and typing "make" to build their project. And it worked.

I also had a couple of cartridges available so that they could see their creation running on a real GBA/NDS. One 7-year old walked around with an NDS playing her "game" for (what seemed like) half an hour. Google was also nice enough to buy a few NDS cartridges to give out as prizes.

Note that even though I was targetting 10-12 year olds, there were kids ranging in age from 6 to 16 present. The younger kids needed their parents (or siblings) help with the computer, but had no problem creating their own sprites once they were shown the basics. I had hoped to go into the source code a bit with the older kids, but didn't have time.

Now, the TYOTWD class was slated to take an hour, but we kept an extra hour at the end for people who wanted to stay on and keep working. We ended up having to chase the kids off to the next event after nearly 2 and a half hours.

So it seems like it was a success. It started out a bit rough because my laptop wouldn't connect to the projector properly, and we didn't have One Laptop Per Child so the kids had to share, and the room was a bit cramped. But all-in-all it looked like the kids were excited to be there. It was nice to overhear some of them talking to their parents afterwards: "I hope you got all that information dad, because I want to keep doing this when we get home".

Hopefully at least one of the kids will continue their interest in programming. Maybe we'll see some innovative GBA/NDS homebrew coming out a few years from now.

As a final note, the kids were using a preview version of Spritely. I'll be releasing it widely once I fix a few obvious flaws and add a few more features.

* Take Your Offspring to Work Day (TYOTWD) is also known as Take Your (Daughters / Daughters and Sons / Spawn) to Work Day
GBA = Gameboy Advance
NDS = Nintendo DS

02 December 2006

Unemployed and uninsured

"So what do you do for a living?"
"I'm... uh... well, I'm between jobs at the moment."

My last day at Microsoft was yesterday, and I don't start my new job at Google for a whole 2 days. That'll give me plenty of time to fix up all the stuff in the house that needs fixin'.

01 December 2006

Start page

This blog starts here...