News
QBert (01-04-2008) (A2600 Game)

jbs3000 updated his QBert remake for Atari 2600.

Quote:

SECOND TO LAST UPDATE

OK, I have completed everything except for adding other characters.

Here’s what I have:
_1) 3 levels with 4 rounds a piece.
____a) On the first level simply jump on all of the blocks once to clear the round.
____b) On the second level, you have to jump on them twice.
____c) You only have to change a square once, but if you jump on it a second time you clear it and have to jump on it again.

_2) On the left, QBert faces that show how many lives you have. If you fall, they disappear. You get 3 lives.
_3) On the right you see which level and round you are playing.
_4) Before each level, there’s a little demo, like in the arcade game.
_5) The disks have different y positions on each round, although it’s the same for all 3 levels.
_6) For now, when you complete all 3 levels, you start back at level 1 again.

Now, I know that only having the playfield 1 color sucks, but I can’t do anything about it. It’s OK until the second level. In the real game, you have to change colors twice. Since I can’t change colors what I did was, the first time QBert lands on a square, it’s partially filled in as normal. The second time, it completely fills in. It isn’t pretty, but it works.
Also, there’s only 2 disks throughout the game, instead of some rounds having 3 disks like in the arcade and 2600 versions.

Since it only goes to 4 cubes across, and the arcade had 7, I’ll make up for it with the following:
_1) Red balls can now chase you up the pyramid, unlike in the arcade where they can only move down.
_2) There will be no randomness. Enemies will aim directly for you, and the beneficial green ball that freezes time will run away from you.
_3) In the arcade and 2600 version, on the second level there’s a round where the walls of the cubes disappear. In this game, a round in the second level has the whole pyramid invisible.
_4) You get 3 lives only. No extras.

Well, guess that’s it. I won’t be posting another update until the other characters are added (and I’ll also try to add a “splat” sound when QBert or Coily fall to their doom).

http://www.atariage.com/forums/index.php?showtopic=123491

By with 0 comments
Woctochat v0.3 (Beta) (NDS Application)

Circus has updated his Nintendo DS application “Woctochat”.

http://playeradvance.org/forum/showthread.php?t=16134

By with 0 comments
Nintendo DS – Compo 1 – Mandelbrot Set (NDS misc)

Akkit.org are having a coding competition for Nintendo DS.

Read on:

Problem Statement
This first competition is about plotting the Mandelbrot set, which is a noteworthy fractal that is both simple and complex at the same time.
First of all, this is a speed optimisation contest; so, the winner will be the entry which completes the tasks set before it the fastest. There are lots of ways to improve the speed of such a process, and it’s a classical mathematical and computer programming problem, so I thought this was appropriate to start the competition with.
Here are the specific requirements of the code to be optimized:
* It needs to plot a rectangular section of the Mandelbrot set into an array (That array may be rotated or scaled, it’s not axis-aligned)
* The rectangular section will be defined by top left point ( a complex value ), complex step values in the X and Y directions, and the width and height (in array elements) of the output
* The top left point and step values will be complex numbers represented by 2 64bit values (one for the real, one for imaginary dimension), each value being defined as a 4:60 precision fixed point number (-8 to +7.999…)
* The output array will be an array of 16bit values corresponding to the number of iterations before the value at that point diverges (up to some cap given in the function parameters) (this is defined more specificly in the section below)
* You will be given a 512kiB block of contiguous memory, which is aligned to a cache line boundary. You don’t have to use it, but if you need to use a lot of memory, it’s where you should be putting things.
* Regarding precision: You must keep 64bits of precision through all operations, the C code will do this, so if you don’t, your submission will probably be disqualified. Without some guarantees on precision, the code isn’t going to be very useful. Also, since it’s a speed optimisation contest, you are welcome to make your code more precise, but you’re probably better off not doing so. Good luck! A small amount of difference is understandable, too, given differences in math that can be used, so your output won’t have to be exactly like the example code, just not completely different.
* Here’s the function prototype for the function that does all this: void MandelFunc(u32 * rectangle, int max_iteration, int width, int height, u16 * output_array, void * workram);
* Rectangle is a list of 64bit numbers, 64bit numbers are stored as the low 32bits followed by the high 32 bits – the numbers are topleft_real, topleft_imaginary, stepx_real, stepx_imaginary, stepy_real, stepy_imaginary (total of 6 64bit values, or 48 bytes)

To make this process a lot simpler, I’ve written a small program for DS that can run code snippets in a rather controlled environment. It’s in a zip file package below. This package contains the test engine, which is a bit hacky and slow ;), it also contains 2 other important elements: the example C++ code that does everything an entry needs to (you could submit it if you want, but then we might laugh at you.) – also included are some templates, bare bones C++ and asm files that show you how to start your own routine. The test app can be easily built with the latest versions of devkitARM and libnds, and will allow you to test the speed of one or more implementations you have created. The test app uses seeded random data to compare the output of your functions to the reference function, so you also get verification of whether or not your code is working correctly.

Download the Source package here (version 3) – This includes a test application which has a reference implementation of the function to be optimised as well as some templates to choose from.
Note about the source package: First version was really rushed and missed a trivial optimisation – so version 2 of the package has been released with example code that’s roughly 6 times faster – It will no longer be quite so painful to test things, previously this code was a limiting factor for testing, taking 30+ seconds to verify the tests, now it should only be around 5 seconds.
Note 2: Version 3 fixes a glaring bug in the fixed point multiply. On a related note, precision isn’t tested very well in the current test package, there will be another test project release in a few weeks that will better verify precision.

Now, about Rules:
Every compo needs ’em!
CAN means you may; SHOULD means you are probably missing out if you don’t, MUST and MUST NOT indicate mandates from the heavens; ask me before doing the opposite and be prepared to be told not to.
* You MUST NOT use any global variables (besides constant data)
* You MUST NOT put any code or constant data in ITCM or DTCM
* You CAN have constant data, but not too much, 64k is more than enough space
* You CAN use the hardware divide / sqrt capabilities of the DS
* You MUST NOT use timers, graphics hardware, or other DS hardware outside of the hardware math functionality. I can’t think of any useful exceptions but may be willing to grant some if I’m wrong.
* You CAN use malloc/free/new/delete, and other standard library functions in either the C or C++ standard libraries. It’s your cputime, who am I to stop you 😉
* You CAN use stack-allocated memory, just be aware that the full 16k of DTCM (where the stack resides) may not be available to you.
* Your code can’t be too terribly big. I’m thinking 64k is the threshhold of “starting to get too big” and 128k is the threshhold for “yeah, that’s just too big.” – if you do manage to use that many instructions though, you won’t lose that much speed by halving the size of your unrolled loop anyway 😛 (And I mean compiled size, not source size)

About the Mandelbrot set
I’m sure some of you have run into the Mandelbrot set before, either plotting it with some trivial code or just tinkering with some fractal generator, but it’s unlikely you remember exactly how it works off the top of your head. So, this section is all about how it works.
The Mandelbrot set is a fairly simple relationship based on complex numbers (see link for more info). In short, complex numbers are 2-dimensional numbers, with one dimension in the “real” plane (normal numbers), and one dimension in the “imaginary” plane (numbers multiplied by “i”, or sqrt(-1) ).
So, adding and subtracting complex numbers works a lot like normal 2d vectors; (a+b*i) + (c+d*i) = ( (a+c) + (b+d)*i )
Multiplication and division are more complex though. Multiplication winds up looking like a polynomial expansion: (a+b*i) * (c+d*i) = a*c + a*d*i + b*c*i + b*d*i*i, and since i*i is -1, you’re left with = (a*c – b*d) + (a*d + b*c)*i;
And division is even more complex, requiring first a step to reduce the denominator to a real number: (a+b*i) / (c+d*i) = (a+b*i)*(c-d*i) / (c+d*i)*(c-d*i) = ((a*c+b*d)+(b*c-a*d)*i) / (c*c+d*d) – Which is just a multiplication problem and division by a constant, so I won’t complete the expansion here.

Fortunately, the Mandelbrot set only uses Multiplication and Addition, which are both generally pretty easy.
Specificly the Mandelbrot set consists of all of the points in the complex plane where a specific recursive relation never diverges to infinity. The relation that defines the Mandelbrot set is P(n+1) = P(n)*P(n) + c, where P(0) is 0, and c is the value of the point you’re testing in the complex plane.
The Mandelbrot set exists completely inside a circle with radius 2, the furthest point in the set is (-2 + 0*i), so if P(n) is ever outside of that circle, we know that point will converge to infinity and not be in the Mandelbrot set.
We’re not purely interested in whether the points are in the set though, we want to know how many iterations it took if they were pushed out of that circle, that’s how we get the fancy colors! So, for this problem store the first “n” that was outside of the radius-2 circle into the 16bit array value for that location. You will be given a “maximum” value, and if your n passes the maximum value, you should set the maximum value for that array element and move on.

Wrapping it up
Ok, this description went on a lot further than I expected!
I do realize that this is a pretty tough problem! If you’d like to be involved in an optimization contest but this is too hard, tell me! I’m currently considering opening up a second “branch” of competitions, for easier optimization contests, and whether I do will depend on if anyone bugs me about it!

This competition is going to be running for 2 months – which should be long enough to implement and optimize something like this; I’m mostly using 2 months because I figure I’ll have more time around then, the next month looks pretty hectic for me.
Also, I have planned to create an update for the test application, to allow timer-sampled profiling (with profiler in ITCM so it doesn’t screw up the cache profiling much), which should prove a powerful tool for finding issues and optimizing code! look for that around a month from now.

Notable Questions
I’ve received a significant question that I think the answer should be easy to access, so I’ve added this section to keep track of important questions and their answers:
Question: Is it ok to use other people’s publicly available code for this competition?
Answer: Technically yes; as long as it has a license that’s compatible. See the Rules page… Just copying the code goes against the spirit of this competition site, the goal is to learn something and produce new code; but I won’t disallow it.
Question: Can entrants work in teams?
Answer: Yes. Only one account may be tied to an entry though, so you’ll have to credit teammates in the title or the source code that’s submitted. (Inappropriate team names may be moderated, you know who you are :P)
Question: What do I have to submit to enter?
Answer: Only the source files you created/modified, in one of the supported archive formats (zip, rar, tar)
Question: Will there be prizes?
Answer: Not in this competition. I’m considering it for future competitions though.

Thanks to http://www.drunkencoders.org for the news.

http://opti.akkit.org/competition.php?id=5

By with 0 comments
OpenTTD DS (Alpha 6) (NDS Game Port)

OpenTTD DS is a port of OpenTTD for Nintendo DS.

OpenTTD is a clone of the Microprose game “Transport Tycoon Deluxe”, a popular game originally written by Chris Sawyer. It attempts to mimic the original game as closely as possible while extending it with new features.

OpenTTD is licensed under the GNU General Public License version 2.0.

Changes:

based on r12452 (internal rev1926)
the NDS port now has a different toolbar, more suitable for the small screen
for better access with the touchscreen the toolbars have been moved to the bottom screen
a fully customizable on-screen keyboard has been added (click on a text field to open it)
a newsticker display on the lower screen has been added
some windows have been adapted for the NDS screen (more will follow in future releases):
– intro menu
– game creation menu
– minimap
– build vehicle window
when building depots and stations only one preview image is shown which you can rotate by clicking on it
information regarding accepted cargo when building a station is displayed as icons now
switching screens (left shoulder button L) now only switches the windows
many windows (e.g. confirmation dialogs) are now centered on the bottom screen
the amount of free ram (in kb) is displayed in the middle of the status bar. This is only a temporary change to help with tracking down a memory leak
additionally you can view some memory information by pressing the B button
always use new global pathfinder (NPF). the original TTD pathfinder crashes due to too many recursions
fixed loading screen glitch

http://www.tt-forums.net/viewtopic.php?f=33&t=35306&p=647762#p647762

By with 0 comments
SMS SDL DC v0.1 (Master System emu for DC)

This is a very quick port of SMS+SDL 7.1 by Gregory Montoir which was based on 0.9.4a of SMS Plus by Charles Mac Donald. Put your .sms and .gg ROMs in /roms and burn.

http://www.dcemulation.org/phpBB/viewtopic.php?f=34&t=96944

By with 0 comments
CPS3 PSP v1.0 (CPS3 emu for PSP)

After some weeks of silence Akop Karapetyan (Uberjack) is back with a new emulator for PSP. This time he presents “CPS3 PSP”, which is a Capcom Play System III emulator for PlayStation Portable.

http://psp.akop.org/cps3

By with 0 comments
Go Bear Go (GP2x Fenix Game)

Zikitrake released a new game for GP2x called “Go Bear Go”.

Thanks to http://www.gp32spain.com for the news.

http://cezgs.computeremuzone.com/ficha.php?id=16

By with 0 comments
Tetrablocks v0.4 (GP2x Game)

Phaxan has released his first homebrew project for GP2x. It’s a Tetris style game called “Tetrablocks”.

http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,25,2530

By with 0 comments
graphDS v0.5 (NDS Application)

graphDS can evaluate mathematical expressions and graph Cartesian, parametric, and polar equations.

Changes:

Added catalog. Added functions: abs, acs, asn, atn, mean, nDeriv, nIntegrate, rand.

http://robertson.heliohost.org/

By with 0 comments
Goomba Color (31-03-2008) (GBC emu for GBA)

Goomba Color is a GBC emulator written for the GBA. Even though the GBA usually natively plays GBC games, Goomba Color provides the convenience to run multiple games from a flash cartridge, and also runs on the Nintendo DS and Game Boy Micro.

Changes:

* Amazing new speedhacks to make some games run faster
* Fixed some graphical garbage while rom menu scrolls out
* Rom menu no longer shows game codes of GBC games

http://www.dwedit.org/gba/goombacolor.php

By with 0 comments