Karoshi MSX Community
28 de Marzo de 2017, 08:38:18 am *
Bienvenido(a), Visitante. Por favor, ingresa o regístrate.

Ingresar con nombre de usuario, contraseña y duración de la sesión
Noticias:
 
   Inicio   Ayuda Buscar Calendario Ingresar Registrarse  
Páginas: [1]
  Imprimir  
Autor Tema: scr 4 with 4 colors in 8 pixels, 120 colors on the screen among 130.816, no CPU  (Leído 7863 veces)
0 Usuarios y 1 Visitante están viendo este tema.
ARTRAG
Visitante
« : 24 de Diciembre de 2006, 10:39:14 am »

No miracles, the idea is the same of dvik's BMP2105, but on MSX2.

do this:

Store in VRAM two alternate tilesets and swap them at each frame setting R3, R4 and R10 (no CPU load)

The blending of the two tilesets leads to

1) 4 colors on each line of 8 pixels
2) the mix of 16 colors leads to 120 unique mixed colors
3) the mix of 512 potential colors leads to 130.816 unique mixed colors

The main advantage is that the tiles swapping costs no CPU time,
so the trick can be used during the game and not only in the title screen.

Moreover this override the scr4 limit on the number of colors per line!

Someone willing to develop a tool ?  Wink

Does anyone less lazy than me know the settings for R3,R4,R10 to point to all the valid tile banks in VRAM ?

AFAIK in scr4 the PGT is ruled by R4 that means
 0 |0 |A16|A15|A14|A13| 1| 1

that implies the following addresses :

00000h
02000h
04000h
06000h
08000h
0A000h
...
while the PCT is ruled by R3 and R10 where
R3   = A13| 1| 1| 1| 1| 1| 1 | 1|
R10 = 0|...| 0|A16|A15|A14|

that implies the following addresses :

00000h
02000h
04000h
06000h
08000h
0A000h
...

The idea could be implemnted in the interrupt routine :

at ints odd set:
R4 = 3;
R3 = 255;
R10 = 0;
i.e.
PGT =0;
PCT = 2000h;

at ints even set:
R4 = 11;
R3 = 255;
R10 =1;
i.e.
PGT = 4000;
PCT = 6000h;

Easy, anyone willng to test this?
« Última modificación: 24 de Diciembre de 2006, 10:50:53 am por ARTRAG » En línea
MsxKun
Karoshi Forum's Guru
*******
Mensajes: 1554


Kimochi-ii


Ver Perfil WWW Email
« Respuesta #1 : 24 de Diciembre de 2006, 11:44:11 am »

Store in VRAM two alternate tilesets and swap them at each frame setting R3, R4 and R10 (no CPU load)

Yes, it's interesting. I wanted to test it a time ago, but never did  Tongue I wonder how can it look on screen. Maybe someday.
Merry Xmas!
En línea

--

Cindy Lauper She Bops!
jltursan
Karoshi Forum's Guru
*******
Mensajes: 1516


¿Que es lo que has aprendido hoy?


Ver Perfil WWW Email
« Respuesta #2 : 24 de Diciembre de 2006, 12:21:22 pm »

...but I'm afraid it will flicker too much for a game... Sad
En línea

Doom dee doom dee doom
ARTRAG
Visitante
« Respuesta #3 : 24 de Diciembre de 2006, 06:16:10 pm »

a small rom of example

http://ragozini.googlepages.com/test.rom

Here you have only the 15 MSX1  colors + 15 halftones (that anyway gives 30 colors and 3 colors per line).

In a real application this trick should go on interrupts
« Última modificación: 24 de Diciembre de 2006, 06:20:15 pm por ARTRAG » En línea
GuyveR800
Karoshi Newbie
*
Mensajes: 49


Ver Perfil WWW
« Respuesta #4 : 18 de Diciembre de 2009, 01:58:27 pm »

...but I'm afraid it will flicker too much for a game... Sad
See Menace for an example game that does a similar thing on MSX1. Obviously on MSX1 you can't take advantage of the VDP doing this for you.

In my opinion it flickers a lot Tongue
But too much? I don't know...

The flickering in Menace could be reduced by using smarter patterns with a dither raster, in stead of alternate lines... but I would probably prefer non-flickering graphics either way.
En línea

Founder of The New Image in 1991.
Founder of MSX Banzai! in 1997.
ARTRAG
Visitante
« Respuesta #5 : 19 de Diciembre de 2009, 09:44:43 am »

Maybe having an PC tool for tileset design (4 color per line etc etc) able to extract the vram data would boost msx2 applications using the trick.
En línea
GuyveR800
Karoshi Newbie
*
Mensajes: 49


Ver Perfil WWW
« Respuesta #6 : 20 de Diciembre de 2009, 11:39:36 pm »

You can use PaintShop Pro or Photoshop.
Just have 2 layers at 50% brightness and maintain the normal 2 colors per 8 pixels PER LAYER.
You can then use normal convertors for each layer and you're done.
En línea

Founder of The New Image in 1991.
Founder of MSX Banzai! in 1997.
Jon_Cortazar
Administrator
Karoshi Forum's God
********
Mensajes: 2777



Ver Perfil WWW Email
« Respuesta #7 : 21 de Diciembre de 2009, 09:19:03 am »

Clever trick, G  Wink
En línea

Jon Cortázar Abraido (aka El Viejo Archivero)
RELEVO Videogames
[Dioniso: La cafeína está haciendo su trabajo; yo espero hacer el mío.]
[pitpan: Me sigue pareciendo más productivo jugar al SNAIL MAZE que seguir esta discusión.]
ARTRAG
Visitante
« Respuesta #8 : 21 de Diciembre de 2009, 02:22:26 pm »

good one! I'll try and I'll let you know how it goes!
On msx 2 you can also swap on two palettes ...
En línea
mohai
Karoshi Fan
**
Mensajes: 78



Ver Perfil
« Respuesta #9 : 23 de Diciembre de 2009, 03:08:20 pm »

Just one idea:

For one frame, define a palette with some base colours (such as digital ones)  and for the other frame just grey tones, so you can control luma and chroma.
I think this way it is easyer to calculate color and make conversion.

Could it be a way to avoid flickering?
En línea
ARTRAG
Visitante
« Respuesta #10 : 23 de Diciembre de 2009, 11:13:54 pm »

For sure some combinations of colors will give less flickering than others, not sure anyway that your proposal is the best.
For sure the limit is when the picture or the object is moving.
In that case you have a blur effect on the borders of the picture.
En línea
GuyveR800
Karoshi Newbie
*
Mensajes: 49


Ver Perfil WWW
« Respuesta #11 : 05 de Enero de 2010, 12:45:29 pm »

Only when you move at a higher rate than half your flicker rate. So, flicker at 60Hz, move stuff at 30Hz.

The amount of perceived flicker between colors depends on their brightness ratio. It's easy to see on a MSX2 that COLOR15,1,1 interlaced gives a very flickery image, while COLOR15,12,12 is very calm.
En línea

Founder of The New Image in 1991.
Founder of MSX Banzai! in 1997.
Páginas: [1]
  Imprimir  
 
Ir a:  

Impulsado por MySQL Impulsado por PHP Powered by SMF 1.1.21 | SMF © 2013, Simple Machines XHTML 1.0 válido! CSS válido!