Problem with MSXBIOS.H in MSX-c

Page 3/5
1 | 2 | | 4 | 5

By sp4

Master (214)

sp4's picture

06-11-2015, 01:06

That manual is in japanease, I can't read that.
How can I do for declare a sprite?

By anonymous

incognito ergo sum (116)

anonymous's picture

06-11-2015, 02:50

sp4 wrote:

That manual is in japanease, I can't read that.

That's why I'm little by little writing the Relearning MSX articles.

sp4 wrote:

How can I do for declare a sprite?

It's very similar to defining them in BASIC. This is from one of my test programs:

char    spr0Pat[] = { 0x18, 0x7e, 0x7e, 0xff, 0xff, 0x7e, 0x7e, 0x18 };
char    spr0Col[] = { 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f };

#define SCREEN4 (TINY)4

VOID    doSetup()
{
        ginit();                /* Initialize graphic subsystem */
        color((TINY)15, (TINY)0, (TINY)0);
        screen(SCREEN4);
        inispr((TINY)0);        /* 8x8 sprites, non expanded    */
        sprite((TINY)0, spr0Pat);
        colspr((TINY)0, spr0Col);
}

Some quick explanations:

- inispr() initializes the sprites: 0 = 8x8, 1 = 8x8 (expanded), 2 = 16x16, 3 = 16x16 (expanded)

- sprite() defines the pattern (shape) of the sprite. The first parameters is the pattern number and the second parameter is a pointer to a character array (8 bytes for 8x8 sprites, 32 bytes for 16x16)

- colspr() defines the colors for each line of the sprite (8 bytes for 8x8 sprites, 16 bytes for 16x16)

Please try and post your questions here whenever possible. I can't always reply to private messages on Facebook, and there are other people here who can help as well.

By sp4

Master (214)

sp4's picture

06-11-2015, 13:52

I made as like you told me but I'm unable to write the "[" and the "]" with ted.com.
If I press shift + alt gr + è don't appair "[" and "]" .
Why please?
Nobody can help me?

By sp4

Master (214)

sp4's picture

06-11-2015, 14:47

Problem resolved with "Input Text".
Now if I run the xtetris.com I obtained the follow image of the screen al your left:

By sp4

Master (214)

sp4's picture

06-11-2015, 14:48

By anonymous

incognito ergo sum (116)

anonymous's picture

06-11-2015, 15:03

sp4 wrote:

I made as like you told me but I'm unable to write the "[" and the "]" with ted.com.
If I press shift + alt gr + è don't appair "[" and "]" .
Why please?
Nobody can help me?

These problems are related to the keyboard layout in the emulator. I'm glad to read that you managed to get around that.

By anonymous

incognito ergo sum (116)

anonymous's picture

06-11-2015, 15:05

sp4 wrote:

xtetris

Can't see the image. Can you post it somewhere that doesn't require registration to view?

By sp4

Master (214)

sp4's picture

06-11-2015, 15:19

Now you can open the image!

By Sylvester

Hero (555)

Sylvester's picture

06-11-2015, 15:28

Still need to login to see the image, maybe use a free version like http://postimage.org/ for posting images?

And please don't say "Nobody can help me?", because I see lots of people helping you in this thread, just have some patience.

By sp4

Master (214)

sp4's picture

06-11-2015, 16:44

Now there is the immage of my tetris:

xtetris

Page 3/5
1 | 2 | | 4 | 5