Wednesday, November 29, 2017

Added real time clock driver

Just something minor, but it continues to demonstrate how we can incorporate modern hardware into the emulated system.  In this case, Ive added a real time clock driver.  The time values are located in RAM locations:

820 - Month
821 - Day
822 - Year (hibyte)
823 - Year (lobyte)
824 - Hour
825 - Minute
825 - Seconds

Right now, it is polling...which I dont care for because of possible performance issues, but it can optimized later, maybe using interrupts.  Also, these values are located in unused RAM location...locations that some programs may want to use.  So I will aim to BCD these to the CIA real time clock or some other ROM location.

Here's a few screen shots:



2 comments:

  1. would this help with getting internal speakers (laptop) to work?
    https://www.daniweb.com/programming/software-development/threads/57693/how-do-you-make-the-computer-speaker-beep-in-c

    ReplyDelete
  2. The speaker actually does work. It is programmed as voice 1 of the SID. Its nowhere near as good as a full SID implementation such as resid, but I will come back to that eventually. The issue is that there are many different types of sound cards in a PC, and I need to write one that works with most. The PC speaker is an earlier implementation provided to almost all PCs that is normally just used for beeps when the machine turns on, but can be programmed for simple sound. See my previous post about it.

    ReplyDelete