MSXPad - TPSET (Development Foros MSX)MSX Resource Center            
                       
English Nederlands Espa�ol Portugu�s Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 38 invitados y 4 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - MSXPad - TPSET

Autor

MSXPad - TPSET

Snatcher-br
msx friend
Mensajes: 6
Publicado: Mayo 19 2004, 06:18   
Hi to all,

I'm traing make a little game for MSX 2 in screen 5, using Pascal (MSXPad).

I don't know how I can set the TPSET in Pasca.l I'm using the Kari Lammassaari libraries and exit a function to copy portions in VRAM that r implemeted the logical copy .. I tried this one.. but don't work.

can anyone here give a help with this ??

thx


SLotman
msx professional
Mensajes: 561
Publicado: Mayo 19 2004, 07:43   
On MSXPad, start a Game Project.

then to make a VRAM->VRAM copy with logical operation, use:

CopyL(X1,Y1,X2,Y2,SrcPage,DestX,DestY,DestPage:integer; LogOp:byte);

where you have LogOP just replace it with TPSET (or 8 if you prefer using numbers)


Snatcher-br
msx friend
Mensajes: 6
Publicado: Mayo 19 2004, 14:02   
Hi Slotman
well .. are the LogOp the color of the TPSET ???
if my trasparecy color is black that r color 0 of my palette, i'll use the copy command like this ??

CopyL(1,1,2,2,0,10,10,1, 0 );

thanks

SLotman
msx professional
Mensajes: 561
Publicado: Mayo 20 2004, 13:23   
On MSX the transparent color is allways zero, no matter if you are in Basic, ASM or Pascal =)
LogOp is the Logical Operation performed, this case TPSET. Could be XOR, OR, AND, NOT.... each one has it's own value. Try passing diferent values, like 0, 1,2 and see the differences between the copies.


SLotman
msx professional
Mensajes: 561
Publicado: Mayo 20 2004, 13:34   
Lets make it even easier:

Imagine you have this rectangle drawn on page 1 (the outline color 15, the interior color 0):

(1,1)
==============
|.............................|
|.............................|
|.............................|
|.............................|
==============
...............................(25,15)

And you want it to appear on page 0 at 100,100 and transparent (not drawing everything with palette color 0), the command should be:

CopyL(1,1,25,15,1,100,100,0,TPSET);

(remember: CopyL(X1,Y1,X2,Y2,SrcPage,DestX,DestY,DestPage:integer; LogOp:byte)

The same command in basic would be:

Copy(1,1)-(25,15),1 to (100,100),0,TPSET


Understand now?

Now change TPSET with 0, and color 0 will be copied as well - it will work like a normal copy command, no logical operation will be performed.

Now you can replace it with:

0 - Overwrite
1 - AND operation
2 - OR
3 - XOR
4 - NOT
8 - TPSET (already defined in MSX.INC, that's why you can write TPSET in the command without any problem)
9 - TAND
10 - TOR
11 - TXOR
12 - TNOT

Try these values and see for yourself the different copy options... some are very usefull, like using NOT to draw menu bars =)
 
 







(c) 1994 - 2009 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation