Forum: Official GS Mode Selector Forum - Discuss GS Mode Selector in this forum.


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Like Tree11Likes

Thread: Frame buffer usage and progressive scan compatibility
  

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22
  1. #1 Frame buffer usage and progressive scan compatibility 
    No.47's Avatar
    No.47 is offline ...
    Join Date
    Aug 2010
    Location
    Tyskland
    Posts
    335
    Downloads
    0
    Uploads
    0
    Mentioned
    13 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    10
    Likes Received
    40
    Hey guys,

    lately I've been doing a lot of research and there are some things I'd like to share.
    Let's skip the part listing all the reasons why progressive vmodes are by far the best way to display PS2 games, especially 480p (and to a degree 576p for PAL releases without 60Hz mode). As you all know, there are two outstanding problems which hinder GSM's 480p compatibility, namely the black border issue and the pixelation issue. Both problems are caused by "abnormal" (but frequently applied) frame buffer usage. Here is what we've got so far:

    1. Black border issue (enforcing 480p results in a horizontally squished image with aspect ratio approx. 1:1)
    • Occurs when the game uses a frame buffer with reduced horizontal resolution, e.g. 512x448 (instead of the full resolution 640x448).
    • The horizontal scaling for 480p (1280x480 VCK units as opposed to 2560x480 VCK units for NTSC) doesn't fit because the MAGH value must be an integer.
    • Games with a 512x448 frame buffer and a built-in 480p mode (e.g. GoW1&2, RE4, SotC, SSX3) switch to 640x448 when the 480p mode is activated.
    • Current solution approaches: HEX-editing the frame buffer size to 640x448, which AFAIK in most cases causes many problems. Or finding a way to somehow get analog control over the scaling. While this would be great, it might be that this isn't possible at all because of hardware restrictions.

    2. Pixelation issue (enforcing 480p results in losing half the vertical resolution)
    • Occurs with games using the "field rendering" technique, i.e. only half-frames are rendered at a time (with 0.5px vertical offset between them).
    • The 480p mode enforced by the Xploder HDTV player doesn't suffer from pixelation as obviously, but from a jittering image.
    • Games which do field rendering for 480i and offer a 480p mode as well (e.g. GT4, T5) switch to a full-frame buffer when 480p is activated.
    • Current solution approaches: None - 480p not feasible for field rendering games?


    In these statements some key details are missing. The most important one is that - since (all?) PS2 games use double buffering - there isn't one "frame buffer", but at least two which need to be distinguished by their function:

    Back-buffer
    This is the draw buffer, i.e. the buffer used for rendering. It contains color, alpha and z-buffer data. The color data is copied to the front-buffer.

    Front-buffer
    This is the buffer used for displaying. It contains only the color data.

    When copying the "image" (the color data) from back- to front-buffer, it often gets scaled using the following tool:

    Bilinear filter
    This is a GS hardware feature. It can be used for scaling when copying from back- to front-buffer. Both down- and upscaling is possible.
    • Downscaling
      - gives FSAA (full-scene anti-aliasing)
    • Upscaling
      - used to adjust the front-buffer size


    When the image arrived at the front-buffer, it's the CRTC's turn:

    CRTC (Cathode Ray Tube Controller)
    This is the hardware responsible for the video signal. The data is read from the front buffer and converted to a (analog) video signal. The CRTC contains two read circuits which can be set in different ways, depending on the video mode (interlaced, non-interlaced). The CRTC also offers a free (i.e. without computional cost) flicker filter.

    Nearly all PS2 games use some sort of flicker filter. This is important here because different kinds of flicker filters imply different frame buffer usages (and vice versa):

    Flicker filter
    A flicker filter is used to reduce the flickering/jaggies that are inherent to all interlaced vmodes (most notably to field rendering games). Some games even have an option to enable/disable their flicker filter, sometimes called "soft/sharp" (e.g. FFXII, T4&5, DT Racer, some Sega Ages games). There are different kinds of flicker filters, which also can be combined:
    • CRTC line blending: this is basically a 2-sample blur filter (free)
    • GS bilinear filter: 2x vertical FSAA by downsampling a full-height back-buffer to a half-height front-buffer (not free)
    • [Motion blur: blending consecutive frames together]


    To come back to our two problems (namely the black border and the pixelation issue), let's take a closer look at how PS2 games typically set up their back- and front-buffers:

    Problem Nr.1: Back-buffer widths

    1. Full width (e.g. 640x448)
    • Everything fine here (no black border issue).

    2. Reduced width (e.g. 512x448)
    • The reduced back-buffer width has been advised by Sony to save VRAM; reducing the back-buffer means not only less color data, but also less alpha and z-buffer.
    • For 480i the front-buffer stays 512x448. Horizontal scaling is done with MAGH which saves VRAM and apparently looks better than upscaling with the bilinear filter.
    • Games with a built-in 480p mode:
      - When 480p is activated proper scaling with MAGH isn't possible, therefore the front-buffer is upscaled to 640x448 with the bilinear filter.
      - The real rendering resolution (i.e. the back-buffer) remains 512x448. Changing the back-buffer size would introduce lots of problems!
      - Often the color depth is reduced to 16bit to compensate for the increased front-buffer resolution.
    • Examples:
      - God of War 2 has a 512x448 back- and front-buffer in 480i mode. When activating the 480p mode the front-buffer is increased to 640x448, while the back-buffer stays 512x448. When activating the hidden "HD mode" (hold down L1, L2, L3, Square and Circle during game boot; if performed correctly, the "SCEA Presents" text appears in purple instead of white) the back-buffer is increased to 640x448 as well. While both "480p mode" and "480p HD mode" work without black border issue, the sharper look of the latter proofs the different render resolutions.
      - Jak 2 has a 512x416 back-buffer which is upscaled to a 640x448 front-buffer.
      - Hitman Bloodmoney doesn't upscale its front-buffer (512x448) - and suffers from the black border issue.
      - When activating some game's built-in 480p mode, one effective method to find out if the width of the back-buffer really increased (or if only the front-buffer is upscaled) is to count the "jaggies" in the vertical plane.


    Problem Nr.2: Rendering types

    1. Full-frame rendering
    • Characterized by a full-size front- and back-buffer (e.g. 640x448)
    • Fully 480p compatible!

    2. Field rendering
    • Characterized by a half-height front-buffer (e.g. 640x224) containing one field (i.e. a half-frame) with 0.5px vertical offset
    • The game must run at constant 60fps (fields per second), slowdowns result in very noticeable pixelation.
    • Field rendering effectively is a trick to achieve the full resolution while only rendering at half resolution.
    • Use of field rendering has been advised to the developers by early SDK versions. It has been designed specifically for interlaced displays and does not work well for progressive displays, since consecutive fields are rendered at a different points in time and hence don't fit together properly when there is movement (result: sawtooth effect).

    2.a) Half-height back-buffer (e.g. 640x224)
    • Back- and front-buffer change roles every 1/60 second ("page flipping")
    • A flicker filter is not possible in this case, which results in severe interlace artifacts.
    • True 480p is probably not feasible (changing rendering resolution causes lots of problems)!
    • Only a few games used a half-height back-buffer (mainly Japanese launch titles).
    • Examples: Virtua Fighter 4, Ridge Racer 5, Dead or Alive 2

    2.b) Full-size back-buffer (e.g. 640x448)
    • The game renders a 640x448 back-buffer which is downsampled to a 640x224 front-buffer (flicker filter).
    • While incompatible with GSM, Xploder and ps2force480p, it is quite possible to enforce 480p! See the next post!
    • The majority of field rendering games actually render a full-size back-buffer.
    • Examples: Virtua Fighter 4 Evolution, Soul Calibur 2 (480i mode), Jak & Daxter, Gran Turismo 3 (apparently some of the effects like smoke are rendered half-height), Devil May Cry series. The Snowblind Engine games, for example Baldurs Gate Dark Alliance, are a special case. They use a 1280x448 back-buffer downsampled to a 640x224 front-buffer, which gives 2x horizontal FSAA besides the flicker filter).


    That's it so far... keep in mind that the info posted above is by no means guaranteed to be true!
    If you find any errors or know something that should be added, let me know.
    Reply With Quote  

  2. #2  
    No.47's Avatar
    No.47 is offline ...
    Join Date
    Aug 2010
    Location
    Tyskland
    Posts
    335
    Downloads
    0
    Uploads
    0
    Mentioned
    13 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    10
    Likes Received
    40
    This is where it gets exciting... forcing a game using field rendering to 480p! As posted above, Virtua Fighter 4 Evolution is one of these games (note: it uses a full-size back-buffer!).

    Here is an image showing how VF4Evo looks de-interlaced in its purest form ("weave" method). Two consecutive fields are simply added together, which results in the sawtooth effect called "combing" when there is motion:

    weave.png

    Since the combing looks terrible the de-interlacers in most HDTVs use a different method called "blend". It blends consecutive fields, which solves the combing but results in "ghosting". By averaging the fields vertical resolution (and temporal resolution!) is lost:

    blend.png

    And this is how it looks 480p patched. No combing and ghosting, but 60 true progressive frames per second. The improvement in image quality is huge (unfortunately that's hard to capture with a still image):

    prog.png

    I enforced 480p via memory patches. Here are the codes for the Korean version (SLKA_25043):

    Code:
    //common codes (27)
    
    20100234 24110000
    20100244 24130001
    201004EC 24160002
    201004F4 000793C3
    201007D8 24840032
    20100784 00000000
    203A3C78 0C0E91D4
    203A3CD4 00101540
    203A4300 0C0E76A0
    203A4304 3C056071
    203A4308 34A52435
    203A430C 00052C38
    203A4310 34A57160
    203A4314 00052C38
    203A4318 34A53524
    203A431C 0C0E76A0
    203A4320 24040044
    203A4324 24050001
    203A4328 0C0E76A0
    203A432C 24040045
    203A4330 080E924D
    203A4334 0000202D
    203A47D0 3C020200
    203A47D8 00621025
    203A4904 24050000
    203A4928 0C0E90C0
    203A4970 00111D40
    
    //codes for 480P (2)
    
    20100238 24120050
    203A8010 248401B8
    Please note that I'm not the author of these codes, I found them at the following Japanese site: PlayStation2 Progressive Action Replay Code Page
    I converted the codes with Omniconvert (Action Replay V1 -> Raw) and replaced the first digit ("A") with "2", so they can be used both with PCSX2 and on a real PS2.

    On that site you can find 480p codes for quite a some games. While most are kinda obsolete thanks to GSM, some of them are for field rendering games which can't be forced to 480p with GSM, the Xploder HDTV player or ps2force480p. For example Devil May Cry 2 does field rendering - I would love to try the codes, but unfortunately I don't have the Korean version (SLKA_25012, SLKA_25013).

    I didn't have time yet to examine how exactly the codes are working and how generally applicable or game specific they are.
    Besides there are people much better at this than me
    Last edited by No.47; 03-01-2013 at 08:55 PM.
    SkyNet and RandQalan like this.
    Reply With Quote  

  3. #3  
    RandQalan's Avatar
    RandQalan is online now Wanabe Beta Tester
    Join Date
    May 2010
    Location
    USA
    Posts
    3,633
    Downloads
    17
    Uploads
    37
    Mentioned
    18 Post(s)
    Tagged
    4 Thread(s)
    Likes Given
    727
    Likes Received
    406
    Looks to me like we could maybe get some good 480p games if some of the majors participate to make the codes

    nice people to tag too

    V10 SCPH-50001 with Network adapter SCPH-10281 500 G HD
    PSP 3000 9G 6.20 PRO CFW Perm
    Unofficial FMCB v1.8C OPL self compiled HD and SMB preferred
    Is how all good gaming systems came to be
    Reply With Quote  

  4. #4  
    juggalomars's Avatar
    juggalomars is offline 1 of 12 Vita owners
    Join Date
    Jul 2010
    Location
    Lost
    Posts
    348
    Downloads
    2
    Uploads
    0
    Mentioned
    6 Post(s)
    Tagged
    2 Thread(s)
    Likes Given
    45
    Likes Received
    30
    Very interesting read and believe it or not, I never knew about that God of War 2 code before now. Hopefully this takes off, the images of VF4 really show a big difference and like you said, in action the difference is even bigger.
    Softmodded V12 & V3 (750gb HDD) FMCB1.8
    2x Softmodded xbox Ndure1.1 (40GB HDD)
    PSP 3000 6.20 PRO-C
    4.3 Softmodded Wii w/ DML
    Reply With Quote  

  5. #5  
    No.47's Avatar
    No.47 is offline ...
    Join Date
    Aug 2010
    Location
    Tyskland
    Posts
    335
    Downloads
    0
    Uploads
    0
    Mentioned
    13 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    10
    Likes Received
    40
    Quote Originally Posted by RandQalan View Post
    nice people to tag too
    Well, with three of them being GSM devs and the fourth having released some game-specific 480p hacks, the choice was kinda obvious
    I thought about tagging dlanor as well, but he hasn't been active here for a long time so I assume he's pretty busy, which I respect.

    Quote Originally Posted by juggalomars View Post
    Very interesting read
    Thanks!

    I never knew about that God of War 2 code before now.
    You probably didn't miss too much. It's more of a gimmick, but served well to prove my point.
    But I guess discovering such things is always exciting: Recently I read that Sega Rally 2 for the Dreamcast had a hidden 60fps mode activated via cheats. Now if I had a Dreamcast I would love that
    Reply With Quote  

  6. #6  
    reprep is offline Developer
    Join Date
    Mar 2011
    Posts
    221
    Downloads
    1
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    3 Thread(s)
    Likes Given
    8
    Likes Received
    35
    Baldurs Gate Dark Alliance is interesting. if a cheat code for 720p can be found, it might be possible to fully use the 1280 x 448 resolution in 720p mode with upper and lower black borders. my samsung can get rid of upper and lower black borders (but not left and right ones) by scaling, so it would be a good show.

    also Mortal Kombat Armageddon has an unusual back buffer too if i am not wrong.
    Please contact me if you can make a PS2 VGA cable with SoG stripping. All costs will be covered by me.
    Reply With Quote  

  7. #7  
    SP193's Avatar
    SP193 is offline The fallen spartan...
    Join Date
    May 2009
    Location
    シンガポール
    Posts
    1,943
    Downloads
    0
    Uploads
    0
    Mentioned
    14 Post(s)
    Tagged
    3 Thread(s)
    Likes Given
    33
    Likes Received
    208
    Ah yes, finally a nice thread for containing all the discussion on the problems with using the 480P mode.

    Honestly speaking, I don't actually believe that it's impossible to use 480P mode with the field-rendering, half-pixel offset technique. Unless I either remembered this incorrectly or I have misled myself, the Sony documents stated that it will still work... although it may cause some slight blurring in 480P (Or perhaps it was some other side-effect, but I remember that it certainly won't lose half the screen!).

    The purpose of using such a technique is to improve the image quality when using interlaced NTSC/PAL.

    I don't actually know why GSM causes such games to stop rendering one of their frame buffers (Using the half-pixel offset rendering technique requires two buffers, where each one will contain alternating horizontal scan lines of the screen)... but it may be related to how the content of the registers is being calculated and replaced. (Remember: This is a speculation on my end!)
    Last edited by SP193; 03-02-2013 at 10:25 AM. Reason: The name of this technique is called the "half-pixel offset" technique, if I'm not wrong.
    Unmodified SCPH-77006 with SM 3.6
    SCPH-39006 with M-chip modchip, SCPH-10281 NA and refurb Seagate 80GB HDD
    SCPH-10000 v1.00 with SCPH-10190 PCMCIA NA and SCPH-20400 HDD unit
    PS2ESDL v0.823B

    やっほー 汗がひかる♪
    Reply With Quote  

  8. #8  
    doctorxyz's Avatar
    doctorxyz is offline I'm just a modest sorcerer's apprentice!
    Join Date
    May 2007
    Posts
    1,090
    Downloads
    2
    Uploads
    0
    Mentioned
    4 Post(s)
    Tagged
    7 Thread(s)
    Likes Given
    123
    Likes Received
    204
    Quote Originally Posted by No.47 View Post
    - God of War 2 has a 512x448 back- and front-buffer in 480i mode. When activating the 480p mode the front-buffer is increased to 640x448, while the back-buffer stays 512x448. When activating the hidden "HD mode" (hold down L1, L2, L3, Square and Circle during game boot; if performed correctly, the "SCEA Presents" text appears in purple instead of white) the back-buffer is increased to 640x448 as well. While both "480p mode" and "480p HD mode" work without black border issue, the sharper look of the latter proofs the different render resolutions.
    No.47,

    Great thread, great research, nice discoveries!!! You're very good on reporting and showing what you've learned!

    Since I'm a human being too, Today I've found some time to play GoW2 and test this hidden "480P HD mode" combo ;-)

    Well, now I must find some free night hours to study what you've written here... But there are other priorities... For instance, I'm still having bad time when IGR is called by OPL_GSM... This is still resulting on BSOD/no signal/freezing issue.

    Keep up your good work!

    See u,
    Last edited by doctorxyz; 03-02-2013 at 10:36 AM. Reason: typos, spacing, punctuation, etc.
    doctorxyz's PS2 & PS3 stuff: (http://psx-scene.com/forums/f257/doctorxyzs-ps2-ps3-stuff-101348/)
    Reply With Quote  

  9. #9  
    doctorxyz's Avatar
    doctorxyz is offline I'm just a modest sorcerer's apprentice!
    Join Date
    May 2007
    Posts
    1,090
    Downloads
    2
    Uploads
    0
    Mentioned
    4 Post(s)
    Tagged
    7 Thread(s)
    Likes Given
    123
    Likes Received
    204
    Quote Originally Posted by SP193 View Post
    Ah yes, finally a nice thread for containing all the discussion on the problems with using the 480P mode.
    Agreed!

    Quote Originally Posted by SP193 View Post
    Honestly speaking, I don't actually believe that it's impossible to use 480P mode with the field-rendering, half-pixel offset technique. Unless I either remembered this incorrectly or I have misled myself, the Sony documents stated that it will still work... although it may cause some slight blurring in 480P (Or perhaps it was some other side-effect, but I remember that it certainly won't lose half the screen!).

    The purpose of using such a technique is to improve the image quality when using interlaced NTSC/PAL.

    I don't actually know why GSM causes such games to stop rendering one of their frame buffers (Using the half-pixel offset rendering technique requires two buffers, where each one will contain alternating horizontal scan lines of the screen)... but it may be related to how the content of the registers is being calculated and replaced. (Remember: This is a speculation on my end!)
    This is the best speculation so far. :-D
    The name of this technique is "half-pixel offset", you're right!
    Maybe we should not only "play" with other GS registers but also agressive patch on some sce funcs (to change the way buffers and info are calculated and stored) in order to make a better job than currently Xploder HDTV Player does on 480p...
    Last edited by doctorxyz; 03-02-2013 at 10:43 AM. Reason: more info
    doctorxyz's PS2 & PS3 stuff: (http://psx-scene.com/forums/f257/doctorxyzs-ps2-ps3-stuff-101348/)
    Reply With Quote  

  10. #10  
    No.47's Avatar
    No.47 is offline ...
    Join Date
    Aug 2010
    Location
    Tyskland
    Posts
    335
    Downloads
    0
    Uploads
    0
    Mentioned
    13 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    10
    Likes Received
    40
    Thanks for the kind words, guys

    Quote Originally Posted by reprep View Post
    Baldurs Gate Dark Alliance is interesting. if a cheat code for 720p can be found, it might be possible to fully use the 1280 x 448 resolution in 720p mode with upper and lower black borders.
    I thought about that, too. But most probably it wouldn't work because of insufficient VRAM (two 1280x448 buffer & textures)... what should be possible though is true 480p with 2x horizontal FSAA (maybe the color depth would need to be degraded to 16bit).

    Quote Originally Posted by SP193 View Post
    I don't actually believe that it's impossible to use 480P mode with the field-rendering, half-pixel offset technique.
    I assume by "field-rendering, half-pixel offset" technique you mean the game type described under 2.a) (half-height back-buffer)? Since field-rendering games using a full back-buffer are proven to be "kinda 480p compatible" by the VF4Evo example.

    Here's my point of view:
    - "Field-rendering" implies "(half-)pixel offset", even for games with a full back-buffer. So "field-rendering" actually really means to render one field at a time, no matter if the field is supersampled or not. In the supersampling case the necessary field offset could be achieved in two ways: Either rendering with an offset or introducing an offset later while downsampling with the bilinear filter. To me the first seems more reasonable, but that's only speculation of course!
    - Regarding field-rendering games with a half-height back-buffer: Even if it's technically possible to output a 480p signal without dropping any image data, it would never be "true 480p": Every single frame would consist of two interleaved images rendered at different points in time, it would look like a real progressive frame only if there is no movement. "True 480p" for those games would require patching the game to render a full back-buffer (which isn't feasible).

    Unless I either remembered this incorrectly or I have misled myself, the Sony documents stated that it will still work... although it may cause some slight blurring in 480P (Or perhaps it was some other side-effect, but I remember that it certainly won't lose half the screen!).

    [...]

    I don't actually know why GSM causes such games to stop rendering one of their frame buffers
    It seems that GSM "doesn't follow the page flipping" so to speak. It doesn't interfere with the rendering but only reads one buffer, which contains a half-frame that GSM then upscales. The Xploder HDTV player on the other hand seems to "follow the page flipping", yet still shows each half-frame upscaled as "progressive frame" (instead of mixing both buffers together), which results in the jittering image because of the vertical offset.

    Quote Originally Posted by doctorxyz View Post
    Since I'm a human being too, Today I've found some time to play GoW2 and test this hidden "480P HD mode" combo ;-)

    Well, now I must find some free night hours to study what you've written here... But there are other priorities... For instance, I'm still having bad time when IGR is called by OPL_GSM... This is still resulting on BSOD/no signal/freezing issue.
    That's great! I need to free some time for gaming as well, has been long since the last time...
    I wish you good luck fixing the IGR problem!
    doctorxyz likes this.
    Reply With Quote  

Page 1 of 3 1 2 3 LastLast
Tags for this Thread

View Tag Cloud

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