Crystal Mines Source Code Released

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
Gil-Galad
Posts: 321
Joined: Sat Nov 13, 2004 9:43 pm
Location: Ohio, USA
Contact:

Crystal Mines Source Code Released

Post by Gil-Galad » Wed Aug 24, 2011 6:10 am

I just received the source code to the Color Dreams game called Crystal Mines. Dan Lawton and the programmer and author of the game, Ken Beckett released this game's source code to me.

They said that they wanted the source code to get out there so that people could learn from it and improve it as they wished. Although, there is a particular license for the game. I will post it here but it is also inside the archive for the game.
Ken's license:

- The name "Crystal Mines", the graphics, sound, music, and the levels are NOT open source. People other than me worked on them, and for that version of the game actually got royalties and still have ownership. It's OK to possess them for personal use, but they can't be reused in a new game or distributed for profit.

- As the sole author of the code, I (Ken Beckett) will allow the source code for the NES version to be used in other works, provided that: A) Credit is given to 'Ken Beckett' in both the portions of re-used source code AND in the credits of the new game, and B) That the code is modified sufficiently such that the new game is not easily recognizable as being Crystal Mines with new graphics/sound/music.

-Ken
Have fun and enjoy!

You can get this stuff at my website in the source code section, specifically in the NES section. I also have some other stuff I uploaded but isn't NES.

User avatar
qbradq
Posts: 943
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq » Wed Aug 24, 2011 6:34 am

Could you post a link to your site? I have no idea what it is.

User avatar
Gilbert
Posts: 358
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Post by Gilbert » Wed Aug 24, 2011 6:35 am

Just click the www. button under his post.

tepples
Posts: 21752
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Crystal Mines Source Code Released

Post by tepples » Wed Aug 24, 2011 7:45 am

Gil-Galad wrote:
That the code is modified sufficiently such that the new game is not easily recognizable as being Crystal Mines with new graphics/sound/music.
I guess that's to shut out someone from making the next Exodus or Joshua. Either that or First Star raised a stink.
Last edited by tepples on Wed Aug 24, 2011 7:58 am, edited 1 time in total.

User avatar
Bregalad
Posts: 7767
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Wed Aug 24, 2011 7:52 am

Color dreams' NES documentation wrote:A fifth [audio channel] set has a D to A and also a complex noise generator. The last
set is very good for simulating things like a constant heart beat, fire,
machinery, or other complex repetitive forms. Unfortunately it interfers
with joystick operation and we do not know why. There is a reward of $2000
if you can explain this to me (offer may expire, inquire with Dan). You
must deduce the info on your own, contacting outside sources with Nintendo
documents is forbidden.
It's fun this has been "discovered" here only a few years ago.
Color dreams' NES documentation wrote: Bit 20H = This bit is set if there are more than 8 sprites on a line.
Since the extra sprites disappear (the highest numbered
sprites will not display), this is important data. It
is recommended to manipulate reg 2003 by using a non-zero
value when the bit here gets set. This way you can cause
the sprites that would disapear to blink instead..
[...]
Unfortunately,
the information for the first 2 sprites is somehow lost when
this technique is used. If the technique is used only when bit
H'20 is set in 2002 the loss of these 2 once in a while will be
better than lossing the extra ones on the line completely. If
someone figures out why the 2 are lost, please notify me
It's the first time I see this idea. Does it actually work ?

User avatar
Dwedit
Posts: 4236
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Wed Aug 24, 2011 10:01 am

Using reg OAMADDR as a way of crude OAM cycling has been done before, but it's obvious that that documenation didn't know about all sprites past the 8th sprite being discarded on every scanline no matter what. When they mention the first 2 sprites disappearing, that means they wrote a higher value to OAMADDR, then uploaded the sprite table. So that means early sprites instead become late sprites, so they are discarded.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

tepples
Posts: 21752
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Wed Aug 24, 2011 10:22 am

Dwedit wrote:it's obvious that that documenation didn't know about all sprites past the 8th sprite being discarded on every scanline no matter what.
I thought that's what "more than 8 sprites on a line. Since the extra sprites disappear" was supposed to mean.

Now the thing about the first two sprites: has the behavior been fully reversed, or is it considered so obscure that it'll need a decap to fully appreciate?

User avatar
Jarhmander
Formerly ~J-@D!~
Posts: 488
Joined: Sun Mar 12, 2006 12:36 am
Location: Rive nord de Montréal

Post by Jarhmander » Thu Aug 25, 2011 8:49 pm

Bregalad wrote:
Color dreams' NES documentation wrote:A fifth [audio channel] set has a D to A and also a complex noise generator. The last
set is very good for simulating things like a constant heart beat, fire,
machinery, or other complex repetitive forms. Unfortunately it interfers
with joystick operation and we do not know why. There is a reward of $2000
if you can explain this to me (offer may expire, inquire with Dan). You
must deduce the info on your own, contacting outside sources with Nintendo
documents is forbidden.
It's fun this has been "discovered" here only a few years ago.
Maybe they would like to know what is the cause of this problem, with a link to the thread that explained it.

User avatar
tokumaru
Posts: 11466
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Thu Aug 25, 2011 9:02 pm

At this point? I seriously doubt that...
Last edited by tokumaru on Thu Aug 25, 2011 9:10 pm, edited 1 time in total.

3gengames
Formerly 65024U
Posts: 2269
Joined: Sat Mar 27, 2010 12:57 pm

Post by 3gengames » Thu Aug 25, 2011 9:03 pm

Is it just me or does all source code of everyone elses programs just look...bad? I haven't seen source that's anywhere near the way I code my games, like this. Anyone else get that feeling? I browsed it but it was way too complex for me. >.>

User avatar
Dwedit
Posts: 4236
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Thu Aug 25, 2011 11:22 pm

Looks like the assembler he was using had label length constraints.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
Gil-Galad
Posts: 321
Joined: Sat Nov 13, 2004 9:43 pm
Location: Ohio, USA
Contact:

Post by Gil-Galad » Sat Aug 27, 2011 6:55 pm

~J-@D!~ wrote: Maybe they would like to know what is the cause of this problem, with a link to the thread that explained it.
Oh yeah, I told Daniel Lawton about this problem. Of course the offer expired to pay $2000 for the information. lol

Post Reply