Errata for documentation

PM development, programming, hacking and all that fun stuff.
Post Reply
Posts: 2
Joined: January 24th, 2013, 17:02

Errata for documentation

Post by bakanovse » January 24th, 2013, 17:15

Hello, i am 31 years old software embedded system engineer (programmer avr, arm, pic etc.) from Russia, Ulyanovsk with very bad english (sorry for all my not understand post). Now planned to learn PM and, like planned, begin to wrote postapocalypse game for my soul.
At this post (in topic starter posted), i planned to post my look at my be (or may be not :) ) error in online documentation. Guru and masters of PM programming, please comment about my observations. Lets begin:


If the current second counter is less than the previous know valid,
it is assumed that the clock is valid and a game resumes running normally.

vs ... uctionList
Execution time for RET, RETI, RETSKIP mismatch
Last edited by bakanovse on August 26th, 2013, 01:50, edited 2 times in total.

Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: Errata for documentation

Post by Lupin » January 25th, 2013, 00:15

Hello and welcome to our "community"!

Indeed it looks like some clarification is needed here. I read the passages you mentioned and somehow it does not make much sense to me either.

About audio:
"NOTE: Pulse of 0% or 100% will not be audible"
I think what is meant here is that the duty cycle of timer 3 must not be 0% or 100% pulse width. Because with 0% or 100% duty cycle you only output 0V or 3V DC to the speaker.

I have no idea about the seconds counter. Don't know how it really works...

Posts: 297
Joined: August 13th, 2010, 18:13

Re: Errata for documentation

Post by zoranc » January 25th, 2013, 14:27

Hi! Nice to see more people are interested to develop for the the device.

Concerning sound I would take a look at the bad apple source code: There in the badapple.asm file you can see the code for playing music (and also graphics).

Team Pokémé
Posts: 90
Joined: April 14th, 2011, 19:07

Re: Errata for documentation

Post by JustBurn » February 1st, 2013, 21:58

Oh, sorry I've missed this post earlier... the reason is that the forum is mostly only used for marketplace lately so I'm usually not checking it often...

Point 1:
Your confusing volume with pulse width (duty cycle), both are different things.
When the duty cycle is 0% or 100% the voltage output on the speaker will be continuous, the audio waves are generated by variations of pressure in a medium, such as air.
In short: If there's no variation on the voltage, there's no sound.
The volume is obviously the amplitude of the wave.

Point 2:
According to history, Asterick wrote it and no one else double checked... Anyway you're right, it appears that the logic actually should be the opposite: "greater than" instead of "less than".
The second counter is actually 1/2 part of the RTC, a 24-bits value that increments by 1 each second. User can only control the Reset and Enable.
If the system reset (or code activates Reset signal) the counter go back to 0. Since the flow of time cannot go backwards it only means that the time is corrupted. Any commercial games detect this situation and fix it by asking the player for the correct time, rewriting the RTC record part in the EEPROM.
In short: If the sec.counter is greater than last recorded time it means that the counter is correct and the difference in time is the period that the system was in standby.

If you still have any question don't hesitate to ask.

Post Reply