I've been experimenting with writing multiple values to VSRAM in the HInt routine each line in order to set vertical scroll values for a number of two-tile columns.
In the example shown here, this is used to generate a fake transparent highlight bar by setting the vertical scroll value to select a specific brightness level per line. (In the Gens VDP Plane Explorer you can see the different versions of the SEGA logo.) If we are in two-tile scrolling mode, we can exploit this to tilt the highlight bar a little.
This example looks OK in emulators, I have also tested it on real hardware on a PAL MegaDrive 1. It would be great if other could try it on different machines and let me know it works or if it flickers Binary and source can be found in the attached ZIP file.
Thanks!
Writing multiple VSRAM values per scanline
Moderator: Stef
-
- Interested
- Posts: 17
- Joined: Sat Oct 13, 2018 10:08 pm
Writing multiple VSRAM values per scanline
- Attachments
-
- VScrollExperiments.zip
- (34.32 KiB) Downloaded 287 times
Re: Writing multiple VSRAM values per scanline
I'm not sure that I understood everything,
but I have played a few times with HInt, and I must say this rock stable image is great.
Bravo for this piece of work.
but I have played a few times with HInt, and I must say this rock stable image is great.
Bravo for this piece of work.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Writing multiple VSRAM values per scanline
Well done, very nice trick to do animated reflection
How much of the VSRAM table you transfer per line ? here you don't need to transfer the whole table (and i guess that's not possible) ?
How much of the VSRAM table you transfer per line ? here you don't need to transfer the whole table (and i guess that's not possible) ?
-
- Interested
- Posts: 17
- Joined: Sat Oct 13, 2018 10:08 pm
Re: Writing multiple VSRAM values per scanline
Thanks ob1 and Stef!
Yes, the transfer is limited to 6 values (the logo is 96 pixels wide). I had to use some inline assembly and a lot of trial and error to get there. I haven't done any cycle counting, but I don't think it can be much more.
One could try to move the HInt code to Sega.s, or maybe use an exactly timed loop instead of an interrupt (like on an Atari 2600).
Yes, the transfer is limited to 6 values (the logo is 96 pixels wide). I had to use some inline assembly and a lot of trial and error to get there. I haven't done any cycle counting, but I don't think it can be much more.
One could try to move the HInt code to Sega.s, or maybe use an exactly timed loop instead of an interrupt (like on an Atari 2600).