Crystal Mines Source Code Released

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Crystal Mines Source Code Released
by on (#83075)
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.

Quote:
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.

by on (#83076)
Could you post a link to your site? I have no idea what it is.

by on (#83077)
Just click the www. button under his post.
Re: Crystal Mines Source Code Released
by on (#83079)
Gil-Galad wrote:
Quote:
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.

by on (#83080)
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 ?

by on (#83084)
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.

by on (#83087)
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?

by on (#83125)
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.

by on (#83128)
At this point? I seriously doubt that...

by on (#83129)
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. >.>

by on (#83132)
Looks like the assembler he was using had label length constraints.

by on (#83201)
~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