$NetBSD: patch-al,v 1.2 2015/04/21 17:15:20 joerg Exp $ --- SrcShared/Hardware/EmRegsEZ.cpp.orig 2002-03-29 13:11:18.000000000 +0000 +++ SrcShared/Hardware/EmRegsEZ.cpp @@ -84,13 +84,13 @@ static const HwrM68EZ328Type kInitial68E 0x2430, // Word pllControl; // $200: PLL Control Register 0x0123, // Word pllFreqSel; // $202: PLL Frequency Select Register 0, // !!! ---> Marked as reserved in 1.4 Word pllTest; // $204: PLL Test Register (do not access) - { 0 }, // Byte ___filler44; + 0, // Byte ___filler44; 0x1F, // Byte pwrControl; // $207: Power Control Register { 0 }, // Byte ___filler3[0x300-0x208]; 0x00, // Byte intVector; // $300: Interrupt Vector Register - { 0 }, // Byte ___filler4; + 0, // Byte ___filler4; 0x0000, // Word intControl; // $302: Interrupt Control Register 0x00FF, // Word intMaskHi; // $304: Interrupt Mask Register/HIGH word 0xFFFF, // Word intMaskLo; // $306: Interrupt Mask Register/LOW word @@ -183,7 +183,7 @@ static const HwrM68EZ328Type kInitial68E { 0 }, // Byte ___filler28[0xA00-0x90C]; 0x00000000, // DWord lcdStartAddr; // $A00: Screen Starting Address Register - { 0 }, // Byte ___filler29; + 0, // Byte ___filler29; 0xFF, // Byte lcdPageWidth; // $A05: Virtual Page Width Register { 0 }, // Byte ___filler30[2]; 0x03FF, // Word lcdScreenWidth; // $A08: Screen Width Register @@ -192,17 +192,17 @@ static const HwrM68EZ328Type kInitial68E 0x0000, // Word lcdCursorXPos; // $A18: Cursor X Position 0x0000, // Word lcdCursorYPos; // $A1A: Cursor Y Position 0x0101, // Word lcdCursorWidthHeight; // $A1C: Cursor Width and Height - { 0 }, // Byte ___filler32; + 0, // Byte ___filler32; 0x7F, // Byte lcdBlinkControl; // $A1F: Blink Control Register 0x00, // Byte lcdPanelControl; // $A20: Panel Interface Control Register 0x00, // Byte lcdPolarity; // $A21: Polarity Config Register - { 0 }, // Byte ___filler33; + 0, // Byte ___filler33; 0x00, // Byte lcdACDRate; // $A23: ACD (M) Rate Control Register - { 0 }, // Byte ___filler34; + 0, // Byte ___filler34; 0x00, // Byte lcdPixelClock; // $A25: Pixel Clock Divider Register - { 0 }, // Byte ___filler35; + 0, // Byte ___filler35; 0x40, // Byte lcdClockControl; // $A27: Clocking Control Register - { 0 }, // Byte ___filler36; + 0, // Byte ___filler36; 0xFF, // Byte lcdRefreshRateAdj; // $A29: Refresh Rate Adjustment Register { 0 }, // Byte ___filler2003[0xA2D-0xA2A]; 0x00, // Byte lcdPanningOffset; // $A2D: Panning Offset Register @@ -210,10 +210,10 @@ static const HwrM68EZ328Type kInitial68E { 0 }, // Byte ___filler37[0xA31-0xA2E]; 0xB9, // Byte lcdFrameRate; // $A31: Frame Rate Control Modulation Register - { 0 }, // Byte ___filler2004; + 0, // Byte ___filler2004; 0x84, // Byte lcdGrayPalette; // $A33: Gray Palette Mapping Register 0x00, // Byte lcdReserved; // $A34: Reserved - { 0 }, // Byte ___filler2005; + 0, // Byte ___filler2005; 0x0000, // Word lcdContrastControlPWM; // $A36: Contrast Control { 0 }, // Byte ___filler40[0xB00-0xA38]; @@ -1418,7 +1418,7 @@ uint32 EmRegsEZ::uartRead (emuptr addres { // If this is a full read, get the next byte from the FIFO. - Bool refreshRxData = (address == addressof (uReceive)) && (size == 2); + Bool refreshRxData = (address == my_addressof (uReceive)) && (size == 2); // See if there's anything new ("Put the data on the bus") @@ -1571,7 +1571,7 @@ void EmRegsEZ::intStatusHiWrite (emuptr // accessing the upper byte, just return. If we're accessing the lower // byte, we can treat it as a 2-byte access. - else if (size == 1 && address == addressof (intStatusHi)) + else if (size == 1 && address == my_addressof (intStatusHi)) return; // Now we can treat the rest of this function as a word-write to intStatusHi. @@ -1789,8 +1789,8 @@ void EmRegsEZ::uartWrite(emuptr address, // be transmitted. Bool sendTxData = - ((address == addressof (uTransmit)) && (size == 2)) || - ((address == addressof (uTransmit) + 1) && (size == 1)); + ((address == my_addressof (uTransmit)) && (size == 2)) || + ((address == my_addressof (uTransmit) + 1) && (size == 1)); // React to any changes. @@ -1814,15 +1814,15 @@ void EmRegsEZ::lcdRegisterWrite (emuptr // Note what changed. - if (address == addressof (lcdScreenWidth)) + if (address == my_addressof (lcdScreenWidth)) { EmScreen::InvalidateAll (); } - else if (address == addressof (lcdScreenHeight)) + else if (address == my_addressof (lcdScreenHeight)) { EmScreen::InvalidateAll (); } - else if (address == addressof (lcdPanelControl)) + else if (address == my_addressof (lcdPanelControl)) { // hwrEZ328LcdPanelControlGrayScale is incorrectly defined as 0x01, // so use the hard-coded value of 0x03 here. @@ -1833,7 +1833,7 @@ void EmRegsEZ::lcdRegisterWrite (emuptr EmScreen::InvalidateAll (); } } - else if (address == addressof (lcdStartAddr)) + else if (address == my_addressof (lcdStartAddr)) { // Make sure the low-bit is always zero. // Make sure bits 31-29 are always zero. @@ -1843,7 +1843,7 @@ void EmRegsEZ::lcdRegisterWrite (emuptr EmScreen::InvalidateAll (); } - else if (address == addressof (lcdPageWidth)) + else if (address == my_addressof (lcdPageWidth)) { if (value != oldValue) { @@ -1882,7 +1882,7 @@ void EmRegsEZ::rtcIntStatusWrite (emuptr // doing a byte-write to the lower byte, this extension will happen // automatically. - if (address == addressof (rtcIntStatus) && size == 1) + if (address == my_addressof (rtcIntStatus) && size == 1) value <<= 8; // Get the current value.