DMA Flood Test.

Discussion in 'Discussion & Q&A' started by MarkeyJester, Apr 12, 2017.

  1. MarkeyJester

    MarkeyJester !%#@ Member

    Joined:
    Jun 27, 2009
    Messages:
    2,635
    I have written a ROM to test how much data can be transfered into VRAM, in a single V-blank frame.

    This has been tested so far on loads of different emulators, a variety of different hardware that I have including; two model 1's, a model 2 and a nomad, as well as some hardware tests from Natsumi and Flygon, who have tested on other respective machines/models.

    Here is a table of what we have so far.

    We don't have all models tested nor all emulators tested, this is where you guys come in. I've noticed some of you use emulators I do not, or have the ability to test on hardware revisions I do not have. If you'd like to contribute to the test, then download this ROM, and follow these instructions:

    When first turning on the machine, you should get something like this:

    [​IMG]

    There are four items at the top, you can select them by pressing up/down, once you have highlighted the option you wish to change, you can then press left/right to change it. The bottom three items are just information about the machine/emulator, this tells us if it's a Japanese machine, what rate it's running at (PAL/NTSC) and what the hardware version is.

    The options you can change are:
    1. DMA Size (I will explain further down).
    2. Use "STOP"? (if the "STOP" instruction should be used to wait for V-blank, or just an enless check loop).
    3. H-Resolution (The horizontal display size, this can be $20 (for 256 pixels) or $28 (for 320 pixels)).
    4. V-Resolution (The vertical display size, this can be $1C (for 224 pixels) or $1E (for 240 pixels), please note, this option will be forced to $1C and will be unchangable, if the machine is NTSC. Only PAL machines may change this option).
    What we are testing for here, is how much data we can transfer with DMA during V-blank, when the machine is under different resolutions/settings/models/rates/versions/etc.

    Take a look at the screenshot above, you'll see there is a nice big white section (this is the active display region). Outside of this region is what we'll call "V-blank" (even the boarders that are green/blue are technically part of V-blank in this test, as the VDP isn't busy at this point).

    Green = V-blank (doing nothing)
    Blue = V-blank (performing DMA)

    As you increase the DMA size, the blue will gradually expand at the bottom until it's completely covered, and if it's raised high enough, you should start to see it pop in from the top, like so:

    [​IMG]

    As you can see, when DMA transfering $13A6 bytes, it can do it all during V-blank, and that green section indicates that there is still a little bit of time left in V-blank.

    If you expand it even further until there's no green left, eventually the DMA transfer size will be more than the VDP can handle in V-blank, and the white section will turn red:

    [​IMG]

    This indicates that the DMA transfer did NOT finish until after V-blank had already ended.

    What I need you to do, is to increase this DMA size, until the screen starts to go red. You must pay careful attention though, the screen may "flicker" red/white. What I need is the very first instance where it starts flickering, but you'll need to give it a good five seconds to be sure there's no flickering, and I also need the very first instance where it is fully red, and not flickering.

    If it doesn't flicker, then just give me the instance where it goes fully red, and that'll do.

    You can tap left/right to increase/decrease the DMA size by 2.
    You can hold left/right to increase/decrease the DMA size continuously (the longer you hold, the faster it changes).
    You can hold "C" and hold left/right to increase/decrease the DMA size as a reasonable constant speed.

    I need the following information from you:
    1. The model (be it a Mega Drive 1, Mega Drive 2, Genesis 1, Genesis 2, Genesis 3, nomad, etc... or an emulator and its release version number).
    2. The region (be it PAL or NTSC).
    3. If it's a Japaneses console or not.
    4. The version number (displayed on the screen).
    5. What the supply voltage to your house is (if you know it).
    6. The plug voltage - you can find this on the back of the transformer block, here:
    [​IMG]
    I need to know what the DMA size was set to when it started flickering red, and what the DMA size was when it went fully red with no flickering. And this needs to be tested with; stop on/off, H-resolution set to $20/$28, and V-resolution set to $1C/$1E (PAL only for V-resolution).

    The DMA transfer is from 68k RAM, this is to avoid the chance of the cartridge effecting the speed, as some of you "may" have different flash carts that "may" differ in speed.
    • If you do not know any of the information, do NOT give me your "assumption", for example, if you do not know the supply voltage into your house, then tell me you "do not know". I want to keep this all scientific, and as much of a fair test as possible.
    • Some of this information may be useless (such as the voltage), and may not have an effect on the outcome, but I'm documenting this information anyway, just to be sure.
    • Also, please remove any addons connected to the Mega Drive (Mega CD, 32X, etc), while this too more than likely has no effect, again... I wanna keep it all a fair test as much as possible.
    • If you have a moded model that can switch between regions, then please let me know, and tell me what the "original" region was of that machine before the mod switch was placed in.
    • If you have any obscure models (including those of the ATGames models) then those are quite welcome for testing, just for the curiosity factor.
    • If the ROM shows up as fully red when first starting, then it was not downloaded and/or written to the flashcart properly, so please reflush/redownload and try again.
    • If you are using an emulator of some sort, then the boarders may not be visible, or they may only display a single colour. Don't worry, just find the instance the screen flickers/turns red.
    • If you change the resolution and it crashes/freezes, this is likely because the DMA size was too much for that resolution (68k was still in V-blank when the VDP triggered another V-blank interrupt). The only thing you can do in this situation, is switch off the machine, and restart (Do not press the soft reset button, this will just force the screen to blue, it doesn't do anything). You can avoid this crashing by reducing the DMA size to something reasonably small before changing the resolution.
    If you have any questions, feel free to ask. Some of the information I'm collecting from you might seem weird or from a technical point of view, "irrelevant", but I'm trying to keep this all scientific, and a fair test, and want to cover grounds without bumping into any unexpected results caused by such.

    Thank you all in advance, this information will be helpful for Mega Drive game developers.

    ------------------------------------

    P.S. an interesting case of irony... Gens Re-Recording v11a, and Gens GS V r7, both have pretty much perfect matching DMA transfer times on 50Hz, in relation to hardware. Very ironic considering the bad reputation Gens has dX
     
  2. Ashuro

    Ashuro Well-Known Member Member

    Joined:
    Sep 27, 2014
    Messages:
    513
    Location:
    France
    Fuck, MJ! You're crazy dude! :D :D
    Every time you post something, it's always an amazing thing!
    I like it!!!
     
  3. Calvin

    Calvin DreamCast Enthusiast with a GameCube Member

    Joined:
    Mar 1, 2014
    Messages:
    241
    Location:
    $C800
    MarkeyJester likes this.
  4. MarkeyJester

    MarkeyJester !%#@ Member

    Joined:
    Jun 27, 2009
    Messages:
    2,635
    That is some awesome news!

    Thank you very much, I can't wait to see the results! (Assuming it'll work on that system of course d=).
     
  5. sewer56lol

    sewer56lol Newcomer Member

    Joined:
    Aug 25, 2016
    Messages:
    15
    Location:
    United Kingdom
    Honestly, all I need to see is the name "MarkeyJester" and I immediately know I'm in for a treat which would completely blow my mind, thus what I am really seeing here is nothing short of that indeed - it would certainly be the one of very strong feat be to able to state that the curiosity factor is not strong in this one.

    While I don't do MD/GS stuff, I'm inexplicably waiting for the results, it'd be interesting to see memory benchmarks of such aged hardware :).
     
  6. GenesisDoes

    GenesisDoes Well-Known Member Member

    Joined:
    Jan 2, 2016
    Messages:
    108
    Location:
    Pittsburgh, PA
    From the current table, it doesn't look like anyone has run this test ROM on a real 60Hz NTSC Model 2 Genesis yet (mo'bo revision VA 1.8), so I'll run this on my Everdrive this weekend and report back with the results. Is it worth recording the mo'bo revision number for the machines used for the tests?
     
    MarkeyJester likes this.
  7. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,966
    Location:
    England
    I should find some spare time over the weekend (as it's a 4-day weekend, yay) and I will get back to you on my findings. I have an Asian modded Mega Drive.

    One question though, can I use the Everdrive cartridge I own to store and load the ROM from? Or does it have to be a blank cartridge with this ROM on only (not sure if that will have an effect on the outcomes it being an Everdrive)?
     
  8. MarkeyJester

    MarkeyJester !%#@ Member

    Joined:
    Jun 27, 2009
    Messages:
    2,635
    Oh, another thing that "might" be worth testing, is increasing the DMA size way passed the red screen, until the entire screen fills with blue.

    If you can do that, then we can work out the entire DMA size possible in an entire frame, as well as the size possible during active display.

    But I donno if it'll crash before it has the chance to reach its full potential. I "might" update the ROM at some point to include having display disabled. Just for timing purposes.
    I didn't want to have to unscrew my models yet again, for the 9th time. So I don't expect anyone else to. If you know the revision, or are willing to get it, then I'll place it on the table (Just as I have done with Flygon's), but I do not "expect" anyone to.

    So it is entirely up to you.
     
  9. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,966
    Location:
    England
    Must've missed that bit. Cheers!
     
  10. GenesisDoes

    GenesisDoes Well-Known Member Member

    Joined:
    Jan 2, 2016
    Messages:
    108
    Location:
    Pittsburgh, PA
    Results from the test on my machine attached as a quick spreadsheet.
     

    Attached Files:

    MarkeyJester likes this.
  11. MarkeyJester

    MarkeyJester !%#@ Member

    Joined:
    Jun 27, 2009
    Messages:
    2,635
    Awesome work! Thank you very much~

    I assume the Yes/No on the stop settings had no effect on your DMA size?
     
    RuthlessTheHooman likes this.
  12. GenesisDoes

    GenesisDoes Well-Known Member Member

    Joined:
    Jan 2, 2016
    Messages:
    108
    Location:
    Pittsburgh, PA
    The yes/no stop settings did not affect the DMA size; same value ranges regardless of setting.
     
  13. Natsumi

    Natsumi Markey's Member

    Joined:
    Oct 7, 2011
    Messages:
    635
    Location:
    Otter's lap
    OK so, got my hands on a 1988(?) JP Mega Drive (Version 0), lets see the results:

    20/1C: 17BC nostop, 17BE stop
    28/1C: 1D2C nostop, 1D2E stop

    Pretty unremarkable find.