Need help! TakaIsSilly, are you here? :)

Hi!

Tryed to wrote simple gfx code with usage of bitmap functions. But got nothing.

Here is the code:

void main(void)

{

int i;

slInitSystem(TV_320x224, NULL, 1) ;

slInitBitMap(bmNBG0, BM_512x256, VDP2_VRAM_B1);

slPrint("just a circle", slLocate(1,1));

for (i = 0;i <= 250; i++){

slBMCircle(100, 100, 50, i);

}

while(1){

slSynch();

}

}

This code gives only garbage on screen and not the circle itself.

How to do it propertly?
 
By the way. Got some result. But seems that need to setup palette somehow. This code have only 2 colors (blue and white):

void main(void)

{

int x;

int c;

slInitSystem(TV_320x224, NULL, 1) ;

slInitBitMap(bmNBG0, BM_512x256, VDP2_VRAM_A0);

ClsFast(); // hehe, just fills VRAM_A0 with 0x00 (really get rid of garbage)

slBitMapBase(0, 0);

x = 1;

for (c = 0; c <= 256; c++){

slBMPset(x, 100, c); // c is color, but we see only white and blue pixels...

x += 1;

}

while(1){

slSynch();

}

}

int ClsFast(){

int z;

Uint8 *ASCITile;

ASCITile = (Uint8 *)( VDP2_VRAM_A0 );

for(z = 0; z <= 0x10000; z++) *(ASCITile++) = 0x00;

}
 
Back
Top