mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-26 12:49:21 +00:00
One demo program for vera modes.
This commit is contained in:
parent
8b767abd7d
commit
f70d503001
@ -111,6 +111,12 @@ void main() {
|
|||||||
|
|
||||||
void tile_16_x_16_8BPP_256_color() {
|
void tile_16_x_16_8BPP_256_color() {
|
||||||
|
|
||||||
|
vera_layer_mode_text( 1, 0x00000, 0x0F800, 128, 128, 8, 8, 256 );
|
||||||
|
screenlayer(1);
|
||||||
|
textcolor(WHITE);
|
||||||
|
bgcolor(BLACK);
|
||||||
|
clrscr();
|
||||||
|
|
||||||
byte tiles[256] = {
|
byte tiles[256] = {
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
@ -228,6 +234,12 @@ void tile_8_x_8_8BPP_256_color() {
|
|||||||
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 8, 8, 8);
|
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 8, 8, 8);
|
||||||
vera_display_set_scale_none();
|
vera_display_set_scale_none();
|
||||||
|
|
||||||
|
vera_layer_mode_text( 1, 0x00000, 0x0F800, 128, 128, 8, 8, 256 );
|
||||||
|
screenlayer(1);
|
||||||
|
textcolor(WHITE);
|
||||||
|
bgcolor(BLACK);
|
||||||
|
clrscr();
|
||||||
|
|
||||||
byte tiles[64] = {
|
byte tiles[64] = {
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
@ -306,6 +318,12 @@ void tile_16_x_16_4BPP_16_color() {
|
|||||||
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 16, 16, 4);
|
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 16, 16, 4);
|
||||||
vera_display_set_scale_none();
|
vera_display_set_scale_none();
|
||||||
|
|
||||||
|
vera_layer_mode_text( 1, 0x00000, 0x0F800, 128, 128, 8, 8, 256 );
|
||||||
|
screenlayer(1);
|
||||||
|
textcolor(WHITE);
|
||||||
|
bgcolor(BLACK);
|
||||||
|
clrscr();
|
||||||
|
|
||||||
byte tiles[2048] = {
|
byte tiles[2048] = {
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
@ -513,6 +531,12 @@ void tile_8_x_8_4BPP_16_color() {
|
|||||||
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 8, 8, 4);
|
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 8, 8, 4);
|
||||||
vera_display_set_scale_none();
|
vera_display_set_scale_none();
|
||||||
|
|
||||||
|
vera_layer_mode_text( 1, 0x00000, 0x0F800, 128, 128, 8, 8, 256 );
|
||||||
|
screenlayer(1);
|
||||||
|
textcolor(WHITE);
|
||||||
|
bgcolor(BLACK);
|
||||||
|
clrscr();
|
||||||
|
|
||||||
byte tiles[512] = {
|
byte tiles[512] = {
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
@ -622,6 +646,12 @@ void tile_16_x_16_2BPP_4_color() {
|
|||||||
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 16, 16, 2);
|
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 16, 16, 2);
|
||||||
vera_display_set_scale_none();
|
vera_display_set_scale_none();
|
||||||
|
|
||||||
|
vera_layer_mode_text( 1, 0x00000, 0x0F800, 128, 128, 8, 8, 256 );
|
||||||
|
screenlayer(1);
|
||||||
|
textcolor(WHITE);
|
||||||
|
bgcolor(BLACK);
|
||||||
|
clrscr();
|
||||||
|
|
||||||
byte tiles[256] = {
|
byte tiles[256] = {
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
@ -698,6 +728,12 @@ void tile_8_x_8_2BPP_4_color() {
|
|||||||
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 8, 8, 2);
|
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 8, 8, 2);
|
||||||
vera_display_set_scale_none();
|
vera_display_set_scale_none();
|
||||||
|
|
||||||
|
vera_layer_mode_text( 1, 0x00000, 0x0F800, 128, 128, 8, 8, 256 );
|
||||||
|
screenlayer(1);
|
||||||
|
textcolor(WHITE);
|
||||||
|
bgcolor(BLACK);
|
||||||
|
clrscr();
|
||||||
|
|
||||||
byte tiles[64] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
byte tiles[64] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||||
0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
|
0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
|
||||||
@ -788,6 +824,11 @@ void text_8_x_8_1BPP_16_color() {
|
|||||||
vera_display_set_scale_none();
|
vera_display_set_scale_none();
|
||||||
screenlayer(1);
|
screenlayer(1);
|
||||||
|
|
||||||
|
textcolor(WHITE);
|
||||||
|
bgcolor(BLACK);
|
||||||
|
clrscr();
|
||||||
|
|
||||||
|
|
||||||
for(byte c:0..255) {
|
for(byte c:0..255) {
|
||||||
bgcolor(c);
|
bgcolor(c);
|
||||||
printf(" ++++++ ");
|
printf(" ++++++ ");
|
||||||
@ -823,7 +864,6 @@ void bitmap_320_x_240_1BPP() {
|
|||||||
vera_layer_mode_bitmap(0, (dword)0x00000, 320, 1);
|
vera_layer_mode_bitmap(0, (dword)0x00000, 320, 1);
|
||||||
|
|
||||||
vera_layer_mode_tile(1, 0x14000, 0x1F000, 128, 64, 8, 8, 1);
|
vera_layer_mode_tile(1, 0x14000, 0x1F000, 128, 64, 8, 8, 1);
|
||||||
vera_display_set_scale_none();
|
|
||||||
screenlayer(1);
|
screenlayer(1);
|
||||||
|
|
||||||
textcolor(WHITE);
|
textcolor(WHITE);
|
||||||
@ -874,6 +914,8 @@ void bitmap_320_x_240_1BPP() {
|
|||||||
|
|
||||||
void bitmap_640_x_480_1BPP() {
|
void bitmap_640_x_480_1BPP() {
|
||||||
|
|
||||||
|
vera_display_set_scale_none();
|
||||||
|
|
||||||
// Before we configure the bitmap pane into vera memory we need to re-arrange a few things!
|
// Before we configure the bitmap pane into vera memory we need to re-arrange a few things!
|
||||||
// It is better to load all in bank 0, but then there is an issue.
|
// It is better to load all in bank 0, but then there is an issue.
|
||||||
// So the default CX16 character set is located in bank 0, at address 0xF800.
|
// So the default CX16 character set is located in bank 0, at address 0xF800.
|
||||||
|
Loading…
Reference in New Issue
Block a user