#91224 - devmelon - Wed Jul 05, 2006 12:01 pm
Hello, I am in a bit of a rush so I'll make it short.
1) When you are in tiled modes (0-2), you can't write per-pixel rasterizing methods directly to VRAM 0x0600 0000?
2) I assume you could write the effect to tile data and then organize tiles on a background with higher priority to create the illusion of rasterizing on top of a tiled background?
Thanks in advance.
#91242 - Dwedit - Wed Jul 05, 2006 4:31 pm
Yep. You need to draw to the tiles, and change the tiles on the tilemap.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#91274 - ScottLininger - Wed Jul 05, 2006 10:16 pm
Code: |
2) I assume you could write the effect to tile data and then organize tiles on a background with higher priority to create the illusion of rasterizing on top of a tiled background? |
Yes. Create a BG layer that has a unique tile for each 8x8 grid on the screen, then write a single pixel into those tiles.
Once the tile map is set up correctly, it's no different from plotting a pixel into bitmap mode, though the math to identify the memory location for each individual pixel is more complicated, and since you can only address a 32-bit section of VRAM at a time, (which corresponds to 4 pixels worth of tile data) you have to do some bit masking to make it work.
I have an example of this from an old project I was playing with. Let me know if you'd like me to post it somewhere for you to see. (Sounds like you've already got the idea.)
:)
Scott
#91504 - DiscoStew - Fri Jul 07, 2006 4:31 pm
ScottLininger wrote: |
Code: | 2) I assume you could write the effect to tile data and then organize tiles on a background with higher priority to create the illusion of rasterizing on top of a tiled background? |
Yes. Create a BG layer that has a unique tile for each 8x8 grid on the screen, then write a single pixel into those tiles.
Once the tile map is set up correctly, it's no different from plotting a pixel into bitmap mode, though the math to identify the memory location for each individual pixel is more complicated, and since you can only address a 32-bit section of VRAM at a time, (which corresponds to 4 pixels worth of tile data) you have to do some bit masking to make it work.
I have an example of this from an old project I was playing with. Let me know if you'd like me to post it somewhere for you to see. (Sounds like you've already got the idea.)
:)
Scott |
Isn't it 16-bits into VRAM? Also along with that, depending on your color mode (either 4-bit or 8-bit tilecels), you will not only have to work with multiple pixels at the same time like ScottLininge said, but you are also limited to the palette, of which if it is 4-bit, then you have to designate each tile to use a certain palette and use only the colors available to that palette. If it isn't a very sophisticated rasterization involving a lot of colors (like only 15 colors), then it shouldn't be much of a problem.
_________________
DS - It's all about DiscoStew
#91508 - thegamefreak0134 - Fri Jul 07, 2006 5:27 pm
For the record, I believe Golden Sun used this tile technique, along with alpha blending, for it's particle system in the battle modes.
_________________
What if the hokey-pokey really is what it's all about?
[url=http:/www.darknovagames.com/index.php?action=recruit&clanid=1]Support Zeta on DarkNova![/url]
#91572 - ScottLininger - Fri Jul 07, 2006 11:58 pm
ScottLininger wrote: |
since you can only address a 32-bit section of VRAM at a time |
DiscoStew wrote: |
Isn't it 16-bits into VRAM? |
Right you are.
You mean what I know. ;)
-Scott
#91579 - DiscoStew - Sat Jul 08, 2006 12:33 am
ScottLininger wrote: |
ScottLininger wrote: | since you can only address a 32-bit section of VRAM at a time |
DiscoStew wrote: | Isn't it 16-bits into VRAM? |
Right you are.
You mean what I know. ;)
-Scott |
Yeah I do, just clearing it up for those that don't know. :)
_________________
DS - It's all about DiscoStew
#91676 - Quirky - Sat Jul 08, 2006 6:05 pm
I used this exact technique in a remake of Elite A...
It has a few advantages over "normal" bitmap mode (mode 4, for example), namely that you can use more layers - the scanner uses another layer and sprites -, the screen clearing takes 1/4 of the time, and you use less VRAM even with double buffering so sprites are not hindered.
The disadvantes are only 16 colours - I make this less noticeable by changing palettes every now and again - and the pixel writing code requires a bit of thought.
#91843 - devmelon - Mon Jul 10, 2006 3:26 am
Thanks everyone, it's cake already :)