hi, dunno if someone can help me out on this one.
Im trying to draw some stuff on the screen in vga 640x480 mode. Im doing something like:
gsDriver myGsDriver;
myGsDriver.setDisplayMode(640, 480, 68, 35,
GS_PSMCT32, 2, 0x1A, GS_TV_NONINTERLACE,
GS_ENABLE, GS_PSMZ32);
myGsDriver.drawPipe.RectFlat(0, 0, 640, 480, 0, GS_SET_RGBA(0,0xFF,0,0x80));
the thing is on the x axis 1 pixel = 2 pixel on the monitor so everything look 2 time larger. i know that I can specify in DISPLAY1(0x12000080) the horinzontal mag, is that it. and should I do that in gslib?
Thank you
libgs,video mode and strange behavior.
Are you telling the PS2 to use NTSC, then telling it to be non-interlaced? If so, it will display only half the lines on the screen since a TV can't do what you ask. You don't usually tell the CRTC how many lines to display so much as tell it what video mode you want, that resolution you specify is for use by the GS to tell it how big a framebuffer to use.
Take a look in a tutorial I have on my site ( http://www.oopo.net/consoledev/files/ps ... buffer.txt ) which explains how to set up different video modes and use them, including VGA (640x480) and HDTV (480p).
Take a look in a tutorial I have on my site ( http://www.oopo.net/consoledev/files/ps ... buffer.txt ) which explains how to set up different video modes and use them, including VGA (640x480) and HDTV (480p).
fixed my problem. I should have explained more, I was actually trying to use vga 640x480 60 hertz (0x1a) on a Computer monitor.
for a tv screen you have to set magh on DISPLAY1(0x12000080) and DISPLAY2(0x120000a0) to something like 3 but on the computer monitor it should be 0 or maybe 1? anyway setting it at 0 fixed every thing.
now can someone explain the start position you can set also? I know x and y -5 are fine on a tv but how can you find the proper value for other mode.
for now i just try randomly. on my computer screen x 0 and y 0 put 0,0 coordinate almost in the middle of the screen for x and y is amost right.
Thank you ooPo.
for a tv screen you have to set magh on DISPLAY1(0x12000080) and DISPLAY2(0x120000a0) to something like 3 but on the computer monitor it should be 0 or maybe 1? anyway setting it at 0 fixed every thing.
now can someone explain the start position you can set also? I know x and y -5 are fine on a tv but how can you find the proper value for other mode.
for now i just try randomly. on my computer screen x 0 and y 0 put 0,0 coordinate almost in the middle of the screen for x and y is amost right.
Thank you ooPo.
Those values are typically dictated by the mode specification itself, but since TVs differ you generally have to let the users adjust it on their own. So... trial and error, but what works for you may not work for all so don't hard code some values in if you can help it.
There's free information on those quirky registers available in the kernel source from ps2linux. Take a look on ps2linux.com and see if you can get a copy of ps2gs.c, I know you can browse the source on that site but I don't remember how to get to it. Also, if you already have the kit, take a look in the gs guide. Its not very informative, but at least it puts names to the values.
There's free information on those quirky registers available in the kernel source from ps2linux. Take a look on ps2linux.com and see if you can get a copy of ps2gs.c, I know you can browse the source on that site but I don't remember how to get to it. Also, if you already have the kit, take a look in the gs guide. Its not very informative, but at least it puts names to the values.
The ps2linux kernel source will give you magic numbers, but it won't tell you why you're putting them there. There's better places to get info, but not many are as free to read as the kernel source itself.
What I'd like to know is why you felt it necessary to repeat just what I said, but in a less helpful manner. :)
What I'd like to know is why you felt it necessary to repeat just what I said, but in a less helpful manner. :)
The PS2/Linux kernel source is the only place where those magic GS undocumented priveledged registers are used in code. Pro developers are explicitly forbidden from using them directly. There is no other documentation on those registers except inside the secret SCEI laser-guarded defense fortress which may or may not exist.
Exactly. If you look at the Linux code, you'll see that the undocumented registers are setting the sync timing which has the potential of frying your monitor. I did that to a Commodore monitor about 5 years back... it came up with the video mode - for about 5 seconds, then POP!!! The picture went away and lots of smoke came out of the monitor. Many new monitors are designed to ignore out of range signals, but if they aren't, you can easily blow the monitor using out of range sync. It's not a wonder Sony doesn't want you messing with it. They have certain "safe" values they use with the modes they set, and don't want you doing anything beyond that.