File pose-gcc421.patch of Package pose
--- SrcShared/EmStream.h.orig 2002-03-29 14:11:14.000000000 +0100
+++ SrcShared/EmStream.h 2008-12-05 16:17:13.000000000 +0100
@@ -15,6 +15,7 @@
#include <string>
#include <vector>
+
// ---------------------------------------------------------------------------
enum StreamFromType
@@ -90,7 +91,7 @@
container.resize (numElements);
- deque<T>::iterator iter = container.begin ();
+typename std::deque<T>::iterator iter = container.begin ();
while (iter != container.end ())
{
*this >> *iter;
@@ -108,7 +109,7 @@
container.resize (numElements);
- list<T>::iterator iter = container.begin ();
+ typename list<T>::iterator iter = container.begin ();
while (iter != container.end ())
{
*this >> *iter;
@@ -126,7 +127,7 @@
container.resize (numElements);
- vector<T>::iterator iter = container.begin ();
+ typename vector<T>::iterator iter = container.begin ();
while (iter != container.end ())
{
*this >> *iter;
@@ -143,7 +144,7 @@
*this << numElements;
- deque<T>::const_iterator iter = container.begin ();
+ typename deque<T>::const_iterator iter = container.begin ();
while (iter != container.end ())
{
*this << *iter;
@@ -160,7 +161,7 @@
*this << numElements;
- list<T>::const_iterator iter = container.begin ();
+ typename list<T>::const_iterator iter = container.begin ();
while (iter != container.end ())
{
*this << *iter;
@@ -177,7 +178,7 @@
*this << numElements;
- vector<T>::const_iterator iter = container.begin ();
+ typename vector<T>::const_iterator iter = container.begin ();
while (iter != container.end ())
{
*this << *iter;
--- SrcShared/Hardware/EmRegs.h 2002-03-29 14:11:18.000000000 +0100
+++ SrcShared/Hardware/EmRegs.h.new 2008-12-08 12:15:35.000000000 +0100
@@ -44,6 +44,8 @@
virtual uint8* GetRealAddress (emuptr address) = 0;
virtual emuptr GetAddressStart (void) = 0;
virtual uint32 GetAddressRange (void) = 0;
+ uint32 StdRead (emuptr address, int size);
+ void StdWrite (emuptr address, int size, uint32 value);
protected:
typedef uint32 (EmRegs::*ReadFunction) (emuptr address, int size);
@@ -54,12 +56,10 @@
uint32 start, int count);
uint32 UnsupportedRead (emuptr address, int size);
- uint32 StdRead (emuptr address, int size);
uint32 StdReadBE (emuptr address, int size);
uint32 ZeroRead (emuptr address, int size);
void UnsupportedWrite (emuptr address, int size, uint32 value);
- void StdWrite (emuptr address, int size, uint32 value);
void StdWriteBE (emuptr address, int size, uint32 value);
void NullWrite (emuptr address, int size, uint32 value);
--- SrcShared/Hardware/EmRegs328.cpp 2002-03-29 14:11:18.000000000 +0100
+++ SrcShared/Hardware/EmRegs328.cpp.new 2008-12-08 12:03:13.000000000 +0100
@@ -141,13 +141,13 @@
0x2400, // Word pllControl; // $200: PLL Control Register
0x0123, // Word pllFreqSel; // $202: PLL Frequency Select Register
0x0000, // Word pllTest; // $204: PLL Test Register
- { 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
@@ -162,21 +162,21 @@
0x00, // Byte portADir; // $400: Port A Direction Register
0x00, // Byte portAData; // $401: Port A Data Register
- { 0 }, // Byte ___filler5;
+ 0, // Byte ___filler5;
0x00, // Byte portASelect; // $403: Port A Select Register
{ 0 }, // Byte ___filler6[4];
0x00, // Byte portBDir; // $408: Port B Direction Register
0x00, // Byte portBData; // $409: Port B Data Register
- { 0 }, // Byte ___filler7;
+ 0, // Byte ___filler7;
0x00, // Byte portBSelect; // $40B: Port B Select Register
{ 0 }, // Byte ___filler8[4];
0x00, // Byte portCDir; // $410: Port C Direction Register
0x00, // Byte portCData; // $411: Port C Data Register
- { 0 }, // Byte ___filler9;
+ 0, // Byte ___filler9;
0x00, // Byte portCSelect; // $413: Port C Select Register
{ 0 }, // Byte ___filler10[4];
@@ -184,10 +184,10 @@
0x00, // Byte portDDir; // $418: Port D Direction Register
0x00, // Byte portDData; // $419: Port D Data Register
0xFF, // Byte portDPullupEn; // $41A: Port D Pull-up Enable
- { 0 }, // Byte ___filler11;
+ 0, // Byte ___filler11;
0x00, // Byte portDPolarity; // $41C: Port D Polarity Register
0x00, // Byte portDIntReqEn; // $41D: Port D Interrupt Request Enable
- { 0 }, // Byte ___filler12;
+ 0, // Byte ___filler12;
0x00, // Byte portDIntEdge; // $41F: Port D IRQ Edge Register
0x00, // Byte portEDir; // $420: Port E Direction Register
@@ -213,7 +213,7 @@
0x00, // Byte portJDir; // $438: Port J Direction Register
0x00, // Byte portJData; // $439: Port J Data Register
- { 0 }, // Byte ___filler19;
+ 0, // Byte ___filler19;
0x00, // Byte portJSelect; // $43B: Port J Select Register
{ 0 }, // Byte ___filler19a[4];
@@ -279,7 +279,7 @@
{ 0 }, // Byte ___filler28[0xA00-0x90A];
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
@@ -288,7 +288,7 @@
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
--- SrcShared/Hardware/EmRegsEZ.cpp 2002-03-29 14:11:18.000000000 +0100
+++ SrcShared/Hardware/EmRegsEZ.cpp.new 2008-12-08 12:05:14.000000000 +0100
@@ -84,13 +84,13 @@
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 @@
{ 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 @@
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 @@
{ 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];
--- SrcShared/Hardware/EmRegsVZ.cpp 2002-03-29 14:11:19.000000000 +0100
+++ SrcShared/Hardware/EmRegsVZ.cpp.new 2008-12-08 12:11:14.000000000 +0100
@@ -270,7 +270,7 @@
{ 0 }, // UInt8 ___filler28a[0xA00-0x91E];
0x00000000, // UInt32 lcdStartAddr; // $A00: Screen Starting Address Register
- { 0 }, // UInt8 ___filler29;
+ 0, // UInt8 ___filler29;
0xFF, // UInt8 lcdPageWidth; // $A05: Virtual Page Width Register
{ 0 }, // UInt8 ___filler30[2];
0x03F0, // UInt16 lcdScreenWidth; // $A08: Screen Width Register
@@ -279,29 +279,29 @@
0x0000, // UInt16 lcdCursorXPos; // $A18: Cursor X Position
0x0000, // UInt16 lcdCursorYPos; // $A1A: Cursor Y Position
0x0101, // UInt16 lcdCursorWidthHeight; // $A1C: Cursor Width and Height
- { 0 }, // UInt8 ___filler32;
+ 0, // UInt8 ___filler32;
0x7F, // UInt8 lcdBlinkControl; // $A1F: Blink Control Register
0x00, // UInt8 lcdPanelControl; // $A20: Panel Interface Configuration Register
0x00, // UInt8 lcdPolarity; // $A21: Polarity Config Register
- { 0 }, // UInt8 ___filler33;
+ 0, // UInt8 ___filler33;
0x00, // UInt8 lcdACDRate; // $A23: ACD (M) Rate Control Register
- { 0 }, // UInt8 ___filler34;
+ 0, // UInt8 ___filler34;
0x00, // UInt8 lcdPixelClock; // $A25: Pixel Clock Divider Register
- { 0 }, // UInt8 ___filler35;
+ 0, // UInt8 ___filler35;
0x00, // UInt8 lcdClockControl; // $A27: Clocking Control Register
0x00FF, // UInt16 lcdRefreshRateAdj; // $A28: Refresh Rate Adjustment Register
- { 0 }, // UInt8 ___filler37;
+ 0, // UInt8 ___filler37;
0x00, // UInt8 lcdReserved1; // $A2B: Reserved
- { 0 }, // UInt8 ___filler38;
+ 0, // UInt8 ___filler38;
0x00, // UInt8 lcdPanningOffset; // $A2D: Panning Offset Register
{ 0 }, // UInt8 ___filler39[0xA31-0xA2E];
0x00, // UInt8 lcdFrameRate; // $A31: Frame Rate Control Modulation Register
- { 0 }, // UInt8 ___filler2004;
+ 0, // UInt8 ___filler2004;
0x84, // UInt8 lcdGrayPalette; // $A33: Gray Palette Mapping Register
0x00, // UInt8 lcdReserved2; // $A34: Reserved
- { 0 }, // UInt8 ___filler2005;
+ 0, // UInt8 ___filler2005;
0x0000, // UInt16 lcdContrastControlPWM; // $A36: Contrast Control
0x00, // UInt8 lcdRefreshModeControl; // $A38: Refresh Mode Control Register
0x62, // UInt8 lcdDMAControl; // $A39: DMA Control Register
--- SrcShared/EmPalmStructs.h 2002-03-29 14:11:14.000000000 +0100
+++ SrcShared/EmPalmStructs.h.new 2008-12-08 13:03:34.000000000 +0100
@@ -488,7 +488,16 @@
MAKE_ONE_SCALAR_ALIAS_ASSIGNMENT_OPERATOR(type, asType, unsigned short) \
MAKE_ONE_SCALAR_ALIAS_ASSIGNMENT_OPERATOR(type, asType, unsigned int) \
MAKE_ONE_SCALAR_ALIAS_ASSIGNMENT_OPERATOR(type, asType, unsigned long) \
- MAKE_ONE_SCALAR_ALIAS_ASSIGNMENT_OPERATOR(type, asType, const void*) \
+ template <class A> \
+ INLINE_ EmAlias##type<A>& EmAlias##type<A>::operator= (const void* val) \
+ { long tmp = (long) val; \
+ if (sizeof (asType) == 1) A::PutByte (this->GetPtr (), (unsigned char) (asType) tmp); \
+ else if (sizeof (asType) == 2) A::PutWord (this->GetPtr (), (unsigned short) (asType) tmp); \
+ else if (sizeof (asType) == 4) A::PutLong (this->GetPtr (), (unsigned long) (asType) tmp); \
+ else BadSetter (); \
+ \
+ return *this; \
+ } \
MAKE_ONE_SCALAR_ALIAS_ASSIGNMENT_OPERATOR(type, asType, const EmAlias##type<A>&)\
\
template <class A> \
@@ -539,7 +548,15 @@
MAKE_ONE_SCALAR_PROXY_ASSIGNMENT_OPERATOR(type, asType, unsigned short) \
MAKE_ONE_SCALAR_PROXY_ASSIGNMENT_OPERATOR(type, asType, unsigned int) \
MAKE_ONE_SCALAR_PROXY_ASSIGNMENT_OPERATOR(type, asType, unsigned long) \
- MAKE_ONE_SCALAR_PROXY_ASSIGNMENT_OPERATOR(type, asType, const void*) \
+ INLINE_ EmProxy##type& EmProxy##type::operator= (const void * val) \
+ { long tmp = (long) val; \
+ if (sizeof (asType) == 1) LAS::PutByte (this->GetPtr (), (unsigned char) (asType) tmp); \
+ else if (sizeof (asType) == 2) LAS::PutWord (this->GetPtr (), (unsigned short) (asType) tmp); \
+ else if (sizeof (asType) == 4) LAS::PutLong (this->GetPtr (), (unsigned long) (asType) tmp); \
+ else BadSetter (); \
+ \
+ return *this; \
+ } \
MAKE_ONE_SCALAR_PROXY_ASSIGNMENT_OPERATOR(type, asType, const EmProxy##type&) \
\
INLINE_ EmProxy##type::operator type (void) const \