MSX FUSION-C, Talking about bugs, errors, mistakes

Pagina 22/22
15 | 16 | 17 | 18 | 19 | 20 | 21 |

Van raymond

Champion (475)

afbeelding van raymond

23-12-2020, 18:26

Nice! Fusion-C is getting better and better!

Van ToriHino

Hero (627)

afbeelding van ToriHino

23-12-2020, 19:56

ericb59 wrote:

Hello all,

I know I know I have been promising Fusion-c version 1.3 for months now.
To forgive me, I want to tell you that the next version will now be able to compile ROMs (Firstly 32k and 48K) ... Big smile

Don't worry Wink Waiting patiently for the coming update...

Van raymond

Champion (475)

afbeelding van raymond

05-01-2021, 19:54

yustmenl wrote:

I finaly got a sprite on screen after some time outs in coding.
but is it possible in fusion c to use OR with sprites to get multi collored sprites?

I would like to know as well, did you receive an answer?

Van yustmenl

Rookie (27)

afbeelding van yustmenl

05-01-2021, 20:03

hope someone can help!

Van aoineko

Resident (52)

afbeelding van aoineko

06-01-2021, 01:21

This is not specific to Fusion-C, but if you know the address of your Sprite Attribute Table, it's very easy to use OR color with any VRAM write functions.

For your first sprite (number N), you need to copy 8 or 16 bytes of color (depending on the size of your sprite) to the address: SprtiteAttributeTable - 0x200 + 16 * N. One byte per sprite line. Color is a 4-bits palette index (0 to 15) stored in a byte.

The value -0x200 corresponds to the address offset of the Sprite Color Table in VRAM from the Sprite Attribute Table (this is a constant value for the Sprite Mode 2 of the MSX2).

For your second sprite (number M, with M > N), you must also copy 8 or 16 bytes of color to the address: SprtiteAttributeTable - 0x200 + 16 * M.

But this time, the color will be 0x40 + your 4-bit color palette index. The 0x40 (CC flag) indicates that you are using OR.

Place your two sprites at the same place... and voilà! Smile

See https://www.msx.org/wiki/The_OR_Color for more details on how to combine colors efficiently.

Pagina 22/22
15 | 16 | 17 | 18 | 19 | 20 | 21 |