From 5c6e58e4e246faa964ecc7b20edc852382188786 Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 9 Aug 2018 15:55:28 +0300 Subject: [PATCH] apply the commit 721b6fcf changes to ddglobal.h and h3info.h, too. --- glide3x/h3/incsrc/h3info.h | 10 +++++++--- glide3x/h5/incsrc/h3info.h | 11 +++++++---- swlibs/fxmisc/ddglobal.h | 10 +++++----- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/glide3x/h3/incsrc/h3info.h b/glide3x/h3/incsrc/h3info.h index cdefb46..c0e421a 100644 --- a/glide3x/h3/incsrc/h3info.h +++ b/glide3x/h3/incsrc/h3info.h @@ -21,6 +21,7 @@ ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED */ +/* #if defined(__unix__) && ! defined(__H3REGS_H__) // basic data types #define FxU8 unsigned char @@ -30,6 +31,8 @@ // defn of registers not reqd, treat (SstRegs *) as (void *) typedef void SstRegs; #endif +*/ +struct sstregs; /* see h3regs.h */ #if defined(H4) #define MAX_NUM_TMUS 2 @@ -49,7 +52,8 @@ typedef void SstRegs; typedef struct { // H3 Device Information Structure FxU32 size; // size of this structure - SstRegs *virtAddr[2]; // virtual memory base address + volatile + struct sstregs *virtAddr[2];// virtual memory base address FxU32 physAddr[2]; // physical memory base address FxU16 virtPort; // virtual i/o port base address FxU16 physPort; // physical i/o port base address @@ -84,8 +88,8 @@ typedef struct { // H3 Device Information Structure // Misc FxU32 initGrxClkDone; - SstRegs *sstCSIM; - SstRegs *sstHW; // pointer to HW + volatile struct sstregs *sstCSIM; + volatile struct sstregs *sstHW; // pointer to HW } FxDeviceInfo; #endif /* !__H3INFO_H__ */ diff --git a/glide3x/h5/incsrc/h3info.h b/glide3x/h5/incsrc/h3info.h index 0580f05..efecb92 100644 --- a/glide3x/h5/incsrc/h3info.h +++ b/glide3x/h5/incsrc/h3info.h @@ -21,6 +21,7 @@ ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED */ +/* #if defined(__unix__) && ! defined(__H3REGS_H__) // basic data types #define FxU8 unsigned char @@ -30,6 +31,8 @@ // defn of registers not reqd, treat (SstRegs *) as (void *) typedef void SstRegs; #endif +*/ +struct sstregs; /* see h3regs.h */ /* ** H3 Device Information Structure @@ -42,9 +45,9 @@ typedef void SstRegs; #endif typedef struct { // H3 Device Information Structure - FxU32 size; // size of this structure - SstRegs *virtAddr[2]; // virtual memory base address + volatile + struct sstregs *virtAddr[2]; // virtual memory base address FxU32 physAddr[2]; // physical memory base address FxU16 virtPort; // virtual i/o port base address FxU16 physPort; // physical i/o port base address @@ -86,8 +89,8 @@ typedef struct { // H3 Device Information Structure FxU32 initGrxClkDone; // CSIM specific - SstRegs *sstCSIM; // pointer to CSIM structure - SstRegs *sstHW; // pointer to HW + volatile struct sstregs *sstCSIM; // pointer to CSIM structure + volatile struct sstregs *sstHW; // pointer to HW } FxDeviceInfo; #endif /* !__H3INFO_H__ */ diff --git a/swlibs/fxmisc/ddglobal.h b/swlibs/fxmisc/ddglobal.h index b98ada1..7e720e4 100644 --- a/swlibs/fxmisc/ddglobal.h +++ b/swlibs/fxmisc/ddglobal.h @@ -6,7 +6,6 @@ * Web : http://www.geocities.com/dborca */ - #ifndef DDGLOBAL_H_included #define ddgetenv(A) getenv(A) @@ -59,10 +58,12 @@ typedef void (*FxSet32Proc)(volatile FxU32* const addr, const FxU32 val); ** CVG Device Information Structure ** */ +struct sstregs; /* see cvgregs.h */ // Initialization and configuration data structure typedef struct { FxU32 size; // size of this structure - SstRegs *virtAddr[2]; // virtual memory base address + volatile + struct sstregs *virtAddr[2]; // virtual memory base address FxU32 physAddr[2]; // physical memory base address FxU32 deviceNumber; // PCI device number FxU32 vendorID; // PCI vendor ID @@ -126,9 +127,8 @@ typedef struct { FxU32 mtrrUncacheable; /* 3d register space (all wraps) */ FxU32 mtrrWriteCombine; /* command fifo/3d lfb */ - - SstRegs *sstCSIM; - SstRegs *sstHW; // pointer to HW + volatile struct sstregs *sstCSIM; + volatile struct sstregs *sstHW; // pointer to HW } sst1DeviceInfoStruct; #endif /* !SST1 && !SST96_FIFO */