We also implement few additional functions which help the keyboard mania display the piano score on the TV screen as follows.
//===============================
void video_hline( char y )
//The function is optimized to plot a horizontal line
//starting at y with color white
//===============================
void video_putnote( char x, char y, char c)
//draw a note on the screen
//c=0: space, c=1: eighth note, c=2: quarter note,
//c=3: dotted quarter note, c=4: half note,
//c=5: sixteenth note, c=6: dotted half note,
//c=7: rest, c=8: whole note
//x and y indicate the treble clef's position
//===============================
void video_puthigh( char x, char y, char c)
//draw treble clef on the screen
//c=0: right portion of treble clef,
//c=1: left portion of treble clef
//x and y indicate the treble clef's position
//===============================
void video_putsymbol( char x, char y, char c)
//draw a symbol on the screen with index c
//c=0: pacer, c=1: check mark, c=2: cross mark
//x and y indicate the symbol's position