New Plasma effect for TMS9918

Página 2/3
1 | | 3

Por jblang

Rookie (29)

imagem de jblang

07-09-2020, 21:14

FYI, for anyone interested, I've written an explanation of how the code for the plasma effect works: https://hackaday.io/project/159057-game-boards-for-rc2014/lo...

Por santiontanon

Paragon (1105)

imagem de santiontanon

08-09-2020, 11:21

Thanks for the explanation, it's a very nice read!!! (and very nice dithering pattern that I might steal for future projects hahaha). Just a quick note, at some point you note that the color table in the TMS9918 is 32 bytes. Notice that this is only true in "Screen 1" mode (the TMS9918 supports several video modes). Screen 1, which is the one you seem to have used is very limited color-wise but interesting since the color table is very small, and some times that helps in transferring data to the VDP very fast. However, if you are still toying with the effect, you could consider Screen 2, where the color table is actually 6KB, giving you more flexibility (although at the price of having to transfer more data to the VDP if you need to change colors at each frame)

Por jblang

Rookie (29)

imagem de jblang

08-09-2020, 16:08

Yes, I'm familiar with the other graphics modes. I am actually using Graphics II mode on my Mandelbrot Generator (picture here). I guess I should have mentioned that my statement only applies to Graphics I mode. I will probably update it when I have time. However, as you noted it would mean copying a lot more data (actually not only copying, but calculating) and I don't think it would be fast enough. Also, the layout of Graphics I mode makes the math really easy. To calculate name table entries, I can just add the sine values together without worrying about overflow because if the value overflows it just wraps back around on the gradient. I haven't thought about it very much but I am not sure the same would work on Graphics Mode II. The other problem would be the color resolution would only be better on the Y axis so it might make the plasma look very uneven.

Por NYYRIKKI

Enlighted (5609)

imagem de NYYRIKKI

09-09-2020, 09:07

jblang wrote:

Are these code snippets to change back to text mode supposed to work on MSX 1? I tried both and neither worked. The first one just hung and the second one caused the machine to halt.

Yes, they both should definitely work... Makes me wonder if you have moved stack to some weird place, disabled interrupts from VDP side, overrun system variable area or something like that?

Por jblang

Rookie (29)

imagem de jblang

09-09-2020, 23:42

Oh, yes I had moved the stack, which is common on CP/M programs. I didn't think about moving it back before making a BIOS call. Now that I have done that, it works correctly. Thanks for the hints!

Por Pac

Guardian (5924)

imagem de Pac

10-09-2020, 18:33

So time to look for a musician and release a new MSX demo with this great effect and new ones... Tongue I love demos!

Por santiontanon

Paragon (1105)

imagem de santiontanon

11-09-2020, 19:43

+1! more MSX demos!

Por thegeps

Hero (578)

imagem de thegeps

13-09-2020, 20:03

<3

Por tfh

Prophet (2472)

imagem de tfh

13-09-2020, 20:06

Indeed... there can never be enough demo's... So Santi & thegeps... When can we expect yours? Hannibal

Por thegeps

Hero (578)

imagem de thegeps

13-09-2020, 22:51

LoL, I love watching demos. About coding I rather prefere something I can use in games, and most of demos fx can't be really used...

Página 2/3
1 | | 3