psx refresh rate more decimals (nw)

This commit is contained in:
hap 2020-01-06 13:54:31 +01:00
parent 26f6a7ca93
commit 974b9339cb

View File

@ -418,12 +418,12 @@ int psxgpu_device::DebugTextureDisplay( bitmap_rgb32 &bitmap )
void psxgpu_device::updatevisiblearea() void psxgpu_device::updatevisiblearea()
{ {
rectangle visarea; rectangle visarea;
float refresh; double refresh;
if( ( n_gpustatus & ( 1 << 0x14 ) ) != 0 ) if( ( n_gpustatus & ( 1 << 0x14 ) ) != 0 )
{ {
/* pal */ /* pal */
refresh = 50; refresh = 50; // TODO: it's not exactly 50Hz
switch( ( n_gpustatus >> 0x13 ) & 1 ) switch( ( n_gpustatus >> 0x13 ) & 1 )
{ {
case 0: case 0:
@ -437,14 +437,16 @@ void psxgpu_device::updatevisiblearea()
else else
{ {
/* ntsc */ /* ntsc */
// refresh rate derived from 53.693175MHz
// TODO: emulate display timings at lower level
switch( ( n_gpustatus >> 0x13 ) & 1 ) switch( ( n_gpustatus >> 0x13 ) & 1 )
{ {
case 0: case 0:
refresh = 59.82; refresh = 59.8260978565;
n_screenheight = 240; n_screenheight = 240;
break; break;
case 1: case 1:
refresh = 59.94; refresh = 59.9400523286;
n_screenheight = 480; n_screenheight = 480;
break; break;
} }