Getting A Port Of Zelda Classic


Hitnrun said:
Hmm what should this be about (on that page)...

QUOTE

The zelda classic source code is on bittorrent for the enterprising hackers out there.

Wow it is really true! I downloaded, and it compiles and runs! Only the fonts are all messed up. And it even have a compilation option for gp2x!
Search for it on google and you will find it.

Just would like to know what the Zelda Classic guys think about this.

But looking at it running, it takes 70mb just by loading, it would not be so easy to port it do gp2x.
 
Last edited by a moderator:
:blink: ?!.....


The only thing I can think of is that Dark Nation "released" it becuase he was the only one working on a gp2x version. I wonder how long ago he did this and no one saw it? Anyway, I think this is probably a signal that he is no longer involved in its development.

I suppose it will have to be heavily optimized to work for the GP2X. Given the nature of the game though, that seems very probable. Nice find!! :)

Edit: According to a certain bittorrent site, the torrent has been available for almost a year..
 
The version of the file is

zc211b18d9t.zip

looks like it is 2.11 B16, doesn't look like too outdated.
And it doesn't load the files from the 2.10 release, only for the 2.11 ones.
 
Holy crow! Somebody jump on this!!!!! That source looks to be newer than the "official" windows release also (v2.10 - 1/1/2005)... Maybe with a little hope and a lot of chicken greese, we can get this thing running!
 
Ok, fixed the font problem, it compiles and runs on linux without problems, it reports as being one version newer than the one released on the forums (Zelda Classic v2.11 Beta (Build 18) - the official one reports Zelda Classic v2.11 Beta (Build 17)).
Currently compiling for gp2x, looks like it will compile ok, but it really will not work without a good source code reengineering, as it loads lots of things at startup, and takes 70mb of memory, much more than available on gp2x...
 
On the gp2x:

Zelda Classic v2.11 Beta (Build 18)
Allocating quest path buffers (4.00k/4.00k)...OK
Allocating map buffer (833.00k/837.00k)... OK
Allocating combo buffer (5.98k/842.98k)... OK
Allocating string buffer (9.75M/10.57M)... OK
Allocating door combo buffer (160.00k/10.73M)... OK
Allocating dmap buffer (234.00k/10.96M)... OK
Allocating combo buffer (1.74M/12.70M)... OK
Allocating color data buffer (158.11k/12.86M)... OK
Allocating tile buffer (511.88k/21.35M)... OK
Allocating trash buffer (97.66k/21.45M)... OK
Allocating item buffer (21.00k/21.47M)... OK
Allocating weapon buffer (2.00k/21.47M)... OK
Allocating guy buffer (20.00k/21.49M)... OK
Allocating combo class buffer (29.91k/21.52M)... OK
Initializing Allegro... OK
Checking Files... OK
Allocating bitmap buffers... OK
Loading data files:
Zelda.Dat...OK
Fonts.Dat...OK
SFX.Dat...OK
Initializing sound driver... skipped
Triplebuffer not available
Loading saved games... Insufficient memory


Still missing to load (comparing to linux port):


Loading Quest...

Decrypting ...okay.
Opening...okay.
Loading Quest...

Decrypting ...okay.
Opening...okay.
Loading Quest...

Decrypting ...okay.
Opening...okay.
Loading Quest...

Decrypting ...okay.
Opening...okay.
Loading Quest...

Decrypting ...okay.
Opening...okay.
Loading Quest...

Decrypting ...okay.
Opening...okay.
 
HOLLY SHIT!!! IT WORKED!!

Wow I can't believed it... my C skills seems to be improving.

It is running now without sound (seems to be an allegro problem), speed is very good, menus work but mouse is not, major buttons seems to be working.
It is running the first quest, I went to about 5 screen everything seems fine. As I never played it before, I don't know if something is missing.

As the project is closed source and I got the source from an unofficial location, so I will ask first Dark Nation if the allows me to release it (probably binary only).

I still can't believe I did it... hehhee ahh the joys of programming are back!
 
QUOTE
HOLLY SHIT!!! IT WORKED!!

Wow I can't believed it... my C skills seems to be improving.

It is running now without sound (seems to be an allegro problem), speed is very good, menus work but mouse is not, major buttons seems to be working.
It is running the first quest, I went to about 5 screen everything seems fine. As I never played it before, I don't know if something is missing.

As the project is closed source and I got the source from an unofficial location, so I will ask first Dark Nation if the allows me to release it (probably binary only).

I still can't believe I did it... hehhee ahh the joys of programming are back!


fucking awesome! looking forward to playing it when it's.. playable ( and when I have my GP2X :_) )
 
Hitnrun said:
HOLLY SHIT!!! IT WORKED!!

Wow I can't believed it... my C skills seems to be improving.

It is running now without sound (seems to be an allegro problem), speed is very good, menus work but mouse is not, major buttons seems to be working.
It is running the first quest, I went to about 5 screen everything seems fine. As I never played it before, I don't know if something is missing.

As the project is closed source and I got the source from an unofficial location, so I will ask first Dark Nation if the allows me to release it (probably binary only).

I still can't believe I did it... hehhee ahh the joys of programming are back!
What did you do to get the memory use down?
 
Last edited by a moderator:
zelda.jpg


:eek:

PokeParadox said:
Hitnrun said:
HOLLY SHIT!!! IT WORKED!!

Wow I can't believed it... my C skills seems to be improving.

It is running now without sound (seems to be an allegro problem), speed is very good, menus work but mouse is not, major buttons seems to be working.
It is running the first quest, I went to about 5 screen everything seems fine. As I never played it before, I don't know if something is missing.

As the project is closed source and I got the source from an unofficial location, so I will ask first Dark Nation if the allows me to release it (probably binary only).

I still can't believe I did it... hehhee ahh the joys of programming are back!
What did you do to get the memory use down?

Using the mmu hack/upper memory for some selected things (but not everything, as it seemed to interfere with allegro video buffer), and lowering some limits, like the MAXSAVES which were 15 and now are 2 (and which used 17mb of memory!). I did so many things that I don't remember what really made the difference, bu these were the main things.

As always, squidgehack for the rescue! Squidge is the king of gp2x!
 
Last edited by a moderator:
More news, I changed the sound rate in the cfg file to 22050, and now sound is working! And with no noticeable slowdown!
It even played a little song when you grab the sword at the start, I don't know if in-game music works too but sound effects seem ok.
 
Great work Hitnrun, I hope the original programmers will approve of you releasing this. I wonder how the source of a hobbyist closed-source project managed to leak in the first place :-/
 
Hitnrun said:
Using the mmu hack/upper memory for some selected things (but not everything, as it seemed to interfere with allegro video buffer), and lowering some limits, like the MAXSAVES which were 15 and now are 2 (and which used 17mb of memory!). I did so many things that I don't remember what really made the difference, bu these were the main things.

As always, squidgehack for the rescue! Squidge is the king of gp2x!
Well those tweaks sound fairly straight-forward (not belittling your porting effort) it's a shame that the Zelda Classic coders didn't pop in the dev channel or what-not to find out about how to use the MMU hack, etc... :/
Anyway it's great that something usable is upon us after all this time, so here's hoping that everything is ok'd regarding an actual release :)
 
Last edited by a moderator:
PokeParadox said:
Hitnrun said:
Using the mmu hack/upper memory for some selected things (but not everything, as it seemed to interfere with allegro video buffer), and lowering some limits, like the MAXSAVES which were 15 and now are 2 (and which used 17mb of memory!). I did so many things that I don't remember what really made the difference, bu these were the main things.

As always, squidgehack for the rescue! Squidge is the king of gp2x!
Well those tweaks sound fairly straight-forward (not belittling your porting effort) it's a shame that the Zelda Classic coders didn't pop in the dev channel or what-not to find out about how to use the MMU hack, etc... :/
Anyway it's great that something usable is upon us after all this time, so here's hoping that everything is ok'd regarding an actual release :)

Yes, seeing the diff after its done there are not too many changes, it was mostly the trial and error to find which parts used more memory, and what could go on the upper ram and what couldn't. The most time was spent trying to learn how the code works, than in fixing it for gp2x.

To make the game really playable for the custom quests, I think it would be needed to change Allegro, because its datafile (which Zelda Classic uses) ALWAYS load EVERYTHING in memory. I downloaded the top custom quest from the site, and it takes 150mb on the PC :blink: If the datafile had some support for loading/unloading on demand, more quests could work.

That being said, the smaller quest do work, I tested some of them.

One thing that does not works are the START and SELECT buttons, maybe gp2x allegro doesn't support them...
 
Last edited by a moderator:
Back
Top