Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New DA: No-Slot Clock control #38

Open
inexorabletash opened this issue Oct 17, 2017 · 9 comments
Open

New DA: No-Slot Clock control #38

inexorabletash opened this issue Oct 17, 2017 · 9 comments
Labels
Control Panel DA Control Panel DA (new or existing) feature request User-facing feature additions/enhancements Good First Bug Approachable project for a new contributor hardware specific

Comments

@inexorabletash
Copy link
Collaborator

Adjust time (and date) of NSC

@inexorabletash inexorabletash added Desk Accessories DA bugs, feature requests, or new DA requests feature request User-facing feature additions/enhancements Control Panel DA Control Panel DA (new or existing) labels Oct 17, 2017
@inexorabletash inexorabletash removed Desk Accessories DA bugs, feature requests, or new DA requests labels May 4, 2019
@inexorabletash inexorabletash added the Good First Bug Approachable project for a new contributor label Aug 27, 2021
@inexorabletash
Copy link
Collaborator Author

inexorabletash commented Aug 27, 2021

Good First Bug notes:

An ambitious approach would be extend the Date & Time (see #11) DA:

  • If the system has no realtime clock, just set the ProDOS date/time
  • Otherwise, determine which type of clock (NSC, Thunderclock, Dclock, Cricket, ...) and use appropriate code to set it.

A less ambitious approach would be to just make a control panel specific to the NSC, and let users figure it out. No shame!

@inexorabletash inexorabletash changed the title New DA: NSC control New DA: No-Slot Clock control Aug 27, 2021
@inexorabletash
Copy link
Collaborator Author

Added complication: some of the clock detection routines rely on trying to read the time and failing if the time is not valid. That would be a challenge if the goal of the DA is to let you initialize the RTC, rather than just adjust the time. The Cricket! driver works that way at any rate.

For The Cricket! and NSC a dedicated DA for setting the date/time with an explicit "pick the clock" option might make sense.

@inexorabletash inexorabletash added this to the 1.4 milestone Jun 11, 2023
@buserror
Copy link
Contributor

For reading the NSC, wouldn't it be simpler to install the .SYSTEM driver? Seems to work for other prodos system disks.

@inexorabletash
Copy link
Collaborator Author

inexorabletash commented Oct 20, 2023

For reading the NSC, wouldn't it be simpler to install the .SYSTEM driver? Seems to work for other prodos system disks.

A multi-clock CLOCK.SYSTEM driver is already included. But that's for reading the clock, not setting it, which is what this issue is about.

@inexorabletash
Copy link
Collaborator Author

To clarify: if the goal of a DA is to set the clock, we first need to detect it. But the current detection logic in most drivers is to try to read the clock and get a valid time. If the time is not yet set, that would fail.

@buserror
Copy link
Contributor

I will have to look at the CLOCK.SYSTEM source, as it fails to detect the one in my emulator, which I've plonked on slot 1 -- it's detected by the NS.CLOCK.SYSTEM "Official driver" tho, so there must be a difference in probing. I've put it there because the driver probe looks there first!
To detect it should be fairly easy, even with the clock not set, it will still return 64 bits of uninitialized clock I suppose, so will change the LSB of any ROM byte that is read to do the probe...?

@inexorabletash
Copy link
Collaborator Author

A2D includes the "jumbo" driver from https://github.com/a2stuff/prodos-drivers

@buserror
Copy link
Contributor

Isn't this something that ought to be in the driver? Ie currently the clock probes and install the clock reader routine, but there isn't a vector for a 'set' --- perhaps we'd need one somehow? That way the DA could look to see if there is a 'set', enable editing, and call the driver handler when done?

@inexorabletash
Copy link
Collaborator Author

In an ideal world, yes. But in practice, the driver is restricted to 125 bytes and ProDOS only defines reading the time, not setting it. There's no established practice for setting the time outside of bespoke utilities that shipped with each clock.

@inexorabletash inexorabletash removed this from the 1.4 milestone Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Control Panel DA Control Panel DA (new or existing) feature request User-facing feature additions/enhancements Good First Bug Approachable project for a new contributor hardware specific
Projects
None yet
Development

No branches or pull requests

2 participants