diff --git a/CMakePresets.json b/CMakePresets.json index 30feab8ab..53ddffc74 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -36,7 +36,9 @@ "name": "debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", - "NV_LOG": "ON" + "NV_LOG": "ON", + "NV_LOG_ULTRA": "ON" + }, "inherits": "base" }, diff --git a/src/include/86box/nv/vid_nv4.h b/src/include/86box/nv/vid_nv4.h index 47c62853a..bcdfb4dd0 100644 --- a/src/include/86box/nv/vid_nv4.h +++ b/src/include/86box/nv/vid_nv4.h @@ -20,12 +20,13 @@ #include #include <86Box/nv/vid_nv4_defines.h> - // -// PBUS/RMA +// Structures // -// Access the GPU from real-mode + +// PBUS +// RMA: Access the GPU from real-mode typedef struct nv4_pbus_rma_s { uint32_t addr; // Address to RMA to @@ -43,10 +44,8 @@ typedef struct nv4_pbus_s nv4_pbus_rma_t rma; } nv4_pbus_t; -// -// PTIMER -// +// PTIMER typedef struct nv4_ptimer_s { uint32_t interrupt_status; // PTIMER Interrupt status @@ -57,9 +56,7 @@ typedef struct nv4_ptimer_s uint32_t alarm; // The value of time when there should be an alarm } nv4_ptimer_t; -// // PRAMDAC -// typedef struct nv4_pramdac_s { uint32_t mclk; @@ -68,7 +65,7 @@ typedef struct nv4_pramdac_s uint32_t cursor_address; } nv4_pramdac_t; -// Structures +// Device Core typedef struct nv4_s { nv_base_t nvbase; // Base Nvidia structure @@ -78,10 +75,10 @@ typedef struct nv4_s nv4_pramdac_t pramdac; } nv4_t; - // // Globals // + extern const device_config_t nv4_config[]; extern nv4_t* nv4; // Allocated at device startup @@ -101,7 +98,7 @@ void nv4_draw_cursor(svga_t* svga, int32_t drawline); void nv4_recalc_timings(svga_t* svga); void nv4_force_redraw(void* priv); -// I/o +// I/O uint8_t nv4_mmio_read8(uint32_t addr, void* priv); uint16_t nv4_mmio_read16(uint32_t addr, void* priv); uint32_t nv4_mmio_read32(uint32_t addr, void* priv); @@ -123,6 +120,7 @@ void nv4_ramin_write32(uint32_t addr, uint32_t val, void* priv); uint8_t nv4_pci_read(int32_t func, int32_t addr, void* priv); void nv4_pci_write(int32_t func, int32_t addr, uint8_t val, void* priv); +// PRAMDAC uint8_t nv4_svga_read(uint16_t addr, void* priv); void nv4_svga_write(uint16_t addr, uint8_t val, void* priv); diff --git a/src/video/nv/nv4/nv4_core.c b/src/video/nv/nv4/nv4_core.c index 285988800..13f9df321 100644 --- a/src/video/nv/nv4/nv4_core.c +++ b/src/video/nv/nv4/nv4_core.c @@ -341,11 +341,6 @@ void nv4_recalc_timings(svga_t* svga) } -void nv4_force_redraw(void* priv) -{ - -} - // See if the bios rom is available. int32_t nv4_available(void) { diff --git a/src/video/nv/nv4/nv4_core_io.c b/src/video/nv/nv4/nv4_core_io.c index 2849efac1..51a702bd3 100644 --- a/src/video/nv/nv4/nv4_core_io.c +++ b/src/video/nv/nv4/nv4_core_io.c @@ -884,7 +884,6 @@ uint8_t nv4_svga_read(uint16_t addr, void* priv) break; } - nv_log("SVGA read 0x%04x value 0x%02x\n", addr, ret); return ret; //TEMP } @@ -1029,7 +1028,6 @@ void nv4_svga_write(uint16_t addr, uint8_t val, void* priv) break; } - nv_log("SVGA write 0x%04x value 0x%02x\n", addr, val); } /* DFB, sets up a dumb framebuffer */ diff --git a/src/video/nv/nv4/subsystems/nv4_pramdac.c b/src/video/nv/nv4/subsystems/nv4_pramdac.c new file mode 100644 index 000000000..d8d4883ec --- /dev/null +++ b/src/video/nv/nv4/subsystems/nv4_pramdac.c @@ -0,0 +1,16 @@ +/* +* 86Box A hypervisor and IBM PC system emulator that specializes in +* running old operating systems and software designed for IBM +* PC systems and compatibles from 1981 through fairly recent +* system designs based on the PCI bus. +* +* This file is part of the 86Box distribution. +* +* NV4/Riva TNT - RAMDAC +* +* +* Authors: Connor Hyde, I need a better email address ;^) +* +* Copyright 2024-2025 starfrost +*/ +