forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SMODE1 question

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
uufyugi



Joined: 20 May 2009
Posts: 8

PostPosted: Wed May 20, 2009 3:16 am    Post subject: SMODE1 question Reply with quote

Has onyone had any success figuring out these SMODE1, SYNCH1, SYNCH2, SYNCV GS registers? At least some partial information regarding what parts of sync timings do these bits correspond to.
Back to top
View user's profile Send private message
Maximus32



Joined: 27 Aug 2007
Posts: 41

PostPosted: Wed May 20, 2009 4:16 am    Post subject: Reply with quote

Does this help?

Code:
#define GS_S_SMODE1_REG         MIPS_PHYS_TO_KSEG1(0x12000010)
#define GS_S_SYNCH1_REG         MIPS_PHYS_TO_KSEG1(0x12000040)
#define GS_S_SYNCH2_REG         MIPS_PHYS_TO_KSEG1(0x12000050)
#define GS_S_SYNCV_REG          MIPS_PHYS_TO_KSEG1(0x12000060)

#define SMODE1(vhp, vcksel, slck2, nvck, clksel, pevs, pehs, pvs, phs,  \
    gcont, spml, pck2, xpck, sint, prst, ex, cmod, slck, t1248, lc, rc) \
        (((u_int64_t)(vhp)      << 36) |                                \
        ((u_int64_t)(vcksel)    << 34) |                                \
        ((u_int64_t)(slck2)     << 33) |                                \
        ((u_int64_t)(nvck)      << 32) |                                \
        ((u_int64_t)(clksel)    << 30) |                                \
        ((u_int64_t)(pevs)      << 29) |                                \
        ((u_int64_t)(pehs)      << 28) |                                \
        ((u_int64_t)(pvs)       << 27) |                                \
        ((u_int64_t)(phs)       << 26) |                                \
        ((u_int64_t)(gcont)     << 25) |                                \
        ((u_int64_t)(spml)      << 21) |                                \
        ((u_int64_t)(pck2)      << 19) |                                \
        ((u_int64_t)(xpck)      << 18) |                                \
        ((u_int64_t)(sint)      << 17) |                                \
        ((u_int64_t)(prst)      << 16) |                                \
        ((u_int64_t)(ex)        << 15) |                                \
        ((u_int64_t)(cmod)      << 13) |                                \
        ((u_int64_t)(slck)      << 12) |                                \
        ((u_int64_t)(t1248)     << 10) |                                \
        ((u_int64_t)(lc)        <<  3) |                                \
        ((u_int64_t)(rc)        <<  0))

#define SYNCH1(hs, hsvs, hseq, hbp, hfp)                                \
        (((u_int64_t)(hs)       << 43) |                                \
        ((u_int64_t)(hsvs)      << 32) |                                \
        ((u_int64_t)(hseq)      << 22) |                                \
        ((u_int64_t)(hbp)       << 11) |                                \
        ((u_int64_t)(hfp)       << 0))

#define SYNCH2(hb, hf)                                                  \
        (((u_int64_t)(hb)       << 11) |                                \
        ((u_int64_t)(hf)        << 0))

#define SYNCV(vs, vdp, vbpe, vbp, vfpe, vfp)                            \
        (((u_int64_t)(vs)       << 53) |                                \
        ((u_int64_t)(vdp)       << 42) |                                \
        ((u_int64_t)(vbpe)      << 32) |                                \
        ((u_int64_t)(vbp)       << 20) |                                \
        ((u_int64_t)(vfpe)      << 10) |                                \
        ((u_int64_t)(vfp)       << 0))



source: http://www.google.com/codesearch/p?#2HKZi5KjN1E/kame/netbsd/sys/arch/playstation2/ee/gsreg.h
_________________
Bricks-OS, Operating System for Game Consoles
Back to top
View user's profile Send private message Visit poster's website
uufyugi



Joined: 20 May 2009
Posts: 8

PostPosted: Wed May 20, 2009 4:44 am    Post subject: Reply with quote

Thanks, but I have already got that info from http://playstation2-linux.com/ however these aren't of much use as I can't decipher those abbreviations to human readable terms like Sync pulse length and so on.

What I'm trying to achieve here is to add a 24p/i mode so SMS wouldn't produce jerks every second on a 24fps video.
Back to top
View user's profile Send private message
Maximus32



Joined: 27 Aug 2007
Posts: 41

PostPosted: Wed May 20, 2009 7:08 am    Post subject: Reply with quote

Having 24p support would be great! But there are other ways to make 24p look good on 50i or 60i (without jerks).
- Using a "3:2 pulldown" you could display the video at 60i.
- Or by increasing the speed of the video to 25fps you could display it at 50i/25p.
_________________
Bricks-OS, Operating System for Game Consoles
Back to top
View user's profile Send private message Visit poster's website
uufyugi



Joined: 20 May 2009
Posts: 8

PostPosted: Wed May 20, 2009 7:22 am    Post subject: Reply with quote

- "3:2 pulldown" - absolutely horrible results I even wonder how people from NTSC countries bear watching movies at home
- 25 fps speedup patch is already made by some guy from psx-scene and sent to EEUG

However I'm just curious about finding a way to produce a 24/48Hz signal from GS. And that would be a cleanear solution than resampling the audio.
Back to top
View user's profile Send private message
jbit
Site Admin


Joined: 28 May 2005
Posts: 293
Location: København, Danmark

PostPosted: Wed May 20, 2009 10:33 am    Post subject: Reply with quote

uufyugi wrote:
However I'm just curious about finding a way to produce a 24/48Hz signal from GS. And that would be a cleanear solution than resampling the audio.

I'm curious if any TVs would accept this, as far as I know the only "supported" 24fps mode is over HDMI. If you interlaced it at 48hz (24 frames) maybe some PAL TVs would accept it as "off standard" since it's quite close. Of course multiscan PC monitors might accept it if you enable the Sync-on-Green sync multiplexer. (although 48hz vertical might be too slow, maybe 72Hz if you're targeting these?)

The best way to do new modes for PS2 is to get an oscilloscope and connect to green or composite channel (depending on where the sync pulses are). Most of the registers should be pretty obvious if you know about video timing.

Also remember that the sync chip changed at some point so to support all PS2s you'll need to create modes for all variations,
Back to top
View user's profile Send private message Visit poster's website
uufyugi



Joined: 20 May 2009
Posts: 8

PostPosted: Wed May 20, 2009 7:49 pm    Post subject: Reply with quote

jbit wrote:
If you interlaced it at 48hz (24 frames) maybe some PAL TVs would accept it as "off standard" since it's quite close.

Yes I'm hoping for that.

jbit wrote:
Most of the registers should be pretty obvious if you know about video timing.

I'd say that some are somehow decipherable.
If anyone has any information regarding even one of these - please share. The less would be there left the less I would have to deduce.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed May 20, 2009 8:10 pm    Post subject: Reply with quote

Try looking at the PS2 linux video driver.
Back to top
View user's profile Send private message AIM Address
uufyugi



Joined: 20 May 2009
Posts: 8

PostPosted: Thu May 21, 2009 1:35 am    Post subject: Reply with quote

The good news
- the SYNCH/SYNCV registers aren't rocket science so it's no big deal figuring these out
- a SD multisystem tv set syncs just fine to 47.9462 Hz (the closest I got to 47.9520) no smoke or funny noises

The bad news
- I don't have an oscilloscope so I can't check if all the pulses are where they should be so I'm not very comfortable with leaving the tv set in that mode for prolonged periods

So
- Is there anyone willing to help me and check that with an oscilloscope?
- yet got to check how that would work with SMS
Back to top
View user's profile Send private message
Maximus32



Joined: 27 Aug 2007
Posts: 41

PostPosted: Thu May 21, 2009 2:53 am    Post subject: Reply with quote

Good news indeed! I don't have an oscilloscope but I can test it on 2 tv's if you like.

I'm sure more people will be interested in those registers, so if you decipher them, could you share the "human readable terms".
_________________
Bricks-OS, Operating System for Game Consoles
Back to top
View user's profile Send private message Visit poster's website
uufyugi



Joined: 20 May 2009
Posts: 8

PostPosted: Thu May 21, 2009 5:01 am    Post subject: Reply with quote

Maximus32 wrote:
I can test it on 2 tv's if you like.

Sure. I'll upload some test program in a while.

Maximus32 wrote:
I'm sure more people will be interested in those registers, so if you decipher them, could you share the "human readable terms".

I have no idea. They do look somehow familiar like fpe = front porch end and the like but it's of no much use without knowing where these timings are calculated from.
I just changed them cautiously, noticing the changes and calculating the vertical frequency. And I'm still not quite sure that everything is right.

ATM I'm just glad that the tv set syncs to the required signal and will proceed with experiments.
Back to top
View user's profile Send private message
doctorxyzz



Joined: 09 Oct 2009
Posts: 2

PostPosted: Fri Oct 09, 2009 2:47 pm    Post subject: Reply with quote

Guys,
Do you make any progress here?
If so, could you share with us?
Tks in advance!
Back to top
View user's profile Send private message
doctorxyzz



Joined: 09 Oct 2009
Posts: 2

PostPosted: Thu Oct 15, 2009 9:40 pm    Post subject: Reply with quote

No response yet... But okay, no problem... Anyway...

@all,

We made some progress on this subject...!

Are you interested? If so, get further info on "GS Mode Selector: Development & Feedback" (http://www.psx-scene.com/forums/showthread.php?t=61808) thread on PSX-SCENE.

You are invited to visit, sign in, and join us!

BR,
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group