Quantcast

Results 1 to 14 of 14

Thread: A Guide to the Graphics of the Mega Drive

  1. #1
    Mega Driver Hedgehog-in-TrainingMaster of Shinobi Gryson's Avatar
    Join Date
    Nov 2016
    Posts
    1,370
    Rep Power
    62

    Genesis A Guide to the Graphics of the Mega Drive



    I've put together an in-depth beginner-oriented guide to the VDP with a bunch of examples of graphical effects, for those of you who might be interested:

    https://rasterscroll.com/mdgraphics/

    Credit goes to Sik for feedback and corrections.

    I'm sure this won't be new information for some of you here, but I appreciate any comments to help improve it (especially if you catch any errors).

    Any other effects that I could discuss?

  2. #2
    Comrade as in friend. Master of Shinobi ComradeOj's Avatar
    Join Date
    Dec 2012
    Location
    New Mexico, USA
    Age
    26
    Posts
    1,441
    Rep Power
    62

    Default

    You could add a section about the direct color DMA trick. I didn't see it in your guide, but maybe I missed it.

    I made a simple game and also a demo using this function. Others have done some very impressive stuff with the color DMA trick as well.

    https://mode5.net/DMA_David.html

    https://mode5.net/dmaviewer.html
    Modded consoles:
    Master System (v7040) with s-video & direct AV out
    Model 1 with 10mhz overclock & halt switches
    Model 1 with 10mhz 68010
    Model 2 VA2.3 with unfiltered Mega Amp, & s-video
    Model 3 VA1 with compatibility fixes & s-video
    32X with s-video
    Visit my web site at www.mode5.net
    Or my collection of homebrew Genesis games, programs, and music on SEGA-16!

  3. #3
    Hedgehog-in-Training Hedgehog-in-TrainingSports Talker
    Join Date
    Oct 2015
    Posts
    41
    Rep Power
    0

    Default

    I've just read through the whole lot and you have done a great job. It's clear and easy to understand and the animated gif and pics add a lot to it. Well done.

  4. #4
    Mega Driver Hedgehog-in-TrainingMaster of Shinobi Gryson's Avatar
    Join Date
    Nov 2016
    Posts
    1,370
    Rep Power
    62

    Default

    Quote Originally Posted by ComradeOj View Post
    You could add a section about the direct color DMA trick. I didn't see it in your guide, but maybe I missed it.

    I made a simple game and also a demo using this function. Others have done some very impressive stuff with the color DMA trick as well.

    https://mode5.net/DMA_David.html

    https://mode5.net/dmaviewer.html
    Thanks for the suggestion. I didn't really know what to do with tricks like this that weren't actually used in commercial games, but it's an interesting and straightforward effect so I think it would be good to include.

    By the way, do you know if the direct color DMA trick is affected by hardware? When Jon Burton discusses it in this video, he said they had to include some sort of tuning method for it since "each piece of Sega hardware ran at a slightly different clock speed." I don't know what he's referring to, though.



    Quote Originally Posted by Edek View Post
    I've just read through the whole lot and you have done a great job. It's clear and easy to understand and the animated gif and pics add a lot to it. Well done.
    Thanks!

  5. #5
    Comrade as in friend. Master of Shinobi ComradeOj's Avatar
    Join Date
    Dec 2012
    Location
    New Mexico, USA
    Age
    26
    Posts
    1,441
    Rep Power
    62

    Default

    Quote Originally Posted by Gryson View Post
    By the way, do you know if the direct color DMA trick is affected by hardware? When Jon Burton discusses it in this video, he said they had to include some sort of tuning method for it since "each piece of Sega hardware ran at a slightly different clock speed." I don't know what he's referring to, though
    Thanks!
    I'm not an expert on this, but it seems like the implementation of the trick used these days works on most, if not all hardware.

    I have heard about the whole calibration issue when they were first experimenting with direct color DMA back in the day. I'm not sure if this is still a problem or not.

    The code I used with my direct color DMA experiments was based on work done by Chilly Willy. It has some code that seems to clear the FIFO buffer of the VDP and also do some synchronization with the VDP. This might have been missing in the original color DMA experiments, which necessitated manual calibration. Still, this is just my speculation.
    Modded consoles:
    Master System (v7040) with s-video & direct AV out
    Model 1 with 10mhz overclock & halt switches
    Model 1 with 10mhz 68010
    Model 2 VA2.3 with unfiltered Mega Amp, & s-video
    Model 3 VA1 with compatibility fixes & s-video
    32X with s-video
    Visit my web site at www.mode5.net
    Or my collection of homebrew Genesis games, programs, and music on SEGA-16!

  6. #6
    Hero of Algol
    Join Date
    Aug 2010
    Posts
    8,113
    Rep Power
    190

    Default

    Quote Originally Posted by Gryson View Post
    Any other effects that I could discuss?
    A few:
    - Background color #0 trick used to produce gradients such as in Shadow of the Beast II, Street Racer and others.
    - Sprite multiplexing which is used in Stone Protectors' snow effect. Some people also say that it was also used in Panorama Cotton but I've never checked that myself.
    - Tile animation: Sonic 3's Hydrocity Zone background parallax, Samurai Spirits' referee, Final Blow's referee, the rats running in the Battle Mania 2's train wheels without flickering, etc. The Jungle Book - uses it on the flames of the final stage (not present in the SNES version), Mickey Mania's first stage water, etc.
    - Procedural effects such as the fire pits in Mickey Mania.
    - Torus/Axelay effect such as in Mickey Mania's moose hunt, this Vectorman boss and in The Smurfs.
    - Sprites as additional background layers as in this Mickey Mania stage, Jim Power and in the last stage of Bari-Arm (if I'm not mistaken).
    - The 3D tunnel/Tube Panic effect as in The Lawnmower Man: https://youtu.be/zpGdWYwDNkk?t=2017.
    Last edited by Barone; 03-02-2021 at 11:39 PM.

  7. #7
    Hedgehog-in-Training Hedgehog-in-TrainingRoad Rasher
    Join Date
    Dec 2019
    Posts
    422
    Rep Power
    17

    Default

    You must spread some Reputation around before giving it to Gryson again.

    Really nice!!! So what about samples section (the Genesis reputation from some games)?

  8. #8
    Mega Driver Hedgehog-in-TrainingMaster of Shinobi Gryson's Avatar
    Join Date
    Nov 2016
    Posts
    1,370
    Rep Power
    62

    Default

    Quote Originally Posted by Barone View Post
    A few:
    Thanks for all of these! I'm not as familiar with some of these games as I should be.

    - Background color #0 trick used to produce gradients such as in Shadow of the Beast II, Street Racer and others.
    Is this just done by changing the background color mid-frame, every so many lines? If so, I think it can go in the palette swap section. It's an easy way to see how the effect works.

    - Sprite multiplexing which is used in Stone Protectors' snow effect. Some people also say that it was also used in Panorama Cotton but I've never checked that myself.
    Yeah, good suggestion - I haven't included anything related to mid-frame sprite table rewrites yet. There's also the Castlevania Bloodlines water reflection example. I haven't looked into it yet, so I'm still not 100% clear on what part of the table is being rewritten and how the sprite cache affects it (Sik discusses it here). It's next on my list.

    - Tile animation: Sonic 3's Hydrocity Zone background parallax, Samurai Spirits' referee, Final Blow's referee, the rats running in the Battle Mania 2's train wheels without flickering, etc. The Jungle Book - uses it on the flames of the final stage (not present in the SNES version), Mickey Mania's first stage water, etc.
    I do mention tile animation halfway down the page here in reference to Shinobi III (unless you're referring to something else) but the additional examples are great.

    - Sprites as additional background layers as in this Mickey Mania stage, Jim Power and in the last stage of Bari-Arm (if I'm not mistaken).
    I introduce this halfway down the page here for Shinobi III but your examples are much better.

    I will also look into the other examples you gave and consider where to put them. Thanks again.


    Quote Originally Posted by turboxray View Post
    Really nice!!! So what about samples section (the Genesis reputation from some games)?
    Thanks! Could you clarify what you mean by the Genesis reputation from some games?

  9. #9
    Raging in the Streets xelement5x's Avatar
    Join Date
    Feb 2011
    Location
    Southwest USA
    Age
    41
    Posts
    4,472
    Rep Power
    75

    Default

    This is a really cool read, thanks for putting it together!
    Quote Originally Posted by StarMist View Post
    A spine card is the hymen of a new game assuring its first owner that he is truly her one and only, and of a used game assuring its new owner that whilst she has been played with in the past that play has never been too careless or thorough.

  10. #10
    Hero of Algol
    Join Date
    Aug 2010
    Posts
    8,113
    Rep Power
    190

    Default

    Quote Originally Posted by Gryson View Post
    Is this just done by changing the background color mid-frame, every so many lines? If so, I think it can go in the palette swap section. It's an easy way to see how the effect works.
    Quote Originally Posted by tomaitheous View Post
    The last layer is the BG color #0 trick. You use an interrupt to change this color to produce a gradient down the screen (nothing can show behind it, not even the lowest priority sprites). Amiga games were notorious for using this color change trick, although it was usually more complex on the Amiga. In the demo scene, this was called "copper bars" - even if it wasn't on the Amiga and didn't use "copper" co-processor.

    Quote Originally Posted by Gryson View Post
    Yeah, good suggestion - I haven't included anything related to mid-frame sprite table rewrites yet. There's also the Castlevania Bloodlines water reflection example. I haven't looked into it yet, so I'm still not 100% clear on what part of the table is being rewritten and how the sprite cache affects it (Sik discusses it here). It's next on my list.
    I think Stone Protectors example is more interesting in how it is exploited to create a beautiful snow effect as if there were additional background layers being used or using an incredible amount of hardware sprites while in fact it's just using one or two hardware sprites for the whole thing.
    Fullscreen snow effects usually sucked on the Mega Drive when compared to the SNES ones, so that's a highlight IMO, that it showed it was possible to simulate heavy snow with fluid movement (unlike jerky awful Crude Buster port's snow effect).



    Quote Originally Posted by Gryson View Post
    I do mention tile animation halfway down the page here in reference to Shinobi III (unless you're referring to something else) but the additional examples are great.
    I hadn't notice that but I think those examples I cited explore some other aspects/usages.



    Quote Originally Posted by Gryson View Post
    I will also look into the other examples you gave and consider where to put them. Thanks again.
    Thanks.

    In the column scroll effects, I'd suggest including a sub-section for the 60 fps waterfall/lava effects, such as seen here:
    https://youtu.be/q7k2u7b2jXo?t=618
    https://youtu.be/mU32nE609bQ?t=1944
    https://youtu.be/rNLyuFQpySQ?t=1187



    Also, IDK in which category you would include the "predator" effect:
    https://youtu.be/QqgXYf32jrg?t=3217

  11. #11
    Hedgehog-in-Training Hedgehog-in-TrainingRoad Rasher
    Join Date
    Dec 2019
    Posts
    422
    Rep Power
    17

    Default

    Quote Originally Posted by Gryson View Post
    Thanks! Could you clarify what you mean by the Genesis reputation from some games?
    The garbleness you often hear in samples in Genesis games. It's not due to low sample rate or bit rate, but rather that the sample writes to the DAC are stalled for long pauses which causes large gaps in the output. The culprit is the vDMA, which when the z80 tries to read from rom - is paused. Normal audio jitter is usually not an issue because you can't really hear it, but these large gaps are much different than jitter. Some games, like altered beast, just pauses game logic so the sample output is not interrupted.

    Also, it would nice if you had an opinion section. Be it hindsight, but also comparative to other systems at the time (even if it is just logical speculation) - context is always nice (especially nes and sms). Maybe things they could have/should have added. Anyways, I like that you keep bringing things back around into the holistic perspective (re-iterating the trade-offs and limitations). It's easy for your reader to see all these things as just accumulative with no trade offs.

    This might be a little too technical/in-depth, but I always found it interesting that the original 68000 makes for poor 'fast' interrupt handler (ISRs). I've always speculated that the scroll tables were to help out in this respect, but what's weird is that there's no Y linescroll table. So if you want to do full screen Axeley effects, it has to be all interrupt driven. If you're doing that for every line, it's not exactly cheap. The minimal over head for the 68k overhead is like 50 cycles (though with jitter from instructions it can be more) for the call and 20 for the return. That doesn't include code for the routine itself and saving/restoring processor registers. I.e. it's an option but it does come at some cost.

    Side note: There are a couple other games that do mid screen color gradients via interrupt and changing BG color #0. There's a thread over at spritesmind sega dev forum that has some examples IIRC.

  12. #12
    Mega Driver Hedgehog-in-TrainingMaster of Shinobi Gryson's Avatar
    Join Date
    Nov 2016
    Posts
    1,370
    Rep Power
    62

    Default

    Update: Added a section on Sprite Raster Effects



    Link: https://rasterscroll.com/mdgraphics/...aster-effects/

    I looked at the Stone Protectors snow effect and the Castlevania Bloodlines stage 2 reflection and stage 6 warping effect.

    Quote Originally Posted by turboxray View Post
    The garbleness you often hear in samples in Genesis games. It's not due to low sample rate or bit rate, but rather that the sample writes to the DAC are stalled for long pauses which causes large gaps in the output. The culprit is the vDMA, which when the z80 tries to read from rom - is paused. Normal audio jitter is usually not an issue because you can't really hear it, but these large gaps are much different than jitter. Some games, like altered beast, just pauses game logic so the sample output is not interrupted.

    Also, it would nice if you had an opinion section. Be it hindsight, but also comparative to other systems at the time (even if it is just logical speculation) - context is always nice (especially nes and sms). Maybe things they could have/should have added. Anyways, I like that you keep bringing things back around into the holistic perspective (re-iterating the trade-offs and limitations). It's easy for your reader to see all these things as just accumulative with no trade offs.

    This might be a little too technical/in-depth, but I always found it interesting that the original 68000 makes for poor 'fast' interrupt handler (ISRs). I've always speculated that the scroll tables were to help out in this respect, but what's weird is that there's no Y linescroll table. So if you want to do full screen Axeley effects, it has to be all interrupt driven. If you're doing that for every line, it's not exactly cheap. The minimal over head for the 68k overhead is like 50 cycles (though with jitter from instructions it can be more) for the call and 20 for the return. That doesn't include code for the routine itself and saving/restoring processor registers. I.e. it's an option but it does come at some cost.

    Side note: There are a couple other games that do mid screen color gradients via interrupt and changing BG color #0. There's a thread over at spritesmind sega dev forum that has some examples IIRC.
    Thanks for the suggestions. I'm probably not going to do anything sound-related soon. I know a lot of people are interested in the comparative aspect as well, so eventually that is a point to expand into.

    The next 'effect' I'm going to look at is the racing game road effect done by changing vscroll mid-frame (not sure what to call this).

  13. #13
    Road Rasher
    Join Date
    Mar 2010
    Posts
    403
    Rep Power
    25

    Default

    Streets of Rage 2 pirate ship background tilting.
    AFAIK it's the smoothest of all MD library, it's not just column scroll.

  14. #14
    Mega Driver Hedgehog-in-TrainingMaster of Shinobi Gryson's Avatar
    Join Date
    Nov 2016
    Posts
    1,370
    Rep Power
    62

    Default

    The Streets of Rage 2 pirate ship is just regular tilting (of the sort seen at the bottom here for Gunstar Heroes).

    It combines column scroll with line scroll. It's not that nice of an example, though, because they didn't hide the leftmost column. If you play it on real hardware, you'll notice the column scrolling bug. They also didn't match the design of the leftmost and rightmost edges of the background plane, so when it tilts there's an obvious seam. I also recall that, before the background starts tilting, if you body slam an enemy to cause the screen to shake up and down, the leftmost column of the foreground plane will also show the bug.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •