Index: /branches/reyalp-ptp-live/platform/sx230hs/lib.c
===================================================================
--- /branches/reyalp-ptp-live/platform/sx230hs/lib.c	(revision 1754)
+++ /branches/reyalp-ptp-live/platform/sx230hs/lib.c	(revision 1755)
@@ -61,4 +61,8 @@
 // Values that may change are in lib.c for each firmware version.
 
+// Defined in stubs_min.S
+extern int active_bitmap_buffer;
+extern char* bitmap_buffer[];
+
 // Physical width of viewport row in bytes
 int vid_get_viewport_byte_width() {
@@ -90,2 +94,24 @@
 long vid_get_viewport_height(){ return 240; }
 
+// Functions for PTP Live View system
+
+int vid_get_viewport_xoffset_proper()           { return vid_get_viewport_xoffset() * 2; }
+int vid_get_viewport_width_proper()             { return vid_get_viewport_width() * 2; }
+int vid_get_viewport_height_proper()            { return 480; }
+int vid_get_viewport_max_width()                { return 960; }
+int vid_get_viewport_max_height()               { return 480; }
+int vid_get_palette_type()                      { return 3; }
+int vid_get_palette_size()                      { return 256 * 4; }
+int vid_get_aspect_ratio()                      { return 1; }
+
+void *vid_get_bitmap_active_buffer()
+{
+    return bitmap_buffer[active_bitmap_buffer];
+}
+
+void *vid_get_bitmap_active_palette()
+{
+    extern int active_palette_buffer;
+    extern char* palette_buffer[];
+    return (palette_buffer[active_palette_buffer]+8);
+}
Index: /branches/reyalp-ptp-live/platform/sx230hs/sub/101a/stubs_min.S
===================================================================
--- /branches/reyalp-ptp-live/platform/sx230hs/sub/101a/stubs_min.S	(revision 1754)
+++ /branches/reyalp-ptp-live/platform/sx230hs/sub/101a/stubs_min.S	(revision 1755)
@@ -1,4 +1,8 @@
 #include "stubs_asm.h"
 
+DEF(active_bitmap_buffer,               0xB478)  // 0xB464+0x14 (1.01a sub_FF249A8C -> FF249A90 + FF249AE8)
+DEF(bitmap_buffer,                      0xB480)  // FF249AE4
+DEF(active_palette_buffer,              0xB440)  // sub_FF244988 (1.01a)
+DEF(palette_buffer,                     0xCEB38) // loc_FF244E20 (1.01a)
 DEF(zoom_status, 			            0xF69C)         // found at FF326964
 DEF(recreview_hold, 		            0x947C + 0xF0)  // found at FF1BC74C + FF1BC754  
Index: /branches/reyalp-ptp-live/platform/sx230hs/sub/100c/stubs_min.S
===================================================================
--- /branches/reyalp-ptp-live/platform/sx230hs/sub/100c/stubs_min.S	(revision 1754)
+++ /branches/reyalp-ptp-live/platform/sx230hs/sub/100c/stubs_min.S	(revision 1755)
@@ -1,4 +1,8 @@
 #include "stubs_asm.h"
 
+DEF(active_bitmap_buffer,               0xB478)  // 0xB464+0x14 (1.00c sub_FF249908 -> FF24990C + FF249964)
+DEF(bitmap_buffer,                      0xB480)  // FF249960
+DEF(active_palette_buffer,              0xB440)  // sub_FF24480C (1.00c)
+DEF(palette_buffer,                     0xCEB38) // loc_FF244CA4 (1.00c)
 DEF(zoom_status,                        0x0000f69c) 	
 DEF(recreview_hold,                     0x947C + 0xF0) 
Index: /branches/reyalp-ptp-live/platform/sx230hs/sub/101b/stubs_min.S
===================================================================
--- /branches/reyalp-ptp-live/platform/sx230hs/sub/101b/stubs_min.S	(revision 1754)
+++ /branches/reyalp-ptp-live/platform/sx230hs/sub/101b/stubs_min.S	(revision 1755)
@@ -1,4 +1,8 @@
 #include "stubs_asm.h"
 
+DEF(active_bitmap_buffer,               0xB478)  // 0xB464+0x14 (1.01a sub_FF249A8C -> FF249A90 + FF249AE8)
+DEF(bitmap_buffer,                      0xB480)  // FF249AE4
+DEF(active_palette_buffer,              0xB440)  // sub_FF244988 (1.01a)
+DEF(palette_buffer,                     0xCEB38) // loc_FF244E20 (1.01a)
 DEF(zoom_status,                        0xF69C)         // found at FF326964
 DEF(recreview_hold,                     0x947C + 0xF0)  // found at FF1BC74C + FF1BC754  
Index: /branches/reyalp-ptp-live/platform/sx220hs/lib.c
===================================================================
--- /branches/reyalp-ptp-live/platform/sx220hs/lib.c	(revision 1754)
+++ /branches/reyalp-ptp-live/platform/sx220hs/lib.c	(revision 1755)
@@ -59,4 +59,8 @@
 // Values that may change are in lib.c for each firmware version.
 
+// Defined in stubs_min.S
+extern int active_bitmap_buffer;
+extern char* bitmap_buffer[];
+
 // Physical width of viewport row in bytes
 int vid_get_viewport_byte_width() {
@@ -87,2 +91,25 @@
 
 long vid_get_viewport_height(){ return 240; }
+
+// Functions for PTP Live View system
+
+int vid_get_viewport_xoffset_proper()           { return vid_get_viewport_xoffset() * 2; }
+int vid_get_viewport_width_proper()             { return vid_get_viewport_width() * 2; }
+int vid_get_viewport_height_proper()            { return 480; }
+int vid_get_viewport_max_width()                { return 960; }
+int vid_get_viewport_max_height()               { return 480; }
+int vid_get_palette_type()                      { return 3; }
+int vid_get_palette_size()                      { return 256 * 4; }
+int vid_get_aspect_ratio()                      { return 1; }
+
+void *vid_get_bitmap_active_buffer()
+{
+    return bitmap_buffer[active_bitmap_buffer];
+}
+
+void *vid_get_bitmap_active_palette()
+{
+    extern int active_palette_buffer;
+    extern char* palette_buffer[];
+    return (palette_buffer[active_palette_buffer]+8);
+}
Index: /branches/reyalp-ptp-live/platform/sx220hs/sub/100a/stubs_min.S
===================================================================
--- /branches/reyalp-ptp-live/platform/sx220hs/sub/100a/stubs_min.S	(revision 1754)
+++ /branches/reyalp-ptp-live/platform/sx220hs/sub/100a/stubs_min.S	(revision 1755)
@@ -1,4 +1,8 @@
 #include "stubs_asm.h"
 
+DEF(active_bitmap_buffer,               0xB394)  // 0xB380+0x14 (1.01a sub_FF2426A8 -> FF2426AC + FF242704)
+DEF(bitmap_buffer,                      0xB39C)  // FF242700
+DEF(active_palette_buffer,              0xB35C)  // sub_FF23D5A4 (1.01a)
+DEF(palette_buffer,                     0xCAE40) // loc_FF23DA3C (1.01a)
 DEF(recreview_hold,                     0x93D4 + 0xF0)  // FF1B6640
 DEF(enabled_refresh_physical_screen,    0x53C4 + 0x14)  //changed to fix error when displaying menu, was 0x20 FF0A99C0 
Index: /branches/reyalp-ptp-live/platform/sx220hs/sub/101a/stubs_min.S
===================================================================
--- /branches/reyalp-ptp-live/platform/sx220hs/sub/101a/stubs_min.S	(revision 1754)
+++ /branches/reyalp-ptp-live/platform/sx220hs/sub/101a/stubs_min.S	(revision 1755)
@@ -1,4 +1,8 @@
 #include "stubs_asm.h"
 
+DEF(active_bitmap_buffer,               0xB394)  // 0xB380+0x14 (1.01a sub_FF2426A8 -> FF2426AC + FF242704)
+DEF(bitmap_buffer,                      0xB39C)  // FF242700
+DEF(active_palette_buffer,              0xB35C)  // sub_FF23D5A4 (1.01a)
+DEF(palette_buffer,                     0xCAE40) // loc_FF23DA3C (1.01a)
 DEF(zoom_status,                        0xF5A4)         // ff31c404
 DEF(recreview_hold,                     0x93D4 + 0xF0)  // FF1B6640
Index: /branches/reyalp-ptp-live/platform/sx220hs/sub/101b/stubs_min.S
===================================================================
--- /branches/reyalp-ptp-live/platform/sx220hs/sub/101b/stubs_min.S	(revision 1754)
+++ /branches/reyalp-ptp-live/platform/sx220hs/sub/101b/stubs_min.S	(revision 1755)
@@ -1,4 +1,8 @@
 #include "stubs_asm.h"
 
+DEF(active_bitmap_buffer,               0xB394)  // 0xB380+0x14 (1.01a sub_FF2426A8 -> FF2426AC + FF242704)
+DEF(bitmap_buffer,                      0xB39C)  // FF242700
+DEF(active_palette_buffer,              0xB35C)  // sub_FF23D5A4 (1.01a)
+DEF(palette_buffer,                     0xCAE40) // loc_FF23DA3C (1.01a)
 DEF(FlashParamsTable,                   0xFF48A4B8)     // 1.01b (was at FF318D50 in 100A)
 DEF(zoom_status,                        0xF5A4)         // ff31c404
