A2Sudoku Version 1.3 Supports Real Time Clocks

A2Sudoku

From Jeremy Rand via the Kansasfest List:

Today, I received the new No Slot Clock from Ultimate Apple 2 as found here on their store:

https://www.ultimateapple2.com/catalogzen154/index.php?main_page=product_info&cPath=1_16&products_id=70

This inspired me to do some coding to try to use my new toy.  It turns out that cc65 will use a real time clock if one is present and supported by ProDOS.  The No Slot Clock just needs a special .system program to launch first to enable support for the clock in ProDOS.  Even better, Virtual ][ which is the emulator used by the build pipeline has support for the No Slot Clock built-in.

I have pushed a new version of the build pipeline which includes the ProDOS support for the No Slot Clock in the ProDOS disk template.  This means, you can use the time.h APIs from cc65 and they should work as expected under Virtual ][.  If you put your executables on a machine with a RTC which is supported by ProDOS (No Slot Clock is one such clock but there are others including the //gs’s built-in clock), those APIs should work.  So, you can get the current time, measure elapsed times, etc in your own programs.  Grab the updated Xcode project template from here:

https://github.com/jeremysrand/Apple2BuildPipeline/releases/download/1.6/AppleXcodeTemplate.pkg

With that support in place, I decided to use it in a2sudoku.  If you have a RTC in your system which is supported by ProDOS, this latest version of a2sudoku will tell you how many minutes it took you to solve a puzzle.  If you do not have a RTC, it just congratulates you for solving the puzzle.  The latest version of a2sudoku is here:

https://github.com/jeremysrand/a2sudoku/releases/download/1.3/a2sudoku.dsk

Happy timestamping and elapsed time measuring!

Please follow and like us:

About the Author

billm

A.P.P.L.E. Chairman of the Board and Club president — Bill worked for the founder, Val J. Golding and A.P.P.L.E. from 1981 to 1982. In 1999, he began archiving the materials which were distributed and sold by A.P.P.L.E.. That project led to the group that remained of A.P.P.L.E. Bill was involved in the financial industry in Tokyo and has over 20 major office infrastructure projects to his name. In March 2001, he retired to write books and to spend more time pursuing personal interests. As the president of the users group, Bill is in charge of distribution of Call-A.P.P.L.E. magazine as well as the organization of this web site. Bill currently resides in Tokyo, Japan and Shelton, Wa splitting time between the places.