Jump to content
Jagware
Orion_

Read Modify Write

Recommended Posts

Orion_    1

GT Turbo m'en avait parlé et j'ai fini par trouver ou etait ce fameux bit de RMW, par contre quand je l'active ça me fait rien sur l'emulateur (ecran noir), et d'apres la description de la doc et les sources de l'emulateur virtual jaguar, ça ne fonctionne quand mode CRY16.

quelqu'un a t'il déja essayer d'activer ce fameux bit pour voir ce que ça fait ?

visiblement ça additionne les couleurs du sprite sur le line buffer, et ça fait une saturation ! ce qui est très interessant pour faire certain effet, quand on vois comment ça ram en essayant de faire ça même au GPU pixel par pixel :D

 

 

english

 

GT Turbo told me about it a few days ago, and I finally found were this bit should be activated (in the first phrase of the sprite object). I tried that on the emulator (PT) and all I got was a black screen. reading the doc and the source code of the Virtual Jaguar emulator, it seems that it only work in CRY16 mode, I tried both CRY16 and RGB16 but it doesn't work on PT, so, does anyone had already tried this blending mode ?

it seems to add the sprite pixel to the line buffer and saturate the color, so we have blending feature for free, and it can be great for some effect (and a lot faster than doing that per pixel even using the GPU, (yes, I tried .. ^^))

Share this post


Link to post
Share on other sites
GT Turbo    4
GT Turbo m'en avait parlé et j'ai fini par trouver ou etait ce fameux bit de RMW, par contre quand je l'active ça me fait rien sur l'emulateur (ecran noir), et d'apres la description de la doc et les sources de l'emulateur virtual jaguar, ça ne fonctionne quand mode CRY16.

quelqu'un a t'il déja essayer d'activer ce fameux bit pour voir ce que ça fait ?

visiblement ça additionne les couleurs du sprite sur le line buffer, et ça fait une saturation ! ce qui est très interessant pour faire certain effet, quand on vois comment ça ram en essayant de faire ça même au GPU pixel par pixel :D

 

Ca fonctionne en RVB, mais cela peut faire des effets bizzares, je l'utilises actuellement sur un jeu, je vais le retirer car en RVB ca fait pas pareil qu'un CRY (Supposition, du a la structure des points). Tu affiches tes sprites avec ce bit placé et tu n'as aucun sprite a l'écran ?

 

 

english

 

GT Turbo told me about it a few days ago, and I finally found were this bit should be activated (in the first phrase of the sprite object). I tried that on the emulator (PT) and all I got was a black screen. reading the doc and the source code of the Virtual Jaguar emulator, it seems that it only work in CRY16 mode, I tried both CRY16 and RGB16 but it doesn't work on PT, so, does anyone had already tried this blending mode ?

it seems to add the sprite pixel to the line buffer and saturate the color, so we have blending feature for free, and it can be great for some effect (and a lot faster than doing that per pixel even using the GPU, (yes, I tried .. ^^))

 

That run in RGB, i use it in a game, but i will kill it because in RGB that run not very good, like in CRY (I think, due to the pixel structure). Do you display it with RMV bit set and nothing on the screen ?

 

 

GT :poulpe:

 

(in the first phrase of the sprite object).

 

Orion, juste one question, you've done an error in writing ? Because th RMW bit is in the second phrase ;)

 

 

GT :poulpe:

Share this post


Link to post
Share on other sites
SebRmv    2

yes, I have used it for my blobs !!

 

and with Project Tempest 0.95, it works well but only if your object list begins with the **two** branch objects :blink:

I discovered this last night because I had a bug with my branch objects at the beginning. Before, my blobs did not display in PT 0.95 and now it works!

 

Seb

Share this post


Link to post
Share on other sites
Orion_    1

GT Turbo > yes sorry, in the second phrase =)

 

SebRmv > argh, so you already have done a blob effect :'(

Share this post


Link to post
Share on other sites
SebRmv    2

Sorry Orion for that :D

 

And actually, it will be the sample program given with my sprite manager...

 

Seb

 

Ok, if you want to see what you can achieve with the RMW flag,simply test this:

 

http://removers.atari.org/softs/archives/blobs.bin

 

Seb

Share this post


Link to post
Share on other sites
Orion_    1

nice effect SebRmv ;)

I'm a bit angry since I tried to achieve that effect a month ago per pixel using GPU and it was damn slow, I should have read more the atari doc to find out this feature ^^

anyway I will try to get it working on PT !

does anyone can send me or link me to where I can download the tga2cry.exe tool ?

thanks !

Share this post


Link to post
Share on other sites

Hi!

Not 100% sure about this, but thought to talk a bit about it anyway..:

 

I tried to do "flare effects" with the RMW flag quite some time ago, but i never got it to work properly... ie not as one would want it to... ie for example have a texture bitmap & add 3 light objects intop of it and it would saturate into a bright picture (with strange colors I know, due to CRY mode, but anyway)... Instead I found it doing "carry additions" so it never went to FF in intensity but to 00... (???) ...

 

I hope this is due to a mistake i made and not due to limitations in the OP...

But the OP is simpler than the blitter (thats for sure) and the blitter can do this verry nicely... (cf. gouroud shaded texturemapping on the atari 3D examples).

 

Im not sure if the OP just ADDs the values together... and carry if it has to... ie it would have to be FF/3 in intensity if 3 objects were to be added.. or it would saturate... this makes it kind of useless to have since you never know how menu objects that will overlap... (in general)..

 

BUT I hope I am wrong!... and if noone overproves me here I will test it again at some point and revist the code based on todays knowledge...

 

I also know that Doom uses this to do the "hit=red flash" effect... they set up a 1phrase "big" object (that is set to repeat=hole screen same color) ...and they just change this one single phrase, and the hole screen is changed in various red tones... (and al the colours in the bitmaps below get a red tone).. (this is what makes me beleive I have some errors in my code!.. it should work!)...

 

Offcourse, also AvP uses similar thing for the HUD.... hmm.. but now when i think of it I think they used the blitters "RMW" function... to add the green tone...

 

(Also be ware of the rmw object bug!)...

 

regards

/Symmetry of TNG

Share this post


Link to post
Share on other sites
Orion_    1
and with Project Tempest 0.95, it works well but only if your object list begins with the **two** branch objects :blink:

I added the 2 branch object (thank GT Turbo for the advices), but it still don't work in PT :/

I have 2 branch object, that point to the STOP object at the end of my list, the first branch is a_vde<VC and the second, a_vdb>VC.

and it seems to work at least with normal sprite in RGB16 since I use it in my little intro and GT Turbo tried it on the jaguar.

 

Perhaps use Removers one : http://removers.free.fr/softs/download.php

I don't have ocaml compiler sorry :D

if you have the tga2cry.exe and can send it to me (at my usual email address) that would be nice, thanks :)

Share this post


Link to post
Share on other sites
SebRmv    2
I added the 2 branch object (thank GT Turbo for the advices), but it still don't work in PT :/

I have 2 branch object, that point to the STOP object at the end of my list, the first branch is a_vde<VC and the second, a_vdb>VC.

and it seems to work at least with normal sprite in RGB16 since I use it in my little intro and GT Turbo tried it on the jaguar.

I don't have ocaml compiler sorry :D

if you have the tga2cry.exe and can send it to me (at my usual email address) that would be nice, thanks :)

 

I know I have still to get an executable for it.

But you can install ocaml (even on Windows with cygwin)

but the tricky thing is to install camlimages library

If you need help for this last part, I can help you

 

Seb

 

 

I think I have understood how it works, at least for the Y component (in CRY mode)

 

if you set RMW, the Y component is seen as a 8 bit signed value

which is added to the Y component in the linebuffer.

 

To have saturation, you then have to keep only positive values for Y (this is what I can do with my image converter)

 

I don't know if it answers (at least partially) to your questions Symmetry but I hope so :P

 

Seb

Share this post


Link to post
Share on other sites
Orion_    1
But you can install ocaml (even on Windows with cygwin)

mmh sorry I'm not gonna install a huge thing like cygwin with ocaml compiler just to compile this :D

Share this post


Link to post
Share on other sites

Nice Blobs demo SebRmv !!! =)

 

are that scaled bitmaps? ..

 

..and a Brownian motion simulation or what? ;)

 

 

Well for the blitter i understood it, yes intensity is a signed 7bit value... and as i understood it so are the cry colours.. ie 1 cry value are composed of two 3bit signed colour components and one signed 7bit intensity component.. (ie s3s3s7 (s=signed, #of bits)).

With the blitter properly set up additions will saturate to produce a binary value of %0111011101111111 for positive values.

 

I hope to god the OP does the same!... and SebRmv, if that is OP bitmap objects with just the rmw bit set (and the data all opsitive values) then it would apear so... (i must have made some mistake in the test code i made back when i experimented with it... Im pritty sure i know what... since the BG also needs to be signed... which it wasnt... and perhapps i cant use the bitmaps i choose for the blobs...)

 

..This is done with the "-glass" parameter in the tga2cry program atari created.. ( i know that... now)...

 

 

Will have to reopen my old x-files and finish that code ;P

 

regards

/Sym of TNG

Share this post


Link to post
Share on other sites
SebRmv    2
Nice Blobs demo SebRmv !!! =)

 

are that scaled bitmaps? ..

 

..and a Brownian motion simulation or what? ;)

Well for the blitter i understood it, yes intensity is a signed 7bit value... and as i understood it so are the cry colours.. ie 1 cry value are composed of two 3bit signed colour components and one signed 7bit intensity component.. (ie s3s3s7 (s=signed, #of bits)).

With the blitter properly set up additions will saturate to produce a binary value of %0111011101111111 for positive values.

 

I hope to god the OP does the same!... and SebRmv, if that is OP bitmap objects with just the rmw bit set (and the data all opsitive values) then it would apear so... (i must have made some mistake in the test code i made back when i experimented with it... Im pritty sure i know what... since the BG also needs to be signed... which it wasnt... and perhapps i cant use the bitmaps i choose for the blobs...)

 

..This is done with the "-glass" parameter in the tga2cry program atari created.. ( i know that... now)...

Will have to reopen my old x-files and finish that code ;P

 

regards

/Sym of TNG

 

no these are not scaled bitmaps

it is simple (not scaled) sprites simply with the RMW flag set :D and only positive values for Y

 

oh, now I see why you asked about scaled bitmaps

no, it is just different images

this little demo is the example program I will give with my sprite manager when it will be ready (I have just one little technical thing to complete at least)

 

Actually, I coded my own image converter (see the link few posts above) but I guess this is what the -glass flag of tga2cry gives (not sure however)

 

For the moves, it uses the pseudo random number generator I have posted in an other thread...

 

Seb

Share this post


Link to post
Share on other sites

>oh, now I see why you asked about scaled bitmaps

 

Well ...I have a dream... =) ...or had a dream... years ago... but It got stuck on the same thing I get stuck on now... that is OL building... I admit it! I suck at ObjectLists!.. =)

 

scaled transparent bitmaps + my 3D engine/rotator can ONLY mean one thing ;)

But it dint work since the rmw objects werent scaled and the additions "Carried over" creating black squares instead of a soft toned edge.... so that code got stuck in the archive...

 

 

I know that I soon have to take the bull by its horn and do a kick@$$ spriteengine (gpu+blitter managed, with scaled bitmaps that are correctly clipped to screen space and sortable in different orders)...

Since I have more dreams that depend on such a thing....

 

 

>but I guess this is what the -glass flag of tga2cry gives (not sure however)

 

as i understood it it makes the gfx signed ...the 2 colour vectors and the intensity vector... ..

Though ...Im not sure if it just makes it relative to $80 (iirc "eor #$80, that is the intensity) or if it takes care of the color vectors aswell...

 

 

>For the moves, it uses the pseudo random number generator I have posted in an other thread...

 

Well it lokked like Brownian motion to me ;) (ie exactly that, random particle motion)

 

The Jagscene soon have enough demo effects to make a MEGA demo.. yeeeyyy! :P

 

cheers

/Sym

Share this post


Link to post
Share on other sites
SebRmv    2

I know someone who has used extensively RMW mode for a hidden screen in a game :P

Share this post


Link to post
Share on other sites
Orion_    1

:whistling:

ok, since nobody seems to have found the hiddenscreen code, I give it here:

at the title screen press the current pad key: 1337C0#3

sorry for the little pretentious code :unsure:

the code use gpu+blitter+still some 68k code, and I'm at 50% of the vbl

If I translate the 68k code to gpu I'm sure it could be a lot faster =)

Share this post


Link to post
Share on other sites
SebRmv    2
did you find it before I say it ? :D

almost

I had it in disorder actually (and said it to MK who gave me the correction)

(Alpine Board rules :D)

Share this post


Link to post
Share on other sites
ovalbugmann    0

Thanks for your work on DiamJag, Orion_ and giving the code to the cool hidden screen also :) I never would have guessed that.

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×