[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Contiki 2.4 binary release for Retrocomputing



On 9/19/2010 12:40 PM, Oliver Schmidt wrote:
Hi Tom,

Do any of the v2.4 apps use the mouse?

Yes:
- Web browser
- DHCP client
- SMTP client
- IRC client (however not much to click on here)

Also now that we've added No-Slot-Clock to AppleWin, would this
benefit any of the apps (or contiki itself)?

I've seen the announcement :-) However the idea of Contiki 2.x (in
contrast to Contiki 1.x) is to keep things as simple as possible in
order to allow others to understand it.

Therefore Contiki 2.x almost fully relies on the services provided by
the cc65 C library - the mouse is a great example.

So from that perspective the question would be if it makes sense to
include some NSC support in the cc65 C library. As we all know a stock
A2 lacks any type of timer support resulting in the cc65 C library
missing the clock() API present on most other cc65 targets.

I've been recently thinking about the options for implementing clock()
on the A2. The result was that I believe that there are more machines
with some sort of mouse hardware than machines with NSC. Therefore my
plan is to implement clock() based on the mouse VBL interrupt and
_not_ based on the NSC. As both the mouse and the NSC can't be
presumed to be present it would of course make sense to check for both
on program startup time in order to increase the likelyhood of being
able to have an actually funtional clock().

However given the time it typically takes me to actually implement
stuff (instead for just writing about it) and given that codesize is
always a concern (checking for two things is oviously larger) I
wouldn't wait for NSC support to arrive.

Hope my thoughts make sense to you...

They do.

However, a source of periodic interrupts can only be used to implement
a time of day function if 1) the interrupts are never disabled long
enough to lose some, and 2) the user is willing to "set the clock"
on each boot.

The Apple II disables interrupts for seconds at a time when accessing
5.25" disks, causing loss of "ticks".  And users often don't bother to
enter the real time when prompted.

If a stable RTC is desired, for file date-time stamping, for example,
then the NSC/SmartWatch is a desirable solution.

If a reasonably stable source of periodic interrupts is desired, then
the mouse card is hard to beat (and the NSC is no help at all).

-michael

NadaNet 3.1 for Apple II parallel computing!
Home page:  http://home.comcast.net/~mjmahon/

"The wastebasket is our most important design
tool--and it's seriously underused."