MadMockers / BareBonesOS

ROM / Firmware for DCPU
9 stars 2 forks source link

RTC #13

Open paultech opened 7 years ago

paultech commented 7 years ago

The clock hardware now provides RTC functionality, BBOS can be updated to support.

MadMockers commented 7 years ago

I was hoping to be able to mimic the BIOS RTC hardware support, which allows for setting an alarm at some HH:MM:SS period. More information on it here: http://www.ctyme.com/intr/rb-2282.htm https://en.wikipedia.org/wiki/BIOS_interrupt_call#Interrupt_table (Scroll down to to the RTC section)

In the mean time I can implement what the clock hardware allows.

Also, https://github.com/techcompliant/TC-Specs/blob/master/device-type.md defines RTC as a distinct hardware subclass. Would it be better to split out the RTC into its own device such that it can comply with this?

MadMockers commented 7 years ago

Initial implementation: https://github.com/MadMockers/BareBonesOS/tree/rtc (https://github.com/MadMockers/BareBonesOS/commit/bd56883966b927df1f5b2cec9d119fdb9a0108c2) Waiting on hardware support for alarms

Also, I don't have an emulator to test this on, so if someone could confirm this works before I merge that would be good.