VDP Documentation Thingy

Discussion in 'Utilities' started by theocas, Aug 20, 2012.

Thread Status:
Not open for further replies.
  1. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    Cross posted from Sonic Retro


    [​IMG] [​IMG] [​IMG]


    (Click on a screenshot to see it from real hardware)


    I've been working on looking more into the VDP and how it works it's magic for the past year or so, first writing this documentation, so I thought it might be a good idea to write some examples on how the various effects work, and thus this thing came about. It basically describes how many of the basic features of the VDP can be used to create effects, as well as some tricks used in games, followed by an example of them. I tried my best to explain it, but some explanations may be off. The ROM shows examples of patterns and palettes, nametables, sprites, vertical/horizontal scrolling, shadow and highlight, as well as pattern reloading. (If your emulator or flashcart supports SRAM, the ROM will save the last page you read, allowing you to continue from it later.)


    I plan to expand this with other stuff later - so if anyone knows anything that I've missed, please tell me and I'll hope I'll be able to implement it in the next version.


    That's really all I have to say - if you can't download the ROM, here's a video:



    Download version 1.0:


    Download


    Last, but not least, I'd like to thank the following people for helping in this in some form:


    * Jorge, Tiido, MarkeyJester - answering questions about the VDP and/or MegaDrive over the years


    * Oerg for testing and feedback, as well as being the original person I wrote the VScroll deform effect with


    * Sonic Boom for the horizontal scroll art


    I look forward to hearing your lot's feedback about this.
     
  2. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    This is quite interesting, nice work :)


    Also, I have to agree with what other people said elsewhere: when I saw this for the first time I thought it was a Teletext page.
     
  3. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    On page 7, the pallet rotation on the first set shows four pxels that are miscolored.
     
  4. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    Haha, yeah. That was sorta what I was actually designing it after, so it seems I succeeded.

    Fixed. Download link is the same.
     
    Last edited by a moderator: Aug 21, 2012
  5. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    Alright. Now I have a question about the verticall deformation. I have no clue of what VRAM location loads that effect in Sonic 1.
     
  6. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    It's not that simple - the way this works is by altering the vertical scroll value every single scanline through the use of a horizontal interrupt - this leaves not a lot of free CPU time during active display, which means it would probably not be suitable for use in existing games.


    The base scroll value is added to a specific value pre-calculated for each scanline. But like I said, it uses quite a bit of CPU time.
     
  7. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    Ahh, nevermind then. Thanks anyway. This will be very usefull in the future.
     
  8. Sonic master

    Sonic master Well-Known Member Member

    Joined:
    Mar 27, 2010
    Messages:
    303
    Silly question but how do you go to the next page? I have tried every single button.
     
  9. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    You've got to hold start, and then press left or right at the same time.
     
  10. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    Could there be any possibility of a normal sprite using more than one pallet line without a limitation? Preferably at least 3 out of th 4?
     
  11. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    It's not that hard... just use multiple sprites, instead of one single one. Each sprite can be assigned a different palette line and art offset, but you can't use more than one palette line in a single sprite, due to how the format of the art works, as well as that's how the VDP was designed. Also, you shouldn't need that much colours to make something look good. The original Sonic games did it with 4 or so colours.


    Although the Sonic engine does support more than one palette line in a single 'sprite piece.'
     
Thread Status:
Not open for further replies.