mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-25 20:32:25 +00:00
- kbhit() test is working and returns a character.
- fine tuned the veralayers.c demonstration program. - fine tuned clearline(), which will clear the current line of conio_cursor_y and reposition x at the start of the line.
This commit is contained in:
parent
cdf564574a
commit
f9f7eec372
@ -6,7 +6,6 @@ void main() {
|
|||||||
backcolor(BLACK);
|
backcolor(BLACK);
|
||||||
clrscr();
|
clrscr();
|
||||||
|
|
||||||
|
|
||||||
screenlayer(1);
|
screenlayer(1);
|
||||||
|
|
||||||
gotoxy(0,16);
|
gotoxy(0,16);
|
||||||
@ -15,13 +14,13 @@ void main() {
|
|||||||
printf("this program demonstrates the layer functionality in text mode.\n");
|
printf("this program demonstrates the layer functionality in text mode.\n");
|
||||||
|
|
||||||
// Here we use the screensizex and screensizey functions to show the width and height of the text screen.
|
// Here we use the screensizex and screensizey functions to show the width and height of the text screen.
|
||||||
printf("vera card width = %u; height = %u\n", screensizex(), screensizey());
|
printf("\nvera card width = %u; height = %u\n", screensizex(), screensizey());
|
||||||
|
|
||||||
// This is the content of the main controller registers of the VERA of layer 1.
|
// This is the content of the main controller registers of the VERA of layer 1.
|
||||||
// Layer 1 is the default layer that is activated in the CX16 at startup.
|
// Layer 1 is the default layer that is activated in the CX16 at startup.
|
||||||
// It displays the characters in 1BPP 16x16 color mode!
|
// It displays the characters in 1BPP 16x16 color mode!
|
||||||
printf("vera dc video = %x\n", *VERA_DC_VIDEO);
|
printf("\nvera dc video = %x\n", *VERA_DC_VIDEO);
|
||||||
printf("vera layer 1 config = %x\n", *VERA_L1_CONFIG);
|
printf("\nvera layer 1 config = %x\n", *VERA_L1_CONFIG);
|
||||||
printf("vera layer 1 enabled = %x\n", screenlayerenabled(1));
|
printf("vera layer 1 enabled = %x\n", screenlayerenabled(1));
|
||||||
printf("vera layer 1 mapbase = %x, tilebase = %x\n", getscreenlayermapbase(1), *VERA_L1_TILEBASE);
|
printf("vera layer 1 mapbase = %x, tilebase = %x\n", getscreenlayermapbase(1), *VERA_L1_TILEBASE);
|
||||||
printf("vera layer 1 vscroll high = %x, low = %x\n", *VERA_L1_HSCROLL_H, *VERA_L1_HSCROLL_L);
|
printf("vera layer 1 vscroll high = %x, low = %x\n", *VERA_L1_HSCROLL_H, *VERA_L1_HSCROLL_L);
|
||||||
@ -45,8 +44,8 @@ void main() {
|
|||||||
*VERA_L0_CONFIG = *VERA_L1_CONFIG;
|
*VERA_L0_CONFIG = *VERA_L1_CONFIG;
|
||||||
*VERA_L0_TILEBASE = *VERA_L1_TILEBASE;
|
*VERA_L0_TILEBASE = *VERA_L1_TILEBASE;
|
||||||
|
|
||||||
printf("vera dc video = %x\n", *VERA_DC_VIDEO);
|
|
||||||
printf("vera layer 0 config = %x\n", *VERA_L0_CONFIG);
|
printf("\nvera layer 0 config = %x\n", *VERA_L0_CONFIG);
|
||||||
printf("vera layer 0 enabled = %x\n", screenlayerenabled(0));
|
printf("vera layer 0 enabled = %x\n", screenlayerenabled(0));
|
||||||
printf("vera layer 0 mapbase = %x, tilebase = %x\n", getscreenlayermapbase(0), *VERA_L0_TILEBASE);
|
printf("vera layer 0 mapbase = %x, tilebase = %x\n", getscreenlayermapbase(0), *VERA_L0_TILEBASE);
|
||||||
printf("vera layer 0 vscroll high = %x, low = %x\n", *VERA_L0_HSCROLL_H, *VERA_L0_HSCROLL_L);
|
printf("vera layer 0 vscroll high = %x, low = %x\n", *VERA_L0_HSCROLL_H, *VERA_L0_HSCROLL_L);
|
||||||
@ -74,7 +73,6 @@ void main() {
|
|||||||
while(!kbhit());
|
while(!kbhit());
|
||||||
clearline();
|
clearline();
|
||||||
|
|
||||||
|
|
||||||
// Now we activate layer 0.
|
// Now we activate layer 0.
|
||||||
screenlayerenable(0);
|
screenlayerenable(0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user