Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:26 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : BLIT

Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 12:05pm 01 Jun 2012
Copy link to clipboard 
Print this post

I thought that I would start a new thread as the colour logo one was getting off topic...

  Nick said  Can I suggest a software Blitter command to make moving areas of the screen around faster and easier than what BASIC currently can do?

Example:

BLIT (X1,Y1),WIDTH,HEIGHT TO (X2,Y2),MASK

X1,Y1 = Top left corner of chosen box area to copy
X2,Y2 = Top left corner of new box area
WIDTH = Width of box
HEIGHT = Height of box
MASK = Operand for logical masking and manipulation of bits. Leave out for none.


This is doable. What specifically should the MASK parameter do?

Geoff


Geoff Graham - http://geoffg.net
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 01:07pm 01 Jun 2012
Copy link to clipboard 
Print this post

Similar to what you have with the print command. Maybe options to do logical operations to invert but what would be really useful is an exclude.

Exclude a certain colour or just colour zero.

Maybe just an option to treat colour zero as a transparent colour during the blit?

Nick
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 01:22am 02 Jun 2012
Copy link to clipboard 
Print this post

  Geoffg said  
This is doable. What specifically should the MASK parameter do?
Geoff

Flashing a screen area on and off would be handy too - for control applications and games.
Greg
 
Gadget
Regular Member

Joined: 22/06/2011
Location: Australia
Posts: 70
Posted: 01:31pm 02 Jun 2012
Copy link to clipboard 
Print this post

Hi

May I suggest using a similar means that GeeWizzBasic used.
GET (x1,y1)-(x2,y2),array name to capture a portion of the screen to an array.
and to draw the image to the screen
PUT(x,y),array,[,action verb]
where action verb is AND, OR & XOR

the get and put could be changed to other commands.

I remember using this with the XOR command to allow an image to move across a background, kind of like a sprite.

Anyways thats my 20c worth.

Terry
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 02:07pm 02 Jun 2012
Copy link to clipboard 
Print this post

  Gadget said  May I suggest using a similar means that GeeWizzBasic used.
GET (x1,y1)-(x2,y2),array name to capture a portion of the screen to an array.
and to draw the image to the screen
PUT(x,y),array,[,action verb]
where action verb is AND, OR & XOR
Terry


That will work but it does use array space. I was thinking of something faster that didn't deal with array variable storage slow downs.

The idea is to achieve maximum transfer speed of screen data without utilizing any other memnory of the system.

If you want to do a rapid invert of a section or scroll a small area of the screen, BLIT would do it without utilizing any additional memory and do it faster because of it.

Nick
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 07:52pm 02 Jun 2012
Copy link to clipboard 
Print this post

Since the colour Maximite it going to have three separate color maps to cater for the Red, Green and Blue component of each pixel, that means 3 BLITS have to be done to move the data, right?

If that is correct, then why not have an option to choose which combination of the 3 maps get BLIT'ed?

For example...

BLIT (X1,Y1),WIDTH,HEIGHT TO (X2,Y2),RGB,MASK

would do all 3 maps.

BLIT (X1,Y1),WIDTH,HEIGHT TO (X2,Y2),RG,MASK

would do just the red and green.

BLIT (X1,Y1),WIDTH,HEIGHT TO (X2,Y2),B,MASK

would only do the blue.

The benefits are:

1) speed - if there is an area that only uses a color of 1 or 2 maps

2) some neat effects can be had.. don't know if it's practical.. but I can think of some uses in games that use multiple overlayed color maps or even parallax scrolling.

We can take this further and add an option to also move individual BLIT's from one colour map to another (large flashing areas of color in a single command).

NickEdited by Nick 2012-06-04
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024