CLOCK-IC (MSX2) The CLOCK-IC has 4 blocks,each one consisting of 13 sets of 4-bit registers (addresses 0 to 12). There are 3 aditional 4-bit registers to select blocks or control functions (addresses 13 to 15). The registers inside the block (0 to 12) and the MODE register (13) can be read from/written to. The TEST (14) and RESET (15) registers can only be written to. BLOCK REGISTER FUNCTION 0 0 second(1st digit) (CLOCK) 1 second(2nd digit) 2 minute 3 minute 4 hour 5 hour 6 day of the week 7 day 8 day 9 month 10 month 11 year 12 year BLOCK REGISTER FUNCTION 1 0 - (ALARM) 1 - 2 minute 3 minute 4 hour 5 hour 6 day of the week 7 day 8 day 9 - 10 12h or 24h clock 11 leap year counter 12 - BLOCK REGISTER bit1 bit2 bit3 bit4 2 0 id +++++++++++++++++++++++++ 1 adjust X +++++++++++++++++++ 2 adjust Y +++++++++++++++++++ 3 |------|-------|interlc|screen| 4 width (low) ++++++++++++++++ 5 width (high) +++++++++++++++ 6 foreground color 7 background color 8 border color 9 |cas sp|printer|click |key on/off| 10 |BEEP tone |BEEP volume | 11 |--------------|title color | 12 native code ++++++++++++++++ BLOCK REGISTER id = 0 id = 1 id=2 3 0 0 1 2 1 title usage id = 1 BASIC prompt 2 " usage id = 2 " 3 " usage id = 3 " 4 " password " 5 " (compressed in " 6 " 4x4 bits) " 7 " " " 8 " key cartr. flag " 9 " key cart. value " 10 " " " 11 " " " 12 " " " Routines to access to the Clock-IC: REDCLK (01F5H/SUB-ROM) - read Clock-IC data Input: C : address ( . . b5 b4 b3 b2 b1 b0 |-+-| |---------| | register | +---> block Output: A : data (only 4 lower bits valid) WRTCLK (01F9H/SUB-ROM) - write Clock-IC data Input: C : address A : data