How to workaround black borders in Pal + graphic glitch using (w)x512 resolutions

Graphic based area of development (Graphics Processing Unit), including the Geometry Transform Engine (GTE), TIM, STR (MDEC), etc.
Post Reply
User avatar
ViLXDRYAD
Curious PSXDEV User
Curious PSXDEV User
Posts: 19
Joined: May 3rd, 2018, 1:17 pm
I am a: Avocado lover
IRC: ViLXDRYAD
Motto: FR E SH A VOCA DO
PlayStation Model: SCPH1001
Want to Find: a good time! :D
Looking to: help/write psy-q examples

How to workaround black borders in Pal + graphic glitch using (w)x512 resolutions

Post by ViLXDRYAD » June 4th, 2018, 6:39 am

Hii, everyone! been into this for several days until yesterday i put all my day on it without progress, so i though about asking for help here

thanks for reading the topic beforehand!

I realized some Pal games, like the C-12 Final Resistance, displays on the full screen, no black borders; so i'm trying to achieve that

for testing this, i had to select the "No (as on real hardware)" option in the Force Screen Auto Centering field, as in this picture:
Image

i wrote a concise test PS-EXE for this, that just initialize the screen/viewpoints at certain resolution and display text, also has a line primitive that moves across the screen vertically for testing purposes, here's the full one-file source code:
https://pastebin.com/raw/zmWtVRjb

or the ready-to-compile whole folder:
640x512.zip
(28.13 KiB) Downloaded 88 times
(this .zip contains the one-file source, the makefile.mak, and two batch files; one runs psymake, and the other runs psymake and then launch the exe in No$PSX automatically, if you have No$PSX on your environment variables)

in No$PSX it looks like this:
Image
i'm trying to stretch the viewports so there's no black borders

also note, i set the resolution, display and draw viewports heights to 511, not 512, as follows:

Code: Select all

	//...
	GsInitGraph(640, 511, GsINTER|GsOFSGPU, 0, 0); // set the graphics mode resolutions (GsNONINTER for NTSC, and GsINTER for PAL)
	//...
	SetDefDrawEnv(&draw, 0,  0, 640, 511);
	SetDefDispEnv(&disp, 0,  0, 640, 511);
	//...
because oddly enough, when i use 512 height on GsInitGraph, the following occurs:
Image
seems the order tables aren't cleared when i do, i can't make sense of why

about the black borders, i tried to move the screen offset upwards by changing this:

Code: Select all

	disp.screen.y = 16;
to this:

Code: Select all

	disp.screen.y = 12;
so it displays on the top most of the screen like this:
Image
so i though the only thing left to do is to stretch the display/draw viewports, to fit the bottom part of the screen, so i also changed this:

Code: Select all

	disp.screen.h = 256;
to this:

Code: Select all

	disp.screen.h = 264;
but it didn't work as expected; instead of stretching, it wrapped around like this:
Image

i really tried everything i could think of until i ran out of ideas, seeked for hints on the PsyQ-SDK documentations including Libovr46.pdf, libref46.pdf and the SCEE pal example, without luck, i'd really appreciate any help!

thaanks a lot, beforehand! :D

User avatar
Shadow
Admin / PSXDEV
Admin / PSXDEV
Posts: 2233
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: How to workaround black borders in Pal + graphic glitch using (w)x512 resolutions

Post by Shadow » June 5th, 2018, 4:05 am

Try changing "GsINTER" to "GsNONINTER". Also wise to try this on real hardware and not under NO$PSX.
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

Development Computer: Windows 98, Pentium 3 [400MHz], 128MB SDRAM, DTL-H2000, DTL-H201A, 21" Sony Trinitron CRT, CD-ROM burner, 3.25" and 5.25" Floppy Diskette Drives and a ZIP 100 Diskette Drive.

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 349
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: How to workaround black borders in Pal + graphic glitch using (w)x512 resolutions

Post by LameGuy64 » June 5th, 2018, 11:28 am

The PlayStation only supports a select set of fixed resolutions. For horizontal, you have 256, 320, 384, 512 and 640 and for vertical, you have either 240 and 480 for NTSC or 256 and 512 for PAL. 480 and 512 are hi-res modes so you need to enable interlace when using those modes.
Please don't forget to include my name if you share my work around. Credit where it is due.

Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.

DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest