From e791f25a6b1d2211d74b67f1ac968d104da1cd90 Mon Sep 17 00:00:00 2001 From: starfrost013 Date: Wed, 23 Apr 2025 23:55:57 +0100 Subject: [PATCH] Get rid of redundant code --- src/include/86box/nv/vid_nv3.h | 2 -- src/video/nv/nv3/subsystems/nv3_pramdac.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/include/86box/nv/vid_nv3.h b/src/include/86box/nv/vid_nv3.h index c27af6a1d..25049dbce 100644 --- a/src/include/86box/nv/vid_nv3.h +++ b/src/include/86box/nv/vid_nv3.h @@ -44,8 +44,6 @@ extern const device_config_t nv3t_config[]; // Confi #define NV3_DMA_CHANNELS_TOTAL 0x7F // This is also used somewhere despite there only being 8*8 = 64 channels -#define NV3_86BOX_TIMER_SYSTEM_FIX_QUOTIENT 1 // The amount by which we have to ration out the memory clock because it's not fast enough... - // Multiply by this value to get the real clock speed. #define NV3_LAST_VALID_GRAPHICS_OBJECT_ID 0x1F // The class ids are represented with 5 bits in PGRAPH, but 7 bits in PFIFO! diff --git a/src/video/nv/nv3/subsystems/nv3_pramdac.c b/src/video/nv/nv3/subsystems/nv3_pramdac.c index b24d3d201..88b910b6f 100644 --- a/src/video/nv/nv3/subsystems/nv3_pramdac.c +++ b/src/video/nv/nv3/subsystems/nv3_pramdac.c @@ -134,7 +134,7 @@ void nv3_pramdac_set_vram_clock(void) // Convert to microseconds frequency = (frequency * nv3->pramdac.memory_clock_n) / (nv3->pramdac.memory_clock_m << nv3->pramdac.memory_clock_p); - double time = (1000000.0 * NV3_86BOX_TIMER_SYSTEM_FIX_QUOTIENT) / (double)frequency; // needs to be a double for 86box + double time = 1000000.0 / (double)frequency; // needs to be a double for 86box nv_log("Memory clock = %.2f MHz\n", frequency / 1000000.0f); @@ -182,7 +182,7 @@ void nv3_pramdac_set_pixel_clock(void) nv3->nvbase.svga.clock = cpuclock / frequency; - double time = (1000000.0 * NV3_86BOX_TIMER_SYSTEM_FIX_QUOTIENT) / (double)frequency; // needs to be a double for 86box + double time = 1000000.0 / (double)frequency; // needs to be a double for 86box nv_log("Pixel clock = %.2f MHz\n", frequency / 1000000.0f);