Is it possible to set the pvr_init to use a resolution of 740/416 for example to draw sprites, etc... and then the video output fits it in 640 * 480 ?
Thanks for help
![Smile :)](./images/smilies/icon_e_smile.gif)
Code: Select all
#include <dc/pvr.h>
#include <dc/video.h>
static pvr_init_params_t pvr_params = {
/* Enable Opaque and Opaque modifiers. */
{ PVR_BINSIZE_16, PVR_BINSIZE_16, PVR_BINSIZE_16, PVR_BINSIZE_16,
PVR_BINSIZE_0 },
512 * 1024
};
/* 768x480 VGA 60Hz (not working for the moment) */
/* DM_768x480_VGA */
vid_mode_t vid_768 =
{
DM_768x480,
768, 480,
VID_INTERLACE,
CT_VGA,
0,
524, 857,
96, 18, // surely here to change
0x15, 0x104,
0x2e, 0x345,
0x24, 0x204,
0, 1,
{ 0, 0, 0, 0 }
} ;
int main(int argc, char *argv[]) {
vid_mode_t vidMode;
pvr_init(&pvr_params);
memset( &vidMode, 0, sizeof(vid_mode_t));
memcpy( &vidMode, &vid_768, sizeof(vidMode));
vidMode.pm = PM_RGB565;
vidMode.cable_type = vid_check_cable();
vid_set_mode_ex( &vidMode);
/* Display something */
while(!check_start()) {
do_frame();
}
return 0;
}
The PVR can output RGB888, but it cannot take in textures in RGB888. It can, however, do 4bpp/8bpp palleted textures with RGB888 entries, but then you're limited to only 16 or 256 colors per texture.PH3NOM wrote:Yeah I was wondering why KOS only included 768x480 interlace and not progressive...
I hope we can get this mode to work, I would like to use it also...
And, I thought the PVR could do 24bit display mode? I dont see a RGB888 or similar in PVR.h...?
I tested this mode a few days ago, and at least nullDC reports the screen is accurately set to 768x480.patbier wrote:Thanks for the idea Quzar.
By the way, this morning I have tested the 768*480 resolution in PAL and NTSC on my TV, and it doesn't work : it is still 640 * 480 and the image is no good (distorsion).
Perhaps it is my hardware because i'm using a vga box which has a tv / pc option.
Does someone has already tested the 768*480 resolution ?
BlueCrab wrote: Also, you'd have to tweak the PVR init, since it assumes 640x480 by default (that works fine for lower resolutions, but won't work for higher ones). One thing to note (I believe) is that the PVR mode MUST be a multiple of 32 in each direction (so you might have to set it slightly larger than it would otherwise be).
EDIT:
I just noticed that there is a 768x480 mode in the video.c file. Perhaps that will work for what you want and everything divides nicely by 32, so it should be able to be used with the PVR (you still would need to tweak the init for the PVR though).
Code: Select all
vid_set_mode(DM_768x480_NTSC_IL,PM_RGB565);
pvr_init(&pvr_params);
vid_set_mode(DM_768x480_NTSC_IL,PM_RGB565);
Code: Select all
-----------------------------------------
| 0 |
| |
|64 704|
| |
| 480 |
-----------------------------------------
Code: Select all
//720x576 VGA 50Hz
vid_mode_t vid_768 =
{
DM_768x480,
768, 480,
0,
CT_VGA,
0,
[b]624, 863,[/b]
96,40,
0x18, 0x104,
0x36, 0x34b,
0x2c, 0x26c,
0, 1,
{ 0, 0, 0, 0 }
} ;