mirror of
https://github.com/86Box/86Box.git
synced 2026-02-25 04:45:31 -07:00
start working on the actual graphics objects. Since we figured out the pfifo/ramht/object class crap.
This commit is contained in:
@@ -41,6 +41,8 @@ add_library(vid OBJECT agpgart.c video.c vid_table.c vid_cga.c vid_cga_comp.c
|
||||
nv/nv3/subsystems/nv3_ptimer.c
|
||||
nv/nv3/subsystems/nv3_pramin.c nv/nv3/subsystems/nv3_pramin_ramht.c nv/nv3/subsystems/nv3_pramin_ramfc.c nv/nv3/subsystems/nv3_pramin_ramro.c
|
||||
nv/nv3/subsystems/nv3_pvideo.c
|
||||
|
||||
nv/nv3/classes/nv3_class_names.c
|
||||
)
|
||||
|
||||
if(G100)
|
||||
|
||||
63
src/video/nv/nv3/classes/nv3_class_names.c
Normal file
63
src/video/nv/nv3/classes/nv3_class_names.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* NV3: Defines core class names for debugging purposes
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Connor Hyde, <mario64crashed@gmail.com> I need a better email address ;^)
|
||||
*
|
||||
* Copyright 2024-2025 starfrost
|
||||
*/
|
||||
|
||||
/* Taken from Win9x drivers 0.77, these had the best reversing potential */
|
||||
|
||||
#include <86Box/nv/classes/vid_nv3_classes.h>
|
||||
|
||||
|
||||
/* These are the object classes AS RECOGNISED BY THE GRAPHICS HARDWARE. */
|
||||
/* The drivers implement a COMPLETELY DIFFERENT SET OF CLASSES. */
|
||||
|
||||
/* THERE CAN ONLY BE 32 CLASSES IN NV3 BECAUSE THE CLASS ID PART OF THE CONTEXT OF A GRAPHICS OBJECT IN PFIFO RAM HASH TABLE IS ONLY 5 BITS LONG! */
|
||||
|
||||
const char* nv3_class_names[] =
|
||||
{
|
||||
"NV3 INVALID class 0x00",
|
||||
"NV3 class 0x01: Beta factor",
|
||||
"NV3 class 0x02: ROP5 (32-bit) operation",
|
||||
"NV3 class 0x03: Chroma key",
|
||||
"NV3 class 0x04: Plane mask",
|
||||
"NV3 class 0x05: Clipping rectangle",
|
||||
"NV3 class 0x06: Pattern",
|
||||
"NV3 class 0x07: Rectangle",
|
||||
"NV3 class 0x08: Point",
|
||||
"NV3 class 0x09: Line",
|
||||
"NV3 class 0x0A: Lin (line without starting or ending pixel)",
|
||||
"NV3 class 0x0B: Triangle",
|
||||
"NV3 class 0x0C: Windows 95 GDI text acceleration",
|
||||
"NV3 class 0x0D: Memory to memory format",
|
||||
"NV3 class 0x0E: Scaled image from memory",
|
||||
"NV3 INVALID class 0x0F",
|
||||
"NV3 class 0x10: Blit",
|
||||
"NV3 class 0x11: Image",
|
||||
"NV3 class 0x12: Bitmap",
|
||||
"NV3 INVALID class 0x13",
|
||||
"NV3 class 0x14: Transfer to Memory",
|
||||
"NV3 class 0x15: Stretched image from CPU",
|
||||
"NV3 INVALID class 0x16",
|
||||
"NV3 class 0x17: Direct3D 5.0 accelerated textured triangle w/zeta buffer",
|
||||
"NV3 INVALID class 0x18",
|
||||
"NV3 INVALID class 0x19",
|
||||
"NV3 INVALID class 0x1A",
|
||||
"NV3 INVALID class 0x1B",
|
||||
"NV3 class 0x1C: Image in Memory",
|
||||
"NV3 INVALID class 0x1D",
|
||||
"NV3 INVALID class 0x1E",
|
||||
"NV3 INVALID class 0x1F",
|
||||
|
||||
};
|
||||
@@ -614,7 +614,6 @@ void nv3_svga_out(uint16_t addr, uint8_t val, void* priv)
|
||||
uint8_t old_value;
|
||||
|
||||
// todo:
|
||||
// RMA
|
||||
// Pixel formats (8bit vs 555 vs 565)
|
||||
// VBE 3.0?
|
||||
|
||||
|
||||
@@ -28,3 +28,4 @@
|
||||
#include <86Box/nv/vid_nv.h>
|
||||
#include <86Box/nv/vid_nv3.h>
|
||||
|
||||
/* Nvidia DMA Engine */
|
||||
@@ -115,7 +115,7 @@ void nv3_ramin_write8(uint32_t addr, uint8_t val, void* priv)
|
||||
// Write 16-bit ramin
|
||||
void nv3_ramin_write16(uint32_t addr, uint16_t val, void* priv)
|
||||
{
|
||||
addr &= (nv3->nvbase.svga.vram_max- 1);
|
||||
addr &= (nv3->nvbase.svga.vram_max - 1);
|
||||
|
||||
// why does this not work in one line
|
||||
svga_t* svga = &nv3->nvbase.svga;
|
||||
|
||||
@@ -28,3 +28,13 @@
|
||||
#include <86Box/nv/vid_nv.h>
|
||||
#include <86Box/nv/vid_nv3.h>
|
||||
|
||||
/* This implements the hash that all the objects are stored within.
|
||||
It is used to get the offset within RAMHT of a graphics object.
|
||||
*/
|
||||
|
||||
uint32_t nv3_pramin_ramht_hash(nv3_pramin_name_t name, uint32_t channel)
|
||||
{
|
||||
uint32_t hash = (name.byte_high ^ name.byte_mid2 ^ name.byte_mid1 ^ name.byte_low ^ (uint8_t)channel);
|
||||
nv_log("NV3: Generating RAMHT hash (RAMHT slot=0x%04x (from name 0x%08x for DMA channel 0x%04x)\n)", name, channel);
|
||||
return hash;
|
||||
}
|
||||
Reference in New Issue
Block a user