Pstros NDS is a MIDP implementation running on the CLDC java machine compiled for the Nintendo DS. It allows you to run some java programs and games written for the mobile phones on your NDS.
To achieve this goal one needs a java machine for processing the bytecode and a program library that implements the MIDP api. In this case the Sun's KVM java machine was used (thanks to Torlus and davr for porting it for the NDS and providing the source) and an altered version of the Pstros was used as the MIDP library. Both parts were built into the single binary to simplify the execution of the java code on the NDS.
How to run...
The program is a homebrewed application so you have to have one of the cards that allows you to run a custom software on the NDS. Just copy the content of the archive to the card and run the kvm.nds file (dont forget to patch the program if your card requires it). Then select a .class or .jad file and run it by pressing the (A) button. Hopefully the java program will run.
Key mapping:
Left Soft key - left pad
Right Soft key - right pad
Cursor keys - d-pad
Fire - (B) button
key [1] - (Y) button
key [3] - (A) button
key [0] - (X) button
key [#] - (Start) button
key[*] - (Select) button
Technical stuff
The MIDP screen size is set to 176x192 resolution to get the best compatibility and visual output. I've tried the HW scaled resolution of 176x208 but it was visually inacceptable (the NDS roto scaller simply discards some lines instead of making the pixel interpolation).
The heap memory of the JVM is set to 2 Mbytes to leave a reserve for the library growth (libraries are bundled in the kvm binary) and for the needs of the native methods (and for the memory leeks I made :-) and jar loader.
Key codes are set to the standard of Nokia and SonyEricsson phones.
The overall speed of the JVM is rather slow, although still usable. According the JBenchmark2 test it ranges around the speed of the Nokia 6600 phone (some operations are slightly slower some of them are faster). It might be interesting to compare the performance with the PhoneMe JVM as it should be technically more advanced than the KVM.
Note that class files must be preverified before it can be run on the KVM. Use the preverifier supplied by the J2ME WTK.
Latest version 0.7.1
2008.06.24: version 0.7.1 - R5 build
- added HttpConnection class to satisfy dependencies of some applications
- implemented drawing of the ellipses (note: draw/fillArc is not fully functional yet)