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: