From f8930a8944ab5a1e7742d9b793a7ed0b851371c6 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Tue, 5 Oct 2004 14:38:45 +0000 Subject: [PATCH] ISA->PCI conversion of coldstart script cmd's is operational sofar. Besides NV34 NV11 is working OK as secondary card now also! git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9206 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../accelerants/nvidia/engine/nv_info.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/add-ons/accelerants/nvidia/engine/nv_info.c b/src/add-ons/accelerants/nvidia/engine/nv_info.c index dfed7efad8..33fb3c301b 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_info.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_info.c @@ -884,12 +884,13 @@ static status_t exec_type2_script(uint8* rom, uint16 adress, int16* size, PinsTa return exec_type2_script_mode(rom, &adress, size, tabs, ram_tab, &exec); } -/* this routine is used for NV10 and later */ +/* this routine is used for NV10 and later. It's tested on a GeForce2 MX400 (NV11) and + * a GeForceFX 5200 (NV34). Both cards coldstart perfectly. */ static status_t exec_type2_script_mode(uint8* rom, uint16* adress, int16* size, PinsTables tabs, uint16 ram_tab, bool* exec) { status_t result = B_OK; bool end = false; - uint8 index, byte, byte2, safe, shift; + uint8 index, byte, byte2, shift;//, safe; uint32 reg, reg2, data, data2, and_out, and_out2, or_in, or_in2, safe32, offset32, size32; while (!end) @@ -1002,10 +1003,15 @@ static status_t exec_type2_script_mode(uint8* rom, uint16* adress, int16* size, *adress += 1; reg2 = *((uint32*)(&(rom[*adress]))); *adress += 4; - safe = ISARB(reg); - ISAWB(reg, index); - byte = ISARB(reg + 1); - ISAWB(reg, safe); +// safe = ISARB(reg); +// ISAWB(reg, index); +// byte = ISARB(reg + 1); +// ISAWB(reg, safe); +//test: + translate_ISA_PCI(®); + NV_REG8(reg) = index; + byte = NV_REG8(reg + 1); +//end test byte &= (uint8)and_out; data = (byte >> shift); data <<= 1;