summaryrefslogtreecommitdiff
path: root/emulators/palmosemulator
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2015-04-21 17:15:20 +0000
committerjoerg <joerg@pkgsrc.org>2015-04-21 17:15:20 +0000
commit21cc5f2c338514d33bed9400ce8b050855443656 (patch)
tree78bf41d9722457154bff7724c15363bd5147e14d /emulators/palmosemulator
parent9397f2270a9715e7dd9a28e9e507ca648ebda2f2 (diff)
downloadpkgsrc-21cc5f2c338514d33bed9400ce8b050855443656.tar.gz
addressof is part of STL, so rename the macro.
Diffstat (limited to 'emulators/palmosemulator')
-rw-r--r--emulators/palmosemulator/distinfo24
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegs328Prv.h22
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsASICSymbol1700.cpp41
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsEZPrv.h22
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsEZTRGpro.cpp13
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsMediaQ11xx.cpp36
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsPLDPalmVIIEZ.cpp22
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsSED1375.cpp40
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsSED1376.cpp31
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsUSBPhilipsPDIUSBD12.cpp24
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsUSBVisor.cpp22
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZHandEra330.cpp29
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZPalmM505.cpp13
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZPrv.h22
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZTemp.cpp24
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_PreferenceMgr.cpp63
-rw-r--r--emulators/palmosemulator/patches/patch-SrcShared_PreferenceMgr.h32
-rw-r--r--emulators/palmosemulator/patches/patch-ak92
-rw-r--r--emulators/palmosemulator/patches/patch-al89
-rw-r--r--emulators/palmosemulator/patches/patch-am105
20 files changed, 741 insertions, 25 deletions
diff --git a/emulators/palmosemulator/distinfo b/emulators/palmosemulator/distinfo
index 369472b9515..855a8d72c47 100644
--- a/emulators/palmosemulator/distinfo
+++ b/emulators/palmosemulator/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2012/06/19 20:29:34 asau Exp $
+$NetBSD: distinfo,v 1.12 2015/04/21 17:15:20 joerg Exp $
SHA1 (palmosemulator/emulator_src_3.5.tar.gz) = 2debd7690736397d0af41f7b2d482df65391fc65
RMD160 (palmosemulator/emulator_src_3.5.tar.gz) = fbb6761e4c43ecc9fb20d90d2ae0ec6ccf1c3f27
@@ -6,6 +6,22 @@ Size (palmosemulator/emulator_src_3.5.tar.gz) = 3162363 bytes
SHA1 (palmosemulator/emulator-skins-19.tar.gz) = 70b0497061d6877a4e3c6a378fa647c64fe3e019
RMD160 (palmosemulator/emulator-skins-19.tar.gz) = 9b4e16f50b1d2b9ad9b17e3a104c34a983d0a4ba
Size (palmosemulator/emulator-skins-19.tar.gz) = 2443913 bytes
+SHA1 (patch-SrcShared_Hardware_EmRegs328Prv.h) = 6f60a4ef6056eee5909407f8369b3e1a21327bc6
+SHA1 (patch-SrcShared_Hardware_EmRegsASICSymbol1700.cpp) = a2154e85ad61cdaa9cc09829c6107842a0e9044b
+SHA1 (patch-SrcShared_Hardware_EmRegsEZPrv.h) = c4ecc99e5fd3a77891975c7d25af1e6a3ddbda96
+SHA1 (patch-SrcShared_Hardware_EmRegsEZTRGpro.cpp) = 319cc4f187eebdac7a46cbea5a432d4de8928f16
+SHA1 (patch-SrcShared_Hardware_EmRegsMediaQ11xx.cpp) = 66000dcb239dabaae8b6357f5b11ae9c67c21df6
+SHA1 (patch-SrcShared_Hardware_EmRegsPLDPalmVIIEZ.cpp) = c73d094601a4a4eccf4717b725469a59dd0e5add
+SHA1 (patch-SrcShared_Hardware_EmRegsSED1375.cpp) = 29fad68dcea246ec3ea75fac9eb86a95cf6f6a54
+SHA1 (patch-SrcShared_Hardware_EmRegsSED1376.cpp) = 4fe29a5caeac779843da1865898583aa49d1b534
+SHA1 (patch-SrcShared_Hardware_EmRegsUSBPhilipsPDIUSBD12.cpp) = 7d7ef982ab35214b1e27e882b9466a989ffe8418
+SHA1 (patch-SrcShared_Hardware_EmRegsUSBVisor.cpp) = dd22c6b01631ad4ecdd65b59cd7cfcaef9448334
+SHA1 (patch-SrcShared_Hardware_EmRegsVZHandEra330.cpp) = aa77709d63a9aff4faa143e8b7e38ea5b8f9aadf
+SHA1 (patch-SrcShared_Hardware_EmRegsVZPalmM505.cpp) = f242fab2da6db5273c304ad1c04d7dc28f0dddce
+SHA1 (patch-SrcShared_Hardware_EmRegsVZPrv.h) = 44c6460fd81dc3f59f1107f6584c68e8d8ed59b5
+SHA1 (patch-SrcShared_Hardware_EmRegsVZTemp.cpp) = c25b0c9ca60d16fcc04d192e13c9966e24651ea2
+SHA1 (patch-SrcShared_PreferenceMgr.cpp) = 49bf7e195c2f71cc8035b1e3faa13ca9fdeb9f8b
+SHA1 (patch-SrcShared_PreferenceMgr.h) = bcefbff3f92489a4b3699d1273d8679820e94cbc
SHA1 (patch-SrcUnix_EmDlgFltk.cpp) = 2b8582982dc02dfaa298f20ba342eebd58098207
SHA1 (patch-aa) = eef35ce5c3d91bf56903bb48c0c78bd333591fcc
SHA1 (patch-ab) = 061379a827d338e411e8ea53dc071cb668a6c524
@@ -17,9 +33,9 @@ SHA1 (patch-ag) = 9d4fba5f8bef808b8a00b71484c308da613d8140
SHA1 (patch-ah) = e3a79fa2c376711ea6479907cca923d1e872683e
SHA1 (patch-ai) = 0cbff6b3080ee9aa7e366ba4ba368d93f0560e04
SHA1 (patch-aj) = 958f070f7bc19f6a4c2f12a9d0ba280ed64136cb
-SHA1 (patch-ak) = d693bd15c982c95663f9f595fdcad6f80d5c2477
-SHA1 (patch-al) = 50342df4bb9d020f0b72be608d0656351dae4463
-SHA1 (patch-am) = 2790c8b567a94d86bced52d59cf62b4448b62731
+SHA1 (patch-ak) = 67fb02a1bdf657ef2d526accd6e368b38104803a
+SHA1 (patch-al) = 3603f0f1c124788910d1b3b8dcc7f9bcfd8f32d9
+SHA1 (patch-am) = 06e295c0c76e9d5691b3c6b88f4c281f22b673f5
SHA1 (patch-an) = 93e326e3ab9f532d5bab1cc987c179e8337a823d
SHA1 (patch-ao) = 9ace708f71d33802059db53c9242f0d89a77e4da
SHA1 (patch-ap) = 1fe9bf4a1d70230f2abb9375b9e439a3a163b4d7
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegs328Prv.h b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegs328Prv.h
new file mode 100644
index 00000000000..69b0cefb6a5
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegs328Prv.h
@@ -0,0 +1,22 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegs328Prv.h,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegs328Prv.h.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegs328Prv.h
+@@ -24,7 +24,7 @@ const uint32 kMemorySize = sizeof (HwrM
+
+ // Macro to return the Dragonball address of the specified register
+
+-#define addressof(x) (kMemoryStart + offsetof(HwrM68328Type, x))
++#define my_addressof(x) (kMemoryStart + offsetof(HwrM68328Type, x))
+
+
+ // Macros for reading/writing Dragonball registers.
+@@ -39,7 +39,7 @@ const uint32 kMemorySize = sizeof (HwrM
+ // Macro for installing Dragonball register handlers
+
+ #define INSTALL_HANDLER(read, write, reg) \
+- this->SetHandler ((ReadFunction) &EmRegs328::read, (WriteFunction) &EmRegs328::write, addressof (reg), sizeof (f68328Regs.reg))
++ this->SetHandler ((ReadFunction) &EmRegs328::read, (WriteFunction) &EmRegs328::write, my_addressof (reg), sizeof (f68328Regs.reg))
+
+
+ #endif /* EmRegs328Prv_h */
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsASICSymbol1700.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsASICSymbol1700.cpp
new file mode 100644
index 00000000000..97d9b05a4d7
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsASICSymbol1700.cpp
@@ -0,0 +1,41 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsASICSymbol1700.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsASICSymbol1700.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsASICSymbol1700.cpp
+@@ -17,7 +17,7 @@
+ // Given a register (specified by its field name), return its address
+ // in emulated space.
+
+-#define addressof(reg) \
++#define my_addressof(reg) \
+ (this->GetAddressStart () + fRegs.offsetof_##reg ())
+
+
+@@ -26,7 +26,7 @@
+ #define INSTALL_HANDLER(read, write, reg) \
+ this->SetHandler ( (ReadFunction) &EmRegsASICSymbol1700::read, \
+ (WriteFunction) &EmRegsASICSymbol1700::write, \
+- addressof (reg), \
++ my_addressof (reg), \
+ fRegs.reg.GetSize ())
+
+
+@@ -117,15 +117,15 @@ void EmRegsASICSymbol1700::SetSubBankHan
+ // installation of a field that's an array.
+ this->SetHandler ( (ReadFunction) &EmRegsASICSymbol1700::StdReadBE, \
+ (WriteFunction) &EmRegsASICSymbol1700::StdWriteBE, \
+- addressof (S24IO), \
++ my_addressof (S24IO), \
+ 64);
+ this->SetHandler ( (ReadFunction) &EmRegsASICSymbol1700::StdReadBE, \
+ (WriteFunction) &EmRegsASICSymbol1700::StdWriteBE, \
+- addressof (S24Attribute), \
++ my_addressof (S24Attribute), \
+ 32);
+ this->SetHandler ( (ReadFunction) &EmRegsASICSymbol1700::StdReadBE, \
+ (WriteFunction) &EmRegsASICSymbol1700::StdWriteBE, \
+- addressof (UART8251MacroSelect),\
++ my_addressof (UART8251MacroSelect),\
+ 4);
+
+ // INSTALL_HANDLER (StdReadBE, StdWriteBE, S24IO);
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsEZPrv.h b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsEZPrv.h
new file mode 100644
index 00000000000..cdd6929b3e2
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsEZPrv.h
@@ -0,0 +1,22 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsEZPrv.h,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsEZPrv.h.orig 2015-04-17 19:10:13.000000000 +0000
++++ SrcShared/Hardware/EmRegsEZPrv.h
+@@ -24,7 +24,7 @@ const uint32 kMemorySize = sizeof (HwrM
+
+ // Macro to return the DragonballEZ address of the specified register
+
+-#define addressof(x) (kMemoryStart + offsetof(HwrM68EZ328Type, x))
++#define my_addressof(x) (kMemoryStart + offsetof(HwrM68EZ328Type, x))
+
+
+ // Macros for reading/writing DragonballEZ registers.
+@@ -39,7 +39,7 @@ const uint32 kMemorySize = sizeof (HwrM
+ // Macro for installing DragonballEZ register handlers
+
+ #define INSTALL_HANDLER(read, write, reg) \
+- this->SetHandler ((ReadFunction) &EmRegsEZ::read, (WriteFunction) &EmRegsEZ::write, addressof (reg), sizeof (f68EZ328Regs.reg))
++ this->SetHandler ((ReadFunction) &EmRegsEZ::read, (WriteFunction) &EmRegsEZ::write, my_addressof (reg), sizeof (f68EZ328Regs.reg))
+
+
+ #endif /* EmRegsEZPrv_h */
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsEZTRGpro.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsEZTRGpro.cpp
new file mode 100644
index 00000000000..15121b6e520
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsEZTRGpro.cpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsEZTRGpro.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsEZTRGpro.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsEZTRGpro.cpp
+@@ -231,7 +231,7 @@ void EmRegsEZTRGpro::SetSubBankHandlers(
+ EmRegsEZ::SetSubBankHandlers();
+ this->SetHandler((ReadFunction)&EmRegs::StdRead,
+ (WriteFunction)&EmRegsEZTRGpro::spiWrite,
+- addressof(spiMasterData),
++ my_addressof(spiMasterData),
+ sizeof(f68EZ328Regs.spiMasterData));
+ }
+
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsMediaQ11xx.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsMediaQ11xx.cpp
new file mode 100644
index 00000000000..f35741fd182
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsMediaQ11xx.cpp
@@ -0,0 +1,36 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsMediaQ11xx.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsMediaQ11xx.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsMediaQ11xx.cpp
+@@ -659,7 +659,7 @@
+ // Given a register (specified by its field name), return its address
+ // in emulated space.
+
+-#define addressof(x) ( \
++#define my_addressof(x) ( \
+ ((emuptr) fRegs.x.GetPtr ()) - \
+ ((emuptr) fRegs.GetPtr ()) + \
+ ((emuptr) this->GetAddressStart ()) \
+@@ -671,7 +671,7 @@
+ #define INSTALL_HANDLER(read, write, reg) \
+ this->SetHandler ( (ReadFunction) &EmRegsMediaQ11xx::read, \
+ (WriteFunction) &EmRegsMediaQ11xx::write, \
+- addressof (reg), 4)
++ my_addressof (reg), 4)
+
+ // Private inline function for reading a LE register.
+
+@@ -1456,11 +1456,11 @@ void EmRegsMediaQ11xx::SetSubBankHandler
+
+ this->SetHandler ( (ReadFunction) &EmRegsMediaQ11xx::MQRead,
+ (WriteFunction) &EmRegsMediaQ11xx::invalidateWrite,
+- addressof (cpREG), 0x0400);
++ my_addressof (cpREG), 0x0400);
+
+ this->SetHandler ( (ReadFunction) &EmRegsMediaQ11xx::MQRead,
+ (WriteFunction) &EmRegsMediaQ11xx::SourceFifoWrite,
+- addressof (sfREG), 0x0400);
++ my_addressof (sfREG), 0x0400);
+
+ INSTALL_HANDLER (MQRead, MQWrite, udREG[0x00]);
+ INSTALL_HANDLER (MQRead, MQWrite, udREG[0x01]);
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsPLDPalmVIIEZ.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsPLDPalmVIIEZ.cpp
new file mode 100644
index 00000000000..f5c24a18fda
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsPLDPalmVIIEZ.cpp
@@ -0,0 +1,22 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsPLDPalmVIIEZ.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsPLDPalmVIIEZ.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsPLDPalmVIIEZ.cpp
+@@ -23,7 +23,7 @@
+ // Given a register (specified by its field name), return its address
+ // in emulated space.
+
+-#define addressof(reg) \
++#define my_addressof(reg) \
+ (this->GetAddressStart () + fRegs.offsetof_##reg ())
+
+
+@@ -32,7 +32,7 @@
+ #define INSTALL_HANDLER(read, write, reg) \
+ this->SetHandler ( (ReadFunction) &EmRegsPLDPalmVIIEZ::read, \
+ (WriteFunction) &EmRegsPLDPalmVIIEZ::write, \
+- addressof (reg), \
++ my_addressof (reg), \
+ fRegs.reg.GetSize ())
+
+
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsSED1375.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsSED1375.cpp
new file mode 100644
index 00000000000..20b09b12a1b
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsSED1375.cpp
@@ -0,0 +1,40 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsSED1375.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsSED1375.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsSED1375.cpp
+@@ -25,7 +25,7 @@
+ // Given a register (specified by its field name), return its address
+ // in emulated space.
+
+-#define addressof(reg) \
++#define my_addressof(reg) \
+ (this->GetAddressStart () + fRegs.offsetof_##reg ())
+
+
+@@ -34,7 +34,7 @@
+ #define INSTALL_HANDLER(read, write, reg) \
+ this->SetHandler ( (ReadFunction) &EmRegsSED1375::read, \
+ (WriteFunction) &EmRegsSED1375::write, \
+- addressof (reg), \
++ my_addressof (reg), \
+ fRegs.reg.GetSize ())
+
+
+@@ -425,7 +425,7 @@ uint32 EmRegsSED1375::lookUpTableDataRea
+ {
+ colorData = (uint8) ((clutEntry & kCLUTBlueMask) << 4); // Get the 4 bits of blue.
+
+- address = (emuptr) (addressof (lookUpTableAddress));
++ address = (emuptr) (my_addressof (lookUpTableAddress));
+ EmRegsSED1375::lookUpTableAddressWrite (address, 1, (clutIndex + 1) & 0xFF);
+ }
+
+@@ -470,7 +470,7 @@ void EmRegsSED1375::lookUpTableDataWrite
+ fClutData[clutIndex] &= ~kCLUTBlueMask; // Clear out old red bits.
+ fClutData[clutIndex] |= newColor >> 4; // Save in new blue bits.
+
+- address = (emuptr) (addressof (lookUpTableAddress));
++ address = (emuptr) (my_addressof (lookUpTableAddress));
+ EmRegsSED1375::lookUpTableAddressWrite (address, 1, (clutIndex + 1) & 0xFF);
+ }
+
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsSED1376.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsSED1376.cpp
new file mode 100644
index 00000000000..1f9d2d22b63
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsSED1376.cpp
@@ -0,0 +1,31 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsSED1376.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsSED1376.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsSED1376.cpp
+@@ -23,7 +23,7 @@
+ // Given a register (specified by its field name), return its address
+ // in emulated space.
+
+-#define addressof(reg) \
++#define my_addressof(reg) \
+ (this->GetAddressStart () + fRegs.offsetof_##reg ())
+
+
+@@ -32,7 +32,7 @@
+ #define INSTALL_HANDLER(read, write, reg) \
+ this->SetHandler ( (ReadFunction) &EmRegsSED1376::read, \
+ (WriteFunction) &EmRegsSED1376::write, \
+- addressof (reg), \
++ my_addressof (reg), \
+ fRegs.reg.GetSize ())
+
+ // Panel type register [10h]
+@@ -457,7 +457,7 @@ void EmRegsSED1376VisorPrism::SetSubBank
+ #define INSTALL_HANDLER(read, write, reg) \
+ this->SetHandler ( (ReadFunction) &EmRegsSED1376VisorPrism::read, \
+ (WriteFunction) &EmRegsSED1376VisorPrism::write, \
+- addressof (reg), \
++ my_addressof (reg), \
+ fRegs.reg.GetSize ())
+
+ INSTALL_HANDLER (StdReadBE, reservedWrite, reserved);
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsUSBPhilipsPDIUSBD12.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsUSBPhilipsPDIUSBD12.cpp
new file mode 100644
index 00000000000..8fe18e38429
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsUSBPhilipsPDIUSBD12.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsUSBPhilipsPDIUSBD12.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsUSBPhilipsPDIUSBD12.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsUSBPhilipsPDIUSBD12.cpp
+@@ -18,8 +18,8 @@
+ // Given a register (specified by its field name), return its address
+ // in emulated space.
+
+-#undef addressof
+-#define addressof(reg) \
++#undef my_addressof
++#define my_addressof(reg) \
+ (this->GetAddressStart () + fRegs.offsetof_##reg ())
+
+
+@@ -29,7 +29,7 @@
+ #define INSTALL_HANDLER(read, write, reg) \
+ this->SetHandler ( (ReadFunction) &EmRegsUSBPhilipsPDIUSBD12::read, \
+ (WriteFunction) &EmRegsUSBPhilipsPDIUSBD12::write, \
+- addressof (reg), \
++ my_addressof (reg), \
+ fRegs.reg.GetSize ())
+
+
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsUSBVisor.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsUSBVisor.cpp
new file mode 100644
index 00000000000..ce6b9e4f39a
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsUSBVisor.cpp
@@ -0,0 +1,22 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsUSBVisor.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsUSBVisor.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsUSBVisor.cpp
+@@ -22,7 +22,7 @@
+ // Given a register (specified by its field name), return its address
+ // in emulated space.
+
+-#define addressof(reg) \
++#define my_addressof(reg) \
+ (this->GetAddressStart () + fRegs.offsetof_##reg ())
+
+
+@@ -31,7 +31,7 @@
+ #define INSTALL_HANDLER(read, write, reg) \
+ this->SetHandler ( (ReadFunction) &EmRegsUSBVisor::read, \
+ (WriteFunction) &EmRegsUSBVisor::write, \
+- addressof (reg), \
++ my_addressof (reg), \
+ fRegs.reg.GetSize ())
+
+
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZHandEra330.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZHandEra330.cpp
new file mode 100644
index 00000000000..d54e3770541
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZHandEra330.cpp
@@ -0,0 +1,29 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsVZHandEra330.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsVZHandEra330.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsVZHandEra330.cpp
+@@ -589,20 +589,20 @@ void EmRegsVZHandEra330::SetSubBankHandl
+ // SD support
+ this->SetHandler((ReadFunction)&EmRegsVZHandEra330::spiRxDRead,
+ (WriteFunction)&EmRegsVZ::StdWrite,
+- addressof(spiRxD),
++ my_addressof(spiRxD),
+ sizeof(UInt16));
+ this->SetHandler((ReadFunction)&EmRegsVZ::StdRead,
+ (WriteFunction)&EmRegsVZHandEra330::spiTxDWrite,
+- addressof(spiTxD),
++ my_addressof(spiTxD),
+ sizeof(UInt16));
+ this->SetHandler((ReadFunction)&EmRegsVZ::StdRead,
+ (WriteFunction)&EmRegsVZHandEra330::spiCont1Write,
+- addressof(spiCont1),
++ my_addressof(spiCont1),
+ sizeof(UInt16));
+ /*
+ this->SetHandler((ReadFunction)&EmRegsVZHandEra330::spiIntCSRead,
+ (WriteFunction)&EmRegsVZHandEra330::spiIntCSWrite,
+- addressof(spiIntCS),
++ my_addressof(spiIntCS),
+ sizeof(regs.spiIntCS));
+ */
+ }
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZPalmM505.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZPalmM505.cpp
new file mode 100644
index 00000000000..d843193745a
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZPalmM505.cpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsVZPalmM505.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsVZPalmM505.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsVZPalmM505.cpp
+@@ -52,7 +52,7 @@ void EmRegsVZPalmM505::SetSubBankHandler
+
+ this->SetHandler ((ReadFunction) &EmRegsVZ::StdRead,
+ (WriteFunction) &EmRegsVZPalmM505::portFSelectWrite,
+- addressof (portFSelect), sizeof (f68VZ328Regs.portFSelect));
++ my_addressof (portFSelect), sizeof (f68VZ328Regs.portFSelect));
+ }
+
+
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZPrv.h b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZPrv.h
new file mode 100644
index 00000000000..d6fc5236613
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZPrv.h
@@ -0,0 +1,22 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsVZPrv.h,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsVZPrv.h.orig 2015-04-17 19:10:13.000000000 +0000
++++ SrcShared/Hardware/EmRegsVZPrv.h
+@@ -24,7 +24,7 @@ const uint32 kMemorySize = sizeof (HwrM
+
+ // Macro to return the DragonballVZ address of the specified register
+
+-#define addressof(x) (kMemoryStart + offsetof(HwrM68VZ328Type, x))
++#define my_addressof(x) (kMemoryStart + offsetof(HwrM68VZ328Type, x))
+
+
+ // Macros for reading/writing DragonballVZ registers.
+@@ -39,7 +39,7 @@ const uint32 kMemorySize = sizeof (HwrM
+ // Macro for installing DragonballVZ register handlers
+
+ #define INSTALL_HANDLER(read, write, reg) \
+- this->SetHandler ((ReadFunction) &EmRegsVZ::read, (WriteFunction) &EmRegsVZ::write, addressof (reg), sizeof (f68VZ328Regs.reg))
++ this->SetHandler ((ReadFunction) &EmRegsVZ::read, (WriteFunction) &EmRegsVZ::write, my_addressof (reg), sizeof (f68VZ328Regs.reg))
+
+
+ #endif /* EmRegsVZPrv_h */
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZTemp.cpp b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZTemp.cpp
new file mode 100644
index 00000000000..d328859ac43
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_Hardware_EmRegsVZTemp.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-SrcShared_Hardware_EmRegsVZTemp.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/Hardware/EmRegsVZTemp.cpp.orig 2015-04-17 19:10:12.000000000 +0000
++++ SrcShared/Hardware/EmRegsVZTemp.cpp
+@@ -626,8 +626,8 @@ EmSPISlave* EmRegsVZPalmM130::GetSPISlav
+ // Given a register (specified by its field name), return its address
+ // in emulated space.
+
+-#undef addressof
+-#define addressof(reg) \
++#undef my_addressof
++#define my_addressof(reg) \
+ (this->GetAddressStart () + fRegs.offsetof_##reg ())
+
+
+@@ -637,7 +637,7 @@ EmSPISlave* EmRegsVZPalmM130::GetSPISlav
+ #define INSTALL_HANDLER(read, write, reg) \
+ this->SetHandler ( (ReadFunction) &EmRegsPLDPalmI705::read, \
+ (WriteFunction) &EmRegsPLDPalmI705::write, \
+- addressof (reg), \
++ my_addressof (reg), \
+ fRegs.reg.GetSize ())
+
+
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_PreferenceMgr.cpp b/emulators/palmosemulator/patches/patch-SrcShared_PreferenceMgr.cpp
new file mode 100644
index 00000000000..1d6f1d81e43
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_PreferenceMgr.cpp
@@ -0,0 +1,63 @@
+$NetBSD: patch-SrcShared_PreferenceMgr.cpp,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/PreferenceMgr.cpp.orig 2002-03-29 13:11:17.000000000 +0000
++++ SrcShared/PreferenceMgr.cpp
+@@ -232,58 +232,6 @@ void BasePreference::Save (void)
+ //
+ // ----------------------------------------------------------------------
+
+-
+-/***********************************************************************
+- *
+- * FUNCTION: Preference<T> constructor
+- *
+- * DESCRIPTION: Calls BasePreference to initialize the base members,
+- * then calls Load() to load the data.
+- *
+- * PARAMETERS: name - name of the key used to fetch the data.
+- *
+- * RETURNED: Nothing.
+- *
+- ***********************************************************************/
+-
+-template <class T>
+-Preference<T>::Preference (PrefKeyType name, bool acquireLock) :
+- BasePreference (name, acquireLock),
+- fValue (T())
+-{
+- this->Load ();
+-}
+-
+-template <class T>
+-Preference<T>::Preference (long index, bool acquireLock) :
+- BasePreference (index, acquireLock),
+- fValue (T())
+-{
+- this->Load ();
+-}
+-
+-
+-
+-/***********************************************************************
+- *
+- * FUNCTION: Preference<T> destructor
+- *
+- * DESCRIPTION: Ensures that any changes are flushed back to the
+- * preference collection before destructing the base class.
+- *
+- * PARAMETERS: None.
+- *
+- * RETURNED: Nothing.
+- *
+- ***********************************************************************/
+-
+-template <class T>
+-Preference<T>::~Preference (void)
+-{
+- this->Save ();
+-}
+-
+-
+ /***********************************************************************
+ *
+ * FUNCTION: Preference<T>::DoLoad
diff --git a/emulators/palmosemulator/patches/patch-SrcShared_PreferenceMgr.h b/emulators/palmosemulator/patches/patch-SrcShared_PreferenceMgr.h
new file mode 100644
index 00000000000..f9bd9f0b5c5
--- /dev/null
+++ b/emulators/palmosemulator/patches/patch-SrcShared_PreferenceMgr.h
@@ -0,0 +1,32 @@
+$NetBSD: patch-SrcShared_PreferenceMgr.h,v 1.1 2015/04/21 17:15:20 joerg Exp $
+
+--- SrcShared/PreferenceMgr.h.orig 2015-04-17 19:45:54.000000000 +0000
++++ SrcShared/PreferenceMgr.h
+@@ -115,9 +115,24 @@ template <class T>
+ class Preference : public BasePreference
+ {
+ public:
+- Preference (PrefKeyType name, bool = true);
+- Preference (long index, bool = true);
+- virtual ~Preference (void);
++ Preference (PrefKeyType name, bool acquireLock = true) :
++ BasePreference (name, acquireLock),
++ fValue (T())
++ {
++ this->Load ();
++ }
++
++ Preference (long index, bool acquireLock = true) :
++ BasePreference (index, acquireLock),
++ fValue (T())
++ {
++ this->Load ();
++ }
++
++ ~Preference ()
++ {
++ this->Save ();
++ }
+
+ // I would *like* to have these operators. That way, I could pass in a
+ // "Preference<Foo>" any place that accepts a "const Foo&" as a parameter.
diff --git a/emulators/palmosemulator/patches/patch-ak b/emulators/palmosemulator/patches/patch-ak
index b4821a504b1..027ee0c7dcd 100644
--- a/emulators/palmosemulator/patches/patch-ak
+++ b/emulators/palmosemulator/patches/patch-ak
@@ -1,8 +1,8 @@
-$NetBSD: patch-ak,v 1.1 2004/03/20 20:21:22 kristerw Exp $
+$NetBSD: patch-ak,v 1.2 2015/04/21 17:15:20 joerg Exp $
---- SrcShared/Hardware/EmRegs328.cpp.orig Sat Mar 20 17:48:57 2004
-+++ SrcShared/Hardware/EmRegs328.cpp Sat Mar 20 18:11:46 2004
-@@ -141,13 +141,13 @@
+--- SrcShared/Hardware/EmRegs328.cpp.orig 2002-03-29 13:11:18.000000000 +0000
++++ SrcShared/Hardware/EmRegs328.cpp
+@@ -141,13 +141,13 @@ const HwrM68328Type kInitial68328Registe
0x2400, // Word pllControl; // $200: PLL Control Register
0x0123, // Word pllFreqSel; // $202: PLL Frequency Select Register
0x0000, // Word pllTest; // $204: PLL Test Register
@@ -18,7 +18,7 @@ $NetBSD: patch-ak,v 1.1 2004/03/20 20:21:22 kristerw Exp $
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 @@
+@@ -162,21 +162,21 @@ const HwrM68328Type kInitial68328Registe
0x00, // Byte portADir; // $400: Port A Direction Register
0x00, // Byte portAData; // $401: Port A Data Register
@@ -43,7 +43,7 @@ $NetBSD: patch-ak,v 1.1 2004/03/20 20:21:22 kristerw Exp $
0x00, // Byte portCSelect; // $413: Port C Select Register
{ 0 }, // Byte ___filler10[4];
-@@ -184,10 +184,10 @@
+@@ -184,10 +184,10 @@ const HwrM68328Type kInitial68328Registe
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
@@ -56,7 +56,7 @@ $NetBSD: patch-ak,v 1.1 2004/03/20 20:21:22 kristerw Exp $
0x00, // Byte portDIntEdge; // $41F: Port D IRQ Edge Register
0x00, // Byte portEDir; // $420: Port E Direction Register
-@@ -213,7 +213,7 @@
+@@ -213,7 +213,7 @@ const HwrM68328Type kInitial68328Registe
0x00, // Byte portJDir; // $438: Port J Direction Register
0x00, // Byte portJData; // $439: Port J Data Register
@@ -65,7 +65,7 @@ $NetBSD: patch-ak,v 1.1 2004/03/20 20:21:22 kristerw Exp $
0x00, // Byte portJSelect; // $43B: Port J Select Register
{ 0 }, // Byte ___filler19a[4];
-@@ -279,7 +279,7 @@
+@@ -279,7 +279,7 @@ const HwrM68328Type kInitial68328Registe
{ 0 }, // Byte ___filler28[0xA00-0x90A];
0x00000000, // DWord lcdStartAddr; // $A00: Screen Starting Address Register
@@ -74,7 +74,7 @@ $NetBSD: patch-ak,v 1.1 2004/03/20 20:21:22 kristerw Exp $
0xFF, // Byte lcdPageWidth; // $A05: Virtual Page Width Register
{ 0 }, // Byte ___filler30[2];
0x03FF, // Word lcdScreenWidth; // $A08: Screen Width Register
-@@ -288,7 +288,7 @@
+@@ -288,7 +288,7 @@ const HwrM68328Type kInitial68328Registe
0x0000, // Word lcdCursorXPos; // $A18: Cursor X Position
0x0000, // Word lcdCursorYPos; // $A1A: Cursor Y Position
0x0101, // Word lcdCursorWidthHeight; // $A1C: Cursor Width and Height
@@ -83,3 +83,77 @@ $NetBSD: patch-ak,v 1.1 2004/03/20 20:21:22 kristerw Exp $
0x7F, // Byte lcdBlinkControl; // $A1F: Blink Control Register
0x00, // Byte lcdPanelControl; // $A20: Panel Interface Control Register
0x00, // Byte lcdPolarity; // $A21: Polarity Config Register
+@@ -1592,7 +1592,7 @@ uint32 EmRegs328::uartRead (emuptr addre
+ {
+ // 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")
+
+@@ -1753,7 +1753,7 @@ void EmRegs328::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.
+@@ -2000,8 +2000,8 @@ void EmRegs328::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.
+
+@@ -2025,22 +2025,22 @@ void EmRegs328::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))
+ {
+ if (((value ^ oldValue) & hwr328LcdPanelControlGrayScale) != 0)
+ {
+ EmScreen::InvalidateAll ();
+ }
+ }
+- else if (address == addressof (lcdStartAddr))
++ else if (address == my_addressof (lcdStartAddr))
+ {
+ // Make sure the low-bit is always zero.
+
+@@ -2049,7 +2049,7 @@ void EmRegs328::lcdRegisterWrite(emuptr
+
+ EmScreen::InvalidateAll ();
+ }
+- else if (address == addressof (lcdPageWidth))
++ else if (address == my_addressof (lcdPageWidth))
+ {
+ if (value != oldValue)
+ {
+@@ -2088,7 +2088,7 @@ void EmRegs328::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.
diff --git a/emulators/palmosemulator/patches/patch-al b/emulators/palmosemulator/patches/patch-al
index 2e11fd04678..1e4089f52e8 100644
--- a/emulators/palmosemulator/patches/patch-al
+++ b/emulators/palmosemulator/patches/patch-al
@@ -1,8 +1,8 @@
-$NetBSD: patch-al,v 1.1 2004/03/20 20:21:22 kristerw Exp $
+$NetBSD: patch-al,v 1.2 2015/04/21 17:15:20 joerg Exp $
---- SrcShared/Hardware/EmRegsEZ.cpp.orig Sat Mar 20 20:22:20 2004
-+++ SrcShared/Hardware/EmRegsEZ.cpp Sat Mar 20 20:24:11 2004
-@@ -84,13 +84,13 @@
+--- 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)
@@ -18,7 +18,7 @@ $NetBSD: patch-al,v 1.1 2004/03/20 20:21:22 kristerw Exp $
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 @@
+@@ -183,7 +183,7 @@ static const HwrM68EZ328Type kInitial68E
{ 0 }, // Byte ___filler28[0xA00-0x90C];
0x00000000, // DWord lcdStartAddr; // $A00: Screen Starting Address Register
@@ -27,7 +27,7 @@ $NetBSD: patch-al,v 1.1 2004/03/20 20:21:22 kristerw Exp $
0xFF, // Byte lcdPageWidth; // $A05: Virtual Page Width Register
{ 0 }, // Byte ___filler30[2];
0x03FF, // Word lcdScreenWidth; // $A08: Screen Width Register
-@@ -192,17 +192,17 @@
+@@ -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
@@ -50,7 +50,7 @@ $NetBSD: patch-al,v 1.1 2004/03/20 20:21:22 kristerw Exp $
0xFF, // Byte lcdRefreshRateAdj; // $A29: Refresh Rate Adjustment Register
{ 0 }, // Byte ___filler2003[0xA2D-0xA2A];
0x00, // Byte lcdPanningOffset; // $A2D: Panning Offset Register
-@@ -210,10 +210,10 @@
+@@ -210,10 +210,10 @@ static const HwrM68EZ328Type kInitial68E
{ 0 }, // Byte ___filler37[0xA31-0xA2E];
0xB9, // Byte lcdFrameRate; // $A31: Frame Rate Control Modulation Register
@@ -63,3 +63,78 @@ $NetBSD: patch-al,v 1.1 2004/03/20 20:21:22 kristerw Exp $
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.
diff --git a/emulators/palmosemulator/patches/patch-am b/emulators/palmosemulator/patches/patch-am
index 6e974b9091f..4c7e3b6235c 100644
--- a/emulators/palmosemulator/patches/patch-am
+++ b/emulators/palmosemulator/patches/patch-am
@@ -1,8 +1,8 @@
-$NetBSD: patch-am,v 1.1 2004/03/20 20:21:22 kristerw Exp $
+$NetBSD: patch-am,v 1.2 2015/04/21 17:15:20 joerg Exp $
---- SrcShared/Hardware/EmRegsVZ.cpp.orig Sat Mar 20 20:28:32 2004
-+++ SrcShared/Hardware/EmRegsVZ.cpp Sat Mar 20 20:30:42 2004
-@@ -270,7 +270,7 @@
+--- SrcShared/Hardware/EmRegsVZ.cpp.orig 2002-03-29 13:11:19.000000000 +0000
++++ SrcShared/Hardware/EmRegsVZ.cpp
+@@ -270,7 +270,7 @@ static const HwrM68VZ328Type kInitial68V
{ 0 }, // UInt8 ___filler28a[0xA00-0x91E];
0x00000000, // UInt32 lcdStartAddr; // $A00: Screen Starting Address Register
@@ -11,7 +11,7 @@ $NetBSD: patch-am,v 1.1 2004/03/20 20:21:22 kristerw Exp $
0xFF, // UInt8 lcdPageWidth; // $A05: Virtual Page Width Register
{ 0 }, // UInt8 ___filler30[2];
0x03F0, // UInt16 lcdScreenWidth; // $A08: Screen Width Register
-@@ -279,29 +279,29 @@
+@@ -279,29 +279,29 @@ static const HwrM68VZ328Type kInitial68V
0x0000, // UInt16 lcdCursorXPos; // $A18: Cursor X Position
0x0000, // UInt16 lcdCursorYPos; // $A1A: Cursor Y Position
0x0101, // UInt16 lcdCursorWidthHeight; // $A1C: Cursor Width and Height
@@ -49,3 +49,98 @@ $NetBSD: patch-am,v 1.1 2004/03/20 20:21:22 kristerw Exp $
0x0000, // UInt16 lcdContrastControlPWM; // $A36: Contrast Control
0x00, // UInt8 lcdRefreshModeControl; // $A38: Refresh Mode Control Register
0x62, // UInt8 lcdDMAControl; // $A39: DMA Control Register
+@@ -1685,7 +1685,7 @@ uint32 EmRegsVZ::uart1Read (emuptr addre
+ {
+ // 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")
+
+@@ -1705,7 +1705,7 @@ uint32 EmRegsVZ::uart2Read (emuptr addre
+ {
+ // If this is a full read, get the next byte from the FIFO.
+
+- Bool refreshRxData = (address == addressof (u2Receive)) && (size == 2);
++ Bool refreshRxData = (address == my_addressof (u2Receive)) && (size == 2);
+
+ // See if there's anything new ("Put the data on the bus")
+
+@@ -1887,7 +1887,7 @@ void EmRegsVZ::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.
+@@ -2181,8 +2181,8 @@ void EmRegsVZ::uart1Write(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.
+
+@@ -2204,8 +2204,8 @@ void EmRegsVZ::uart2Write(emuptr address
+ // be transmitted.
+
+ Bool sendTxData =
+- ((address == addressof (u2Transmit)) && (size == 2)) ||
+- ((address == addressof (u2Transmit) + 1) && (size == 1));
++ ((address == my_addressof (u2Transmit)) && (size == 2)) ||
++ ((address == my_addressof (u2Transmit) + 1) && (size == 1));
+
+ // React to any changes.
+
+@@ -2229,15 +2229,15 @@ void EmRegsVZ::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))
+ {
+ // hwrVZ328LcdPanelControlGrayScale is incorrectly defined as 0x01,
+ // so use the hard-coded value of 0x03 here.
+@@ -2248,7 +2248,7 @@ void EmRegsVZ::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.
+@@ -2258,7 +2258,7 @@ void EmRegsVZ::lcdRegisterWrite (emuptr
+
+ EmScreen::InvalidateAll ();
+ }
+- else if (address == addressof (lcdPageWidth))
++ else if (address == my_addressof (lcdPageWidth))
+ {
+ if (value != oldValue)
+ {
+@@ -2297,7 +2297,7 @@ void EmRegsVZ::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.