Palm Dreamspell Program.

Hey all,

I’m making a dreamspell calendar for my Palm PDA. It doesn’t do much at the moment. It’ll support PalmOS 3.5 or later. I’ve searched the net for open source GPL software but can’t find anything. Hopefully that means I’ll be the first to write a free 13 moon calendar program for Palm :tongue:. If anyone knows of any other program let me know. I don’t really want to re-invent the wheel.

Anyway I’ll post screenshots and code sniplets here. It seems there are a lot of programmers on this forum.

Here’s what I got so far

I’m going to have to shink the graphics to get more room. I might put it against the side too, will get more room. Any ideas for a name?

Cool :content:

Palmspell sounds catchy

If I had to wish for a perfect prog it would be a Dreamspell calendar diary :grin:

I programmed a dreamspell/date converter program and I’ll be happy to share my code with you. It’s in, however, and I’m not too sure how to program on palm-based OS’s. Let me know if I can help.


Awesome name! Sounds very catchy, I like it very much. Palmspell.


Cool, If it’s not to long you could just post it here. I’m using C because I can use freeware software tools. But it’s easy enough to convert it.

This is what I’m using at the moment. Hopefully it’ll get shorter.

//Finds the kin for 1904 + day
UInt16 GetKin(UInt32 day)
	UInt16 k;
	k = (day + 212 + LeapYears(day)) % 260; //Kin for today 
	return k;

//Returns the number of leapyears between 1904 and day/
//day is the number of days since 1904.
UInt16 LeapYears(UInt32 day)
	UInt32 l, a, b, c;
    a = (int)(((double)day - 59.0) / (YEAR_LEN * 4.0)); 				//Adds a leap year for every 4 years
    b = (int)(((double)day + 1401.0) / (YEAR_LEN * 100.0)); 		//Subtracts a leap year for every 100 years
    c = (int)(((double)day + 110974.0) / (YEAR_LEN * 400.0)); 	//Adds a leap year for every 400 years

    l = a - b + c + 1;
	return l;

here goes! The following code is from the Tzolkin Date Converter v 1.1 programmed by Tony Gulino. It is written in VB.NET 2002.

A couple of tips on the terminology
GIndex - The day of the year. January 1 corresponds to 1. If the current year is a leap year and the date is after Feb 28, the GIndex is subtracted by 1. Today has a GIndex of 83.

MIndex - The day of the 13/28 year. July 26 corresponds to 1. Today has an MIndex of 242.

HIndex - The signature index. For example, today (Yellow Rhythmic Sun) has an HIndex of 240.

MoonIndex - moon number. The Solar moon would be 9 (the tone names are also the same as the moon names).

DayIndex - day of the current moon. Today would be day 18.

ToneIndex - number from 1 to 13 that represents the tone.

TribeIndex - number from 1 to 20 that represents the tribe.

I’m sure you could get the general idea from the code below and just rewrite it in C. If you have Windows 98 or later and the .NET framework v1.1, I can send you the program so you can see more how it uses the following modules. If you need any help with the code, let me know.

wow you guys are cool!

it is great to see all these new dreamspell programs coming into existence… SHould be interesting to see how this project develops.


Hey AstareGod,
I’m not sure I’ll be able to use your code. Palm uses dates in the format number of seconds since midnight 1904/01/01.

I will use a format similar to that. Number of days since 1904/07/26. It should make the code very simple.

This is all base 0.

Year = (days - leapYears) / 365
DayOfYear = (Year - int(Year)) * 365
DayOfMonth = DayOfYear Mod 28
Month = int(DayOfYear / 13)

If the month is 13 then it’s the Day Out of Time.

What’s cool about this, It deals with the leap years automatically, If you are past the leap day in a leap year it will subtract an extra day from the day of year.

Other reason to use this code is that I want to stay away from the gregorian calendar. I want this calendar to work by itself.

yep Inchworm! My code depends greatly on the Gregorian calendar, simply because Windows (and .NET) give it a lot of functionality that I can use right out of the box. Eventually I will rewrite my code to work mostly off of moon dates and galactic signatures instead of the Gregorian date. This will probably appear in my version 1.2 of my converter program. I guess I’ll work on that sometime over my spring break, then release it on my website…

I wish you the best of luck with your program! I’m glad I could help (even though I didn’t help much :smile: )

Got everything working now. Just need to tidy up the inteface and add things like those daily affirmations thingies to it and the week day and symbol. Any other things I should put it?

Also need to make a better way to navigate dates.

Inchworm: in my date converter program, I programmed a duration feature. This allows the user to skip ahead or backwards a duration of:
1 day
7 days (one week)
13 days (one wavespell)
20 days (one harmonic run)
28 days (one moon)
260 days (one Tzolkin cycle)
365 days (one year)

I did this by putting a dropdown box with the above choices and having the user choose a duration, then click Back or Next.

Your program looks great! A little minor issue would be that the “Red” “Resonant” and “Dragon” are not all on the same line, but that’s more of a personal preference.

That’s a great idea. The dropdown will save a lot of room instead of have lots of different navigation buttons.

Purhaps I should put “Red Resonant Dragon” on the same line. I’ll have to drop “Kin xxx” off the front because it wont fit otherwise.

This is the first program I’ve made for Palm. So the interface side is rather new to me.

or perhaps put the kin # right under the Moon day (Solar Moon, Day 19) so that it’s to the right of the signature picture. just an idea… I think the kin # is an important feature (I’ve found uses for it after I added it to my program) so I think you’ll be better off leaving it in there, but moving it to the right of the picture.

wow inch you work fast!

i have to get myself a palmtop now :grin:

Palms and handhelds must be the ultimate dream diaries, instant on and by the side of the bed. I can recommend dana’s as they run palm but have the all in one keyboard and long screen, great for writers.

I use my Palm Tungsten E as a dream diary. I love my palm it was well worth the money. I’ve had it for over a year. I’m looking forward to upgrading it in another year.

Palms as dream diaries have advantages and disadvantages.
This is what I’ve found.

Advantages :

It’s with you all the time.

It fits under a pillow very well.

Don’t have to worry about losing a pen down the side of your bed.

Provides it’s own light.


Risks damaging your handheld. I sometimes forget to put it back under my pillow.

It’s too bright.

Text input is too slow. I have to use notepad to write dreams in. That uses a lot of space and is rather messy. Often turns out as lots of scribbles.

That’s about all I can think of. I find it good for just jotting down the main points in my dreams.
I guess as newer handhelds come out they’ll have better handwriting recognition. That’ll make it worth writing dream diary software for PDAs.

I’ve go a popup list on it now. I’ll make it possible to choose what to use the free space for. Like daily affirmations, time, gregorian date etc.

I can make it support different languages if anyone whats. Let me know and I’ll post everything that needs translating.

That looks great! I bet it will make a lot of people happy knowing they have a date converter right at their fingertips!

I’m glad I could help!

That’s for the help. All help is greatly appreciated.

I’ve got the date conversion part working. Just needed to add a date popup. It’s good enough to use but it’s not quite complete. I’ve used it to help me memorise all the tones and tribes and look up birthdays of people I know.

I’m going to put it on sourceforge. I’ve completed the program registration but probably wont be able to upload it until Wednesday or Thursday.