You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
(27) |
Apr
(11) |
May
(112) |
Jun
(8) |
Jul
(10) |
Aug
(68) |
Sep
(12) |
Oct
(3) |
Nov
(19) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(15) |
Mar
(20) |
Apr
(22) |
May
(131) |
Jun
(27) |
Jul
(19) |
Aug
(207) |
Sep
(61) |
Oct
(27) |
Nov
(28) |
Dec
(21) |
| 2004 |
Jan
(7) |
Feb
(25) |
Mar
(14) |
Apr
(55) |
May
(15) |
Jun
(2) |
Jul
(14) |
Aug
(28) |
Sep
(29) |
Oct
|
Nov
|
Dec
|
|
From: John M M. <jo...@us...> - 2003-03-05 19:53:17
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv18130/squeak/platforms/Mac OS/vm
Modified Files:
sqMacMemory.c
Log Message:
3.5.0b4 Fix issue with memory free for netscape plugin
Index: sqMacMemory.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacMemory.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** sqMacMemory.c 6 Aug 2002 21:45:49 -0000 1.9
--- sqMacMemory.c 5 Mar 2003 19:53:14 -0000 1.10
***************
*** 184,187 ****
--- 184,190 ----
return;
#if TARGET_API_MAC_CARBON
+ #ifdef PLUGIN
+ DisposePtr((void *) memory);
+ #endif
#else
if(((Ptr)OpenMappedScratchFile != (Ptr)kUnresolvedCFragSymbolAddress) && (gBackingFile != 0)) {
***************
*** 191,195 ****
gBackingFile = 0;
} else {
- if (memory != nil)
DisposePtr((void *) memory);
}
--- 194,197 ----
|
|
From: John M M. <jo...@us...> - 2003-03-05 19:50:52
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/plugins/SocketPlugin
In directory sc8-pr-cvs1:/tmp/cvs-serv17166/squeak/platforms/Mac OS/plugins/SocketPlugin
Modified Files:
sqMacNetwork.c
Log Message:
3.5.0b4 Add logic to sync request for remote IP and port information. Also handle case where remote IP has closed the connection, in that case return orginal bind information instead of 0.0.0.0. This fixes issues with EToyPeerToPeer logic
Index: sqMacNetwork.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/plugins/SocketPlugin/sqMacNetwork.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqMacNetwork.c 27 Sep 2002 19:57:51 -0000 1.3
--- sqMacNetwork.c 5 Mar 2003 19:50:45 -0000 1.4
***************
*** 63,66 ****
--- 63,67 ----
v1.3.12 Jan 2001, Karl Goiser Carbon changes
v1.3.13 Sept 2002, JMM fixes for wildcard port binding, and IP_ADD_MEMBERSHIP logic
+ v1.4.00 Feb 2003, JMM watch out for async port fetch info not working under os-x
Notes beware semaphore's lurk for socket support. Three semaphores lives in Smalltalk, waiting for
***************
*** 1232,1242 ****
TBind remoteBind;
InetAddress remoteAddr;
- SInt32 counter=0;
OSStatus err;
if (!SocketValid(s)) return -1;
epi = (EPInfo *) s->privateSocketPtr;
if (OTAtomicTestBit(&epi->stateFlags, kUnConnected) &&
! !OTAtomicTestBit(&epi->stateFlags, kWaitingForConnection)) return 0;
if (epi->socketType == UDPSocketType) {
--- 1233,1244 ----
TBind remoteBind;
InetAddress remoteAddr;
OSStatus err;
+ Boolean isAsync;
if (!SocketValid(s)) return -1;
epi = (EPInfo *) s->privateSocketPtr;
if (OTAtomicTestBit(&epi->stateFlags, kUnConnected) &&
! !OTAtomicTestBit(&epi->stateFlags, kWaitingForConnection))
! return 0;
if (epi->socketType == UDPSocketType) {
***************
*** 1244,1247 ****
--- 1246,1253 ----
}
+ if (OTIsSynchronous(epi->erf) == false) { // check whether ep sync or not
+ isAsync = true; // set flag if async
+ OTSetSynchronous(epi->erf); // set endpoint to sync
+ }
//It seems the only reliable way to get the address
//Is to make a call
***************
*** 1252,1264 ****
remoteBind.addr.maxlen = sizeof(InetAddress);
err = OTGetProtAddress(epi->erf,0,&remoteBind);
! while (counter++ < 10 && remoteAddr.fHost == 0) {
! OTIdle();
! }
if (err != kOTNoError)
return 0;
! else
return (int) remoteAddr.fHost;
}
int sqSocketRemotePort(SocketPtr s) {
--- 1258,1273 ----
remoteBind.addr.maxlen = sizeof(InetAddress);
err = OTGetProtAddress(epi->erf,0,&remoteBind);
!
! if (isAsync) // restore ep state
! OTSetAsynchronous(epi->erf);
if (err != kOTNoError)
return 0;
! else {
! if ((int) remoteAddr.fHost == 0)
! return (int) epi->remoteAddress.fHost;
return (int) remoteAddr.fHost;
}
+ }
int sqSocketRemotePort(SocketPtr s) {
***************
*** 1266,1271 ****
TBind remoteBind;
InetAddress remoteAddr;
- SInt32 counter=0;
OSStatus err;
if (!SocketValid(s)) return -1;
--- 1275,1280 ----
TBind remoteBind;
InetAddress remoteAddr;
OSStatus err;
+ Boolean isAsync;
if (!SocketValid(s)) return -1;
***************
*** 1278,1281 ****
--- 1287,1294 ----
}
+ if (OTIsSynchronous(epi->erf) == false) { // check whether ep sync or not
+ isAsync = true; // set flag if async
+ OTSetSynchronous(epi->erf); // set endpoint to sync
+ }
//It seems the only reliable way to get the port
//Is to make a call
***************
*** 1286,1297 ****
remoteBind.addr.maxlen = sizeof(InetAddress);
err = OTGetProtAddress(epi->erf,0,&remoteBind);
! while (counter++ < 10 && remoteAddr.fHost == 0) {
! OTIdle();
! }
if (err != kOTNoError)
return 0;
! else
! return remoteAddr.fPort;
}
--- 1299,1312 ----
remoteBind.addr.maxlen = sizeof(InetAddress);
err = OTGetProtAddress(epi->erf,0,&remoteBind);
! if (isAsync) // restore ep state
! OTSetAsynchronous(epi->erf);
if (err != kOTNoError)
return 0;
! else {
! if ((int) remoteAddr.fPort == 0)
! return (int) epi->remoteAddress.fPort;
! return (int) remoteAddr.fPort;
! }
}
|
|
From: John M M. <jo...@us...> - 2003-02-08 18:34:38
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv17446/squeak/platforms/Mac OS/vm
Modified Files:
sqMacWindow.c
Log Message:
3.5.0b1 avoid compiler warnings
Index: sqMacWindow.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacWindow.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** sqMacWindow.c 6 Aug 2002 21:54:26 -0000 1.19
--- sqMacWindow.c 8 Feb 2003 18:34:34 -0000 1.20
***************
*** 634,641 ****
long quickDrawAttributes;
Rect theSect;
! RgnHandle windowRegion;
!
#if TARGET_API_MAC_CARBON
windowRegion = NewRgn();
GetWindowRegion(theWindow,kWindowStructureRgn,windowRegion);
--- 634,641 ----
long quickDrawAttributes;
Rect theSect;
!
#if TARGET_API_MAC_CARBON
+ RgnHandle windowRegion;
windowRegion = NewRgn();
GetWindowRegion(theWindow,kWindowStructureRgn,windowRegion);
|
|
From: John M M. <jo...@us...> - 2003-02-08 18:33:30
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv16006/squeak/platforms/Mac OS/vm
Modified Files:
sqMacUIMenuBar.c
Log Message:
3.5.0b1 avoid compiler warning
Index: sqMacUIMenuBar.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacUIMenuBar.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqMacUIMenuBar.c 27 Sep 2002 20:00:41 -0000 1.3
--- sqMacUIMenuBar.c 8 Feb 2003 18:33:27 -0000 1.4
***************
*** 91,95 ****
--- 91,97 ----
void SetUpMenus(void) {
+ #if TARGET_API_MAC_CARBON
long decideOnQuitMenu;
+ #endif
InsertMenu(appleMenu = NewMenu(appleID, "\p\024"), 0);
|
|
From: John M M. <jo...@us...> - 2003-02-08 18:31:36
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm In directory sc8-pr-cvs1:/tmp/cvs-serv15233/squeak/platforms/Mac OS/vm Modified Files: sqMacExternalPrims.c Log Message: 3.5.0b1 return 0 versus nothing to make compiler happy Index: sqMacExternalPrims.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacExternalPrims.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sqMacExternalPrims.c 23 Feb 2002 11:25:36 -0000 1.2 --- sqMacExternalPrims.c 8 Feb 2003 18:31:33 -0000 1.3 *************** *** 265,269 **** (CFragConnectionID) moduleHandle, (unsigned char *) tempLookupName, &functionPtr, &ignored); ! if (err) return 0; return (int) functionPtr; } --- 265,270 ---- (CFragConnectionID) moduleHandle, (unsigned char *) tempLookupName, &functionPtr, &ignored); ! if (err) ! return 0; return (int) functionPtr; } |
|
From: John M M. <jo...@us...> - 2003-02-08 18:30:38
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/plugins/SoundPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv14923/squeak/platforms/Mac OS/plugins/SoundPlugin Modified Files: sqMacSound.c Log Message: 3.5.0b1 remove extra i declare Index: sqMacSound.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/plugins/SoundPlugin/sqMacSound.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sqMacSound.c 6 Feb 2002 07:05:34 -0000 1.4 --- sqMacSound.c 8 Feb 2003 18:30:35 -0000 1.5 *************** *** 534,538 **** short automaticGainControlArg; Fixed inputGainArg; ! long compressionTypeArg,i; short continuousArg; short sampleSizeArg; --- 534,538 ---- short automaticGainControlArg; Fixed inputGainArg; ! long compressionTypeArg; short continuousArg; short sampleSizeArg; |
|
From: John M M. <jo...@us...> - 2003-02-08 18:26:26
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/plugins/FilePlugin
In directory sc8-pr-cvs1:/tmp/cvs-serv13468/squeak/platforms/Mac OS/plugins/FilePlugin
Modified Files:
sqMacDirectory.c
Log Message:
3.5.0b1 On a directory delete we need to invalidate the internal cache if the directory being deleted is the cached directory
Index: sqMacDirectory.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/plugins/FilePlugin/sqMacDirectory.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** sqMacDirectory.c 6 Aug 2002 21:40:26 -0000 1.6
--- sqMacDirectory.c 8 Feb 2003 18:26:23 -0000 1.7
***************
*** 140,143 ****
--- 140,146 ----
}
+ if (equalsLastPath(pathString, pathStringLength))
+ lastPathValid = false;
+
#if defined(__MWERKS__)
{
|
|
From: John M M. <jo...@us...> - 2003-02-08 18:25:00
|
Update of /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/video In directory sc8-pr-cvs1:/tmp/cvs-serv13023/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/video Modified Files: mpeg3video.h Log Message: 1.4 back out blue screen changes Index: mpeg3video.h =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/video/mpeg3video.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mpeg3video.h 7 Sep 2002 07:34:51 -0000 1.2 --- mpeg3video.h 8 Feb 2003 18:24:58 -0000 1.3 *************** *** 159,172 **** int pict_scal; /* picture spatial scalable extension */ int scalable_mode; /* sequence scalable extension */ - int alphaChannelValue; - unsigned char blueScreenMappingR[256]; - unsigned char blueScreenMappingG[256]; - unsigned char blueScreenMappingB[256]; - unsigned char clipArray_Red[1028]; - unsigned char clipArray_Green[1028]; - unsigned char clipArray_Blue[1028]; - unsigned short clipArray16_Red[1028]; - unsigned short clipArray16_Green[1028]; - unsigned short clipArray16_Blue[1028]; } mpeg3video_t; --- 159,162 ---- |
|
From: John M M. <jo...@us...> - 2003-02-08 18:24:08
|
Update of /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/video
In directory sc8-pr-cvs1:/tmp/cvs-serv12663/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/video
Modified Files:
output.c
Log Message:
1.4 backout blue screen changes
Index: output.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/video/output.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** output.c 7 Sep 2002 07:36:08 -0000 1.3
--- output.c 8 Feb 2003 18:24:05 -0000 1.4
***************
*** 30,37 ****
/* Changed Sept 15th by John M McIntosh to support Macintosh & Squeak
Feb/march 2001, JMM tuning for the mac
! I've coded up mpeg3video_ditherframeFastRGB555 and mpeg3video_ditherframeFastARGB which
do specialized 16 and 32 bit Crb to rgb mapping (Intel should do this too?)
I also coded up clip arrays versus using CLIP() This avoid test/branchs which slows things down
- Sept 2002, JMM added clip arrays to enable blue screening and value for alpha channel
*/
#include "libmpeg3.h"
--- 30,36 ----
/* Changed Sept 15th by John M McIntosh to support Macintosh & Squeak
Feb/march 2001, JMM tuning for the mac
! I've coded up mpeg3video_ditherframeFastRGB555 and mpeg3video_ditherframeFastRGBA which
do specialized 16 and 32 bit Crb to rgb mapping (Intel should do this too?)
I also coded up clip arrays versus using CLIP() This avoid test/branchs which slows things down
*/
#include "libmpeg3.h"
***************
*** 39,44 ****
#include <string.h>
! unsigned char gClipArray[1028];
! unsigned short gClipArray16r[1028],gClipArray16g[1028],gClipArray16b[1028];
int doClippingArrays=1;
--- 38,47 ----
#include <string.h>
! unsigned char gClipArray[1026];
! unsigned short gClipArray16r[1026],gClipArray16g[1026],gClipArray16b[1026];
! unsigned char *gClipArray_ptr=&gClipArray[512];
! unsigned short *gClipArray_ptr16r=&gClipArray16r[512];
! unsigned short *gClipArray_ptr16g=&gClipArray16g[512];
! unsigned short *gClipArray_ptr16b=&gClipArray16b[512];
int doClippingArrays=1;
***************
*** 512,539 ****
#define STORE_PIXEL_BGR888 \
! *data++ = clipArray_ptr_B[b_l]; \
! *data++ = clipArray_ptr_G[g_l]; \
! *data++ = clipArray_ptr_R[r_l];
#define STORE_PIXEL_BGRA8888 \
! *data++ = clipArray_ptr_B[b_l]; \
! *data++ = clipArray_ptr_G[g_l]; \
! *data++ = clipArray_ptr_R[r_l]; \
! *data++ = alphaChannelValue;
#define STORE_PIXEL_RGB565 \
! foo = ((clipArray_ptr_R[r_l] & 0xf8) << 8) | \
! ((clipArray_ptr_G[g_l] & 0xfc) << 3) | \
! ((clipArray_ptr_B[b_l] & 0xf8) >> 3); *(unsigned short*)data = foo; data += 2;
#define STORE_PIXEL_RGB555 \
! foo = ((clipArray_ptr_R[r_l] & 0xf8) << 7) | \
! ((clipArray_ptr_G[g_l] & 0xf8) << 2) | \
! ((clipArray_ptr_B[b_l] & 0xf8) >> 3); *(unsigned short*)data = foo; data += 2;
#define STORE_PIXEL_RGBI555 \
! foo = ((clipArray_ptr_R[r_l] & 0xf8) << 7) | \
! ((clipArray_ptr_G[g_l] & 0xf8) << 2) | \
! ((clipArray_ptr_B[b_l] & 0xf8) >> 3); \
if((unsigned long)data & 0x00000002L) { \
data -= 2; \
--- 515,542 ----
#define STORE_PIXEL_BGR888 \
! *data++ = clipArray_ptr[b_l]; \
! *data++ = clipArray_ptr[g_l]; \
! *data++ = clipArray_ptr[r_l];
#define STORE_PIXEL_BGRA8888 \
! *data++ = clipArray_ptr[b_l]; \
! *data++ = clipArray_ptr[g_l]; \
! *data++ = clipArray_ptr[r_l]; \
! *data++ = 0;
#define STORE_PIXEL_RGB565 \
! foo = ((clipArray_ptr[r_l] & 0xf8) << 8) | \
! ((clipArray_ptr[g_l] & 0xfc) << 3) | \
! ((clipArray_ptr[b_l] & 0xf8) >> 3); *(unsigned short*)data = foo; data += 2;
#define STORE_PIXEL_RGB555 \
! foo = ((clipArray_ptr[r_l] & 0xf8) << 7) | \
! ((clipArray_ptr[g_l] & 0xf8) << 2) | \
! ((clipArray_ptr[b_l] & 0xf8) >> 3); *(unsigned short*)data = foo; data += 2;
#define STORE_PIXEL_RGBI555 \
! foo = ((clipArray_ptr[r_l] & 0xf8) << 7) | \
! ((clipArray_ptr[g_l] & 0xf8) << 2) | \
! ((clipArray_ptr[b_l] & 0xf8) >> 3); \
if((unsigned long)data & 0x00000002L) { \
data -= 2; \
***************
*** 547,572 ****
#define STORE_PIXEL_RGB888 \
! *data++ = clipArray_ptr_R[r_l]; \
! *data++ = clipArray_ptr_G[g_l]; \
! *data++ = clipArray_ptr_B[b_l];
#define STORE_PIXEL_RGBA8888 \
! *data++ = clipArray_ptr_R[r_l]; \
! *data++ = clipArray_ptr_G[g_l]; \
! *data++ = clipArray_ptr_B[b_l]; \
! *data++ = alphaChannelValue;
#define STORE_PIXEL_ARGB8888 \
! *data++ = alphaChannelValue; \
! *data++ = clipArray_ptr_R[r_l]; \
! *data++ = clipArray_ptr_G[g_l]; \
! *data++ = clipArray_ptr_B[b_l];
#define STORE_PIXEL_RGBA16161616 \
! *data_s++ = clipArray_ptr_R[r_l]; \
! *data_s++ = clipArray_ptr_G[g_l]; \
! *data_s++ = clipArray_ptr_B[b_l]; \
! *data_s++ = alphaChannelValue;
! /* JMM broken for 16 bit color here */
--- 550,575 ----
#define STORE_PIXEL_RGB888 \
! *data++ = clipArray_ptr[r_l]; \
! *data++ = clipArray_ptr[g_l]; \
! *data++ = clipArray_ptr[b_l];
#define STORE_PIXEL_RGBA8888 \
! *data++ = clipArray_ptr[r_l]; \
! *data++ = clipArray_ptr[g_l]; \
! *data++ = clipArray_ptr[b_l]; \
! *data++ = 0;
#define STORE_PIXEL_ARGB8888 \
! *data++ = 0; \
! *data++ = clipArray_ptr[r_l]; \
! *data++ = clipArray_ptr[g_l]; \
! *data++ = clipArray_ptr[b_l];
#define STORE_PIXEL_RGBA16161616 \
! *data_s++ = clipArray_ptr[r_l]; \
! *data_s++ = clipArray_ptr[g_l]; \
! *data_s++ = clipArray_ptr[b_l]; \
! *data_s++ = 0;
!
***************
*** 575,584 ****
{
int h = 0;
! register unsigned char *y_in, *cb_in, *cr_in,alphaChannelValue=video->alphaChannelValue;
long y_l, r_l, b_l, g_l;
! register unsigned char *data,
! *clipArray_ptr_R=&video->clipArray_Red[512],
! *clipArray_ptr_G=&video->clipArray_Green[512],
! *clipArray_ptr_B=&video->clipArray_Blue[512];
register int uv_subscript, step, w = -1;
register short foo;
--- 578,584 ----
{
int h = 0;
! register unsigned char *y_in, *cb_in, *cr_in;
long y_l, r_l, b_l, g_l;
! register unsigned char *data,*clipArray_ptr=gClipArray_ptr;
register int uv_subscript, step, w = -1;
register short foo;
***************
*** 971,975 ****
else
if (video->color_model == MPEG3_ARGB8888)
! return mpeg3video_ditherframeFastARGB(video, src, video->output_rows);
else
return mpeg3video_ditherframe(video, src, video->output_rows);
--- 971,975 ----
else
if (video->color_model == MPEG3_ARGB8888)
! return mpeg3video_ditherframeFastRGBA(video, src, video->output_rows);
else
return mpeg3video_ditherframe(video, src, video->output_rows);
***************
*** 1031,1048 ****
}
! int mpeg3video_ditherframeFastARGB(mpeg3video_t *video, unsigned char **src, unsigned char **output_rows) {
int h = 0;
! register unsigned char *y_in, *cb_in, *cr_in, *clipArray_ptr_R, *clipArray_ptr_G, *clipArray_ptr_B;
long y_l, r_l, b_l, g_l;
register unsigned long *data;
register int uv_subscript, step, w = -1,t1,t2;
! register long *cr_to_gPtr,*cr_to_rPtr,*cb_to_bPtr,*cb_to_gPtr;
! unsigned long alphaChannelValue_t;
!
! clipArray_ptr_R = &video->clipArray_Red[512];
! clipArray_ptr_G = &video->clipArray_Green[512];
! clipArray_ptr_B = &video->clipArray_Blue[512];
! alphaChannelValue_t = video->alphaChannelValue << 24;
!
cr_to_rPtr = &video->cr_to_r[0];
cr_to_gPtr = &video->cr_to_g[0];
--- 1031,1043 ----
}
! int mpeg3video_ditherframeFastRGBA(mpeg3video_t *video, unsigned char **src, unsigned char **output_rows) {
int h = 0;
! register unsigned char *y_in, *cb_in, *cr_in, *clipArray_ptr;
long y_l, r_l, b_l, g_l;
register unsigned long *data;
register int uv_subscript, step, w = -1,t1,t2;
! register long *cr_to_gPtr,*cr_to_rPtr,*cb_to_bPtr,*cb_to_gPtr;;
!
! clipArray_ptr = gClipArray_ptr;
cr_to_rPtr = &video->cr_to_r[0];
cr_to_gPtr = &video->cr_to_g[0];
***************
*** 1066,1070 ****
r_l = (r_l + cr_to_rPtr[*cr_in]) >> 16;
b_l = (b_l + cb_to_bPtr[*cb_in]) >> 16;
! *data++ = alphaChannelValue_t | (clipArray_ptr_R[r_l] << 16) | (clipArray_ptr_G[g_l] << 8) | clipArray_ptr_B[b_l];
if(w & 1) {
cr_in++;
--- 1061,1065 ----
r_l = (r_l + cr_to_rPtr[*cr_in]) >> 16;
b_l = (b_l + cb_to_bPtr[*cb_in]) >> 16;
! *data++ = (clipArray_ptr[r_l] << 16) | (clipArray_ptr[g_l] << 8) | clipArray_ptr[b_l];
if(w & 1) {
cr_in++;
***************
*** 1082,1086 ****
r_l = (r_l + cr_to_rPtr[t1]) >> 16;
b_l = (b_l + cb_to_bPtr[t2]) >> 16;
! *data++ = alphaChannelValue_t | (clipArray_ptr_R[r_l] << 16) | (clipArray_ptr_G[g_l] << 8) | clipArray_ptr_B[b_l];
}
}
--- 1077,1081 ----
r_l = (r_l + cr_to_rPtr[t1]) >> 16;
b_l = (b_l + cb_to_bPtr[t2]) >> 16;
! *data++ = (clipArray_ptr[r_l] << 16) | (clipArray_ptr[g_l] << 8) | clipArray_ptr[b_l];
}
}
***************
*** 1091,1110 ****
int mpeg3video_ditherframeFastRGB555(mpeg3video_t *video, unsigned char **src, unsigned char **output_rows) {
int h = 0;
long y_l, r_l, b_l, g_l;
! unsigned char *y_in, *cb_in, *cr_in;
! unsigned short *clipArray_ptr16r,*clipArray_ptr16g,*clipArray_ptr16b,*data;
! int w,t1,t2;
! long *cr_to_gPtr,*cr_to_rPtr,*cb_to_bPtr,*cb_to_gPtr;;
! clipArray_ptr16r = &video->clipArray16_Red[512];
! clipArray_ptr16g = &video->clipArray16_Green[512];
! clipArray_ptr16b = &video->clipArray16_Blue[512];
! cr_to_rPtr = &video->cr_to_r[0];
cr_to_gPtr = &video->cr_to_g[0];
cb_to_bPtr = &video->cb_to_b[0];
cb_to_gPtr = &video->cb_to_g[0];
! if(video->out_w == video->horizontal_size) {
! for(h = 0; h < video->out_h; h++) {
t1 = video->y_table[h] + video->in_y;
t2 = (t1 >> 1) * video->chrom_width;
--- 1086,1107 ----
int mpeg3video_ditherframeFastRGB555(mpeg3video_t *video, unsigned char **src, unsigned char **output_rows) {
int h = 0;
+ register unsigned char *y_in, *cb_in, *cr_in, *clipArray_ptr;
+ register unsigned short *clipArray_ptr16r,*clipArray_ptr16g,*clipArray_ptr16b;
long y_l, r_l, b_l, g_l;
! register unsigned short *data;
! register int uv_subscript, step, w = -1,t1,t2;
! register long *cr_to_gPtr,*cr_to_rPtr,*cb_to_bPtr,*cb_to_gPtr;;
! clipArray_ptr = gClipArray_ptr;
! clipArray_ptr16r = gClipArray_ptr16r;
! clipArray_ptr16g = gClipArray_ptr16g;
! clipArray_ptr16b = gClipArray_ptr16b;
! cr_to_rPtr = &video->cr_to_r[0];
cr_to_gPtr = &video->cr_to_g[0];
cb_to_bPtr = &video->cb_to_b[0];
cb_to_gPtr = &video->cb_to_g[0];
! for(h = 0; h < video->out_h; h++)
! {
t1 = video->y_table[h] + video->in_y;
t2 = (t1 >> 1) * video->chrom_width;
***************
*** 1114,1118 ****
data = (unsigned short*) output_rows[h];
! for (w = 0; w < video->horizontal_size; w++) {
y_l = *y_in++;
r_l = g_l = b_l = y_l << 16;
--- 1111,1116 ----
data = (unsigned short*) output_rows[h];
! if(video->out_w == video->horizontal_size) {
! for(w = 0; w < video->horizontal_size; w++) {
y_l = *y_in++;
r_l = g_l = b_l = y_l << 16;
***************
*** 1120,1145 ****
r_l = (r_l + cr_to_rPtr[*cr_in]) >> 16;
b_l = (b_l + cb_to_bPtr[*cb_in]) >> 16;
! *data++ = clipArray_ptr16r[r_l] |
clipArray_ptr16g[g_l] |
clipArray_ptr16b[b_l];
-
if(w & 1) {
! cr_in++;
! cb_in++;
! }
}
! }
! } else {
! int uv_subscript;
!
! for(h = 0; h < video->out_h; h++) {
! t1 = video->y_table[h] + video->in_y;
! t2 = (t1 >> 1) * video->chrom_width;
! y_in = &src[0][t1 * video->coded_picture_width] + video->in_x;
! cb_in = &src[1][t2] + (video->in_x >> 2);
! cr_in = &src[2][t2] + (video->in_x >> 1);
! data = (unsigned short*) output_rows[h];
!
! for (w = 0; w < video->out_w; w++) {
uv_subscript = video->x_table[w] / 2;
r_l = g_l = b_l = (y_in[video->x_table[w]]) << 16;
--- 1118,1132 ----
r_l = (r_l + cr_to_rPtr[*cr_in]) >> 16;
b_l = (b_l + cb_to_bPtr[*cb_in]) >> 16;
! *data++ = clipArray_ptr16r[r_l] |
clipArray_ptr16g[g_l] |
clipArray_ptr16b[b_l];
if(w & 1) {
! cr_in++;
! cb_in++;
! }
}
! } else {
! for(w = 0; w < video->out_w; w++)
! {
uv_subscript = video->x_table[w] / 2;
r_l = g_l = b_l = (y_in[video->x_table[w]]) << 16;
***************
*** 1152,1156 ****
clipArray_ptr16g[g_l] |
clipArray_ptr16b[b_l];
-
}
}
--- 1139,1142 ----
***************
*** 1166,1169 ****
--- 1152,1168 ----
unsigned char **src = video->output_src;
+ if (doClippingArrays) {
+ for(h=-512;h<=512;h++) {
+ gClipArray_ptr[h]=CLIP(h);
+ gClipArray_ptr16r[h]=(CLIP(h) & 0xf8) << 7;
+ gClipArray_ptr16g[h]=(CLIP(h) & 0xf8) << 2;
+ gClipArray_ptr16b[h]=(CLIP(h) & 0xf8) >> 3;
+ if (gClipArray_ptr[h] == 0x00)
+ gClipArray_ptr[h] = 0x01;
+ if (gClipArray_ptr16b[h] == 0x00)
+ gClipArray_ptr16b[h] = 0x01;
+ }
+ doClippingArrays = 0;
+ }
/* Copy YUV buffers */
***************
*** 1226,1230 ****
else
if (video->color_model == MPEG3_ARGB8888)
! mpeg3video_ditherframeFastARGB(video, src, video->output_rows);
else
mpeg3video_ditherframe(video, src, video->output_rows);
--- 1225,1229 ----
else
if (video->color_model == MPEG3_ARGB8888)
! mpeg3video_ditherframeFastRGBA(video, src, video->output_rows);
else
mpeg3video_ditherframe(video, src, video->output_rows);
***************
*** 1272,1312 ****
/* Not used */
return 0;
- }
-
- void doClipArrays(mpeg3_t *file) {
- long h,i;
-
- if (doClippingArrays) {
-
- for(h=-512;h<=512;h++) {
- gClipArray[h+512]=CLIP(h);
- gClipArray16r[h+512]=(CLIP(h) & 0xf8) << 7;
- gClipArray16g[h+512]=(CLIP(h) & 0xf8) << 2;
- gClipArray16b[h+512]=(CLIP(h) & 0xf8) >> 3;
- if (gClipArray[h+512] == 0x00)
- gClipArray[h+512] = 0x01;
- if (gClipArray16b[h+512] == 0x00)
- gClipArray16b[h+512] = 0x01;
- }
- doClippingArrays = 0;
- }
-
- for(h=0;h<file->total_vstreams;h++) {
- memcpy(&file->vtrack[h]->video->clipArray_Red,&gClipArray,1028);
- memcpy(&file->vtrack[h]->video->clipArray_Green,&gClipArray,1028);
- memcpy(&file->vtrack[h]->video->clipArray_Blue,&gClipArray,1028);
- memcpy(&file->vtrack[h]->video->clipArray16_Red,&gClipArray16r,1028*2);
- memcpy(&file->vtrack[h]->video->clipArray16_Green,&gClipArray16g,1028*2);
- memcpy(&file->vtrack[h]->video->clipArray16_Blue,&gClipArray16b,1028*2);
- file->vtrack[h]->video->alphaChannelValue =0x00;
- for(i=0;i<256;i++) {
- file->vtrack[h]->video->blueScreenMappingR[i] = i;
- file->vtrack[h]->video->blueScreenMappingG[i] = i;
- file->vtrack[h]->video->blueScreenMappingB[i] = i;
- }
- file->vtrack[h]->video->blueScreenMappingR[0] = 1;
- file->vtrack[h]->video->blueScreenMappingG[0] = 1;
- file->vtrack[h]->video->blueScreenMappingB[0] = 1;
- }
}
--- 1271,1274 ----
|
|
From: John M M. <jo...@us...> - 2003-02-08 18:23:33
|
Update of /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg
In directory sc8-pr-cvs1:/tmp/cvs-serv12463/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg
Modified Files:
changesForSqueak.c
Log Message:
1.4 Backout blue screen, changes, a bug somewhere an the croquet folks don't need it
Index: changesForSqueak.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/changesForSqueak.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** changesForSqueak.c 7 Sep 2002 07:32:48 -0000 1.6
--- changesForSqueak.c 8 Feb 2003 18:23:30 -0000 1.7
***************
*** 352,386 ****
}
- int mpeg3_get_transparent (mpeg3_t *file, int aStream) {
- return file->vtrack[aStream]->video->alphaChannelValue;
- }
-
- int mpeg3_set_transparent (mpeg3_t *file, int aNumber, int aStream) {
- file->vtrack[aStream]->video->alphaChannelValue = aNumber & 0xFF;
- }
-
- int mpeg3_set_ClipData (mpeg3_t *file, unsigned char *r, unsigned char *g, unsigned char *b,int aStream) {
- long h;
-
- memcpy(file->vtrack[aStream]->video->blueScreenMappingR,r,256);
- memcpy(file->vtrack[aStream]->video->blueScreenMappingG,g,256);
- memcpy(file->vtrack[aStream]->video->blueScreenMappingB,b,256);
-
- for(h=-512;h<=512;h++) {
- file->vtrack[aStream]->video->clipArray_Red[h+512] = r[CLIP(h)];
- file->vtrack[aStream]->video->clipArray_Green[h+512] = g[CLIP(h)];
- file->vtrack[aStream]->video->clipArray_Blue[h+512] = b[CLIP(h)];
- file->vtrack[aStream]->video->clipArray16_Red[h+512]=(r[CLIP(h)] & 0xf8) << 7;
- file->vtrack[aStream]->video->clipArray16_Green[h+512]=(g[CLIP(h)] & 0xf8) << 2;
- file->vtrack[aStream]->video->clipArray16_Blue[h+512]=(b[CLIP(h)] & 0xf8) >> 3;
- }
-
- }
-
- int mpeg3_get_ClipData (mpeg3_t *file, unsigned char *r, unsigned char *g, unsigned char *b,int aStream) {
- memcpy(r,file->vtrack[aStream]->video->blueScreenMappingR,256);
- memcpy(g,file->vtrack[aStream]->video->blueScreenMappingG,256);
- memcpy(b,file->vtrack[aStream]->video->blueScreenMappingB,256);
- }
-
--- 352,354 ----
|
|
From: John M M. <jo...@us...> - 2003-02-08 18:21:35
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/specialChangeSets In directory sc8-pr-cvs1:/tmp/cvs-serv11818/squeak/platforms/Mac OS/vm/specialChangeSets Removed Files: Globalstructure-JMM.3.cs Log Message: see .4.cs --- Globalstructure-JMM.3.cs DELETED --- |
|
From: John M M. <jo...@us...> - 2003-02-08 18:20:52
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/specialChangeSets
In directory sc8-pr-cvs1:/tmp/cvs-serv11639/squeak/platforms/Mac OS/vm/specialChangeSets
Added Files:
Globalstructure-JMM.4.cs
Log Message:
remove extra inst var, causes problems, bogus anyways.
--- NEW FILE: Globalstructure-JMM.4.cs ---
'From Squeak3.4beta of ''1 December 2002'' [latest update: #5156] on 8 January 2003 at 5:41:50 pm'!
"Change Set: Globalstructure-JMM
Date: 5 April 2002
Author: John M McIntosh
Slang logic change to extrude global variables as a structure. This has performance implications on
some platforms (better). Or is needed on some hardware because you don't have support for multiple globals"!
Object subclass: #CCodeGenerator
instanceVariableNames: 'translationDict inlineList constants variables variableDeclarations methods variablesSetCache headerFiles pluginName extraDefs postProcesses isCPP '
classVariableNames: 'UseRightShiftForDivide '
poolDictionaries: ''
category: 'VMConstruction-Translation to C'!
CCodeGenerator subclass: #CCodeGeneratorGlobalStructure
instanceVariableNames: 'globalVariables '
classVariableNames: ''
poolDictionaries: ''
category: 'VMConstruction-Translation to C'!
ObjectMemory subclass: #Interpreter
instanceVariableNames: 'activeContext theHomeContext method receiver instructionPointer stackPointer localIP localSP localHomeContext messageSelector argumentCount newMethod currentBytecode successFlag primitiveIndex methodCache atCache lkupClass reclaimableContextCount nextPollTick nextWakeupTick lastTick interruptKeycode interruptPending semaphoresToSignalA semaphoresUseBufferA semaphoresToSignalCountA semaphoresToSignalB semaphoresToSignalCountB savedWindowSize fullScreenFlag deferDisplayUpdates pendingFinalizationSignals compilerInitialized compilerHooks extraVMMemory newNativeMethod methodClass receiverClass interpreterVersion obsoleteIndexedPrimitiveTable obsoleteNamedPrimitiveTable interpreterProxy showSurfaceFn interruptCheckCounterFeedBackReset interruptChecksEveryNms externalPrimitiveTable cntx val '
classVariableNames: 'ActiveProcessIndex AtCacheEntries AtCacheFixedFields AtCacheFmt AtCacheMask AtCacheOop AtCacheSize AtCacheTotalSize AtPutBase BlockArgumentCountIndex BytecodeTable CacheProbeMax CallerIndex CharacterValueIndex CompilerHooksSize CrossedX DirBadPath DirEntryFound DirNoMoreEntries EndOfRun ExcessSignalsIndex FirstLinkIndex GenerateBrowserPlugin HeaderIndex HomeIndex InitialIPIndex InstanceSpecificationIndex InstructionPointerIndex JitterTable LastLinkIndex LiteralStart MaxExternalPrimitiveTableSize MaxPrimitiveIndex MessageArgumentsIndex MessageDictionaryIndex MessageLookupClassIndex MessageSelectorIndex MethodArrayIndex MethodCacheClass MethodCacheEntries MethodCacheEntrySize MethodCacheMask MethodCacheMethod MethodCacheNative MethodCachePrim MethodCacheSelector MethodCacheSize MethodIndex MillisecondClockMask MyListIndex NextLinkIndex PrimitiveExternalCallIndex PrimitiveTable PriorityIndex ProcessListsIndex ReceiverIndex SelectorStart SemaphoresToSignalSize SenderIndex StackPointerIndex StreamArrayIndex StreamIndexIndex StreamReadLimitIndex StreamWriteLimitIndex SuperclassIndex SuspendedContextIndex TempFrameStart ValueIndex XIndex YIndex '
poolDictionaries: ''
category: 'VMConstruction-Interpreter'!
!CCodeGenerator methodsFor: 'utilities' stamp: 'JMM 4/16/2002 22:39'!
returnPrefixFromVariable: aName
^aName! !
!CCodeGenerator methodsFor: 'C code generator' stamp: 'ar 4/7/2002 18:25'!
emitCVariablesOn: aStream
"Store the global variable declarations on the given stream."
| varString |
aStream nextPutAll: '/*** Variables ***/'; cr.
variables asSortedCollection do: [ :var |
varString _ var asString.
(self isGeneratingPluginCode) ifTrue:[
varString = 'interpreterProxy' ifTrue:[
"quite special..."
aStream cr; nextPutAll: '#ifdef SQUEAK_BUILTIN_PLUGIN'.
aStream cr; nextPutAll: 'extern'.
aStream cr; nextPutAll: '#endif'; cr.
] ifFalse:[aStream nextPutAll:'static '].
].
(variableDeclarations includesKey: varString) ifTrue: [
aStream nextPutAll: (variableDeclarations at: varString), ';'; cr.
] ifFalse: [
"default variable declaration"
aStream nextPutAll: 'int ', varString, ';'; cr.
].
].
aStream cr.! !
!CCodeGeneratorGlobalStructure methodsFor: 'C code generator' stamp: 'JMM 4/16/2002 22:38'!
buildSortedVariablesCollection
"Build sorted vars, cheat do an allinstances to get the variables node, then consolidate in a bag
however I want to special case the arrays to put last in the structure
end result will be sorted collection based on static usage, perhaps cache lines will like this!!"
| globalNames sorted |
globalNames _ TVariableNode allInstances select: [:e | self globalVariables includes: e name].
globalNames _ globalNames collect: [:e | e name].
globalNames _ globalNames reject: [:e | variableDeclarations includesKey: e].
globalNames _ globalNames asBag.
variableDeclarations keysDo:
[:e | globalNames add: e withOccurrences: 0].
sorted _ SortedCollection sortBlock:
[:a :b | (globalNames occurrencesOf: a) > (globalNames occurrencesOf: b)].
sorted addAll: variables.
^sorted! !
!CCodeGeneratorGlobalStructure methodsFor: 'C code generator' stamp: 'JMM 5/9/2002 14:09'!
emitCVariablesOn: aStream
"Store the global variable declarations on the given stream.
break logic into vars for structure and vars for non-structure"
| varString structure nonstruct target |
structure _ WriteStream on: (String new: 32768).
nonstruct _ WriteStream on: (String new: 32768).
aStream nextPutAll: '/*** Variables ***/'; cr.
structure nextPutAll: 'struct foo {'; cr.
self buildSortedVariablesCollection do: [ :var |
varString _ var asString.
target _ (self placeInStructure: var)
ifTrue: [structure]
ifFalse: [nonstruct].
(self isGeneratingPluginCode) ifTrue:[
varString = 'interpreterProxy' ifTrue:[
"quite special..."
aStream cr; nextPutAll: '#ifdef SQUEAK_BUILTIN_PLUGIN'.
aStream cr; nextPutAll: 'extern'.
aStream cr; nextPutAll: '#endif'; cr.
] ifFalse:[aStream nextPutAll:'static '].
].
(variableDeclarations includesKey: varString) ifTrue: [
target nextPutAll: (variableDeclarations at: varString), ';'; cr.
] ifFalse: [
"default variable declaration"
target nextPutAll: 'int ', varString, ';'; cr.
].
].
structure nextPutAll: ' } fum;';cr.
structure nextPutAll: 'struct foo * foo = &fum;';cr;cr.
aStream nextPutAll: structure contents.
aStream nextPutAll: nonstruct contents.
aStream cr.! !
!CCodeGeneratorGlobalStructure methodsFor: 'C code generator' stamp: 'JMM 4/16/2002 22:45'!
globalVariables
"First time we get called we get the global variables into a set"
globalVariables ifNil:
[globalVariables _ Set withAll: variables].
^globalVariables! !
!CCodeGeneratorGlobalStructure methodsFor: 'C code generator' stamp: 'JMM 4/17/2002 16:15'!
placeInStructure: var
"See if we should put this array into a structure
This has hard coded vars, should go somewhere else!!
The variables listed are hardcoded as C in the interpreter thus they don't get resolved via TVariableNode logic
Also Lets igore variables that have special defintions that require initialization,
and the function def which has problems"
| check |
check _ variableDeclarations at: var ifAbsent: [''].
(check includes: $=) ifTrue: [^false].
(check includes: $() ifTrue: [^false].
(check includes: $[) ifTrue: [^false].
(#( 'showSurfaceFn' 'memory' 'extraVMMemory' 'interpreterProxy') includes: var) ifTrue: [^false].
^true.
! !
!CCodeGeneratorGlobalStructure methodsFor: 'C code generator' stamp: 'JMM 4/16/2002 22:39'!
returnPrefixFromVariable: aName
^((self globalVariables includes: aName) and: [self placeInStructure: aName])
ifTrue: ['foo->',aName]
ifFalse: [aName]! !
!Interpreter methodsFor: 'return bytecodes' stamp: 'JMM 4/17/2002 00:05'!
returnFalse
cntx _ self sender.
val _ falseObj.
self returnValueTo.! !
!Interpreter methodsFor: 'return bytecodes' stamp: 'JMM 4/17/2002 00:04'!
returnNil
cntx _ self sender.
val _ nilObj.
self returnValueTo.
! !
!Interpreter methodsFor: 'return bytecodes' stamp: 'JMM 4/17/2002 00:04'!
returnReceiver
cntx _ self sender.
val _ receiver.
self returnValueTo.! !
!Interpreter methodsFor: 'return bytecodes' stamp: 'JMM 4/17/2002 00:05'!
returnTopFromBlock
"Return to the caller of the method containing the block."
cntx _ self caller. "Note: caller, not sender!!"
val _ self internalStackTop.
self returnValueTo.! !
!Interpreter methodsFor: 'return bytecodes' stamp: 'JMM 4/17/2002 00:04'!
returnTopFromMethod
cntx _ self sender.
val _ self internalStackTop.
self returnValueTo.! !
!Interpreter methodsFor: 'return bytecodes' stamp: 'JMM 4/17/2002 00:05'!
returnTrue
cntx _ self sender.
val _ trueObj.
self returnValueTo.! !
!Interpreter methodsFor: 'return bytecodes' stamp: 'JMM 4/17/2002 00:16'!
returnValueTo
"Note: Assumed to be inlined into the dispatch loop."
| nilOop thisCntx contextOfCaller localCntx localVal|
self inline: true.
self sharedCodeNamed: 'commonReturn' inCase: 120.
nilOop _ nilObj. "keep in a register"
thisCntx _ activeContext.
localCntx _ cntx.
localVal _ val.
"make sure we can return to the given context"
((localCntx = nilOop) or:
[(self fetchPointer: InstructionPointerIndex ofObject: localCntx) = nilOop]) ifTrue: [
"error: sender's instruction pointer or context is nil; cannot return"
^self internalCannotReturn: localVal].
"If this return is not to our immediate predecessor (i.e. from a method to its sender, or from a block to its caller), scan the stack for the first unwind marked context and inform this context and let it deal with it. This provides a chance for ensure unwinding to occur."
thisCntx _ self fetchPointer: SenderIndex ofObject: activeContext.
"Just possibly a faster test would be to compare the homeContext and activeContext - they are of course different for blocks. Thus we might be able to optimise a touch by having a different returnTo for the blockreteurn (since we know that must return to caller) and then if active ~= home we must be doing a non-local return. I think. Maybe."
[thisCntx = localCntx] whileFalse: [
thisCntx = nilObj ifTrue:[
"error: sender's instruction pointer or context is nil; cannot return"
^self internalCannotReturn: localVal].
"Climb up stack towards localCntx. Break out to a send of #aboutToReturn:through: if an unwind marked context is found"
(self isUnwindMarked: thisCntx) ifTrue:[
"context is marked; break out"
^self internalAboutToReturn: localVal through: thisCntx].
thisCntx _ self fetchPointer: SenderIndex ofObject: thisCntx.
].
"If we get here there is no unwind to worry about. Simply terminate the stack up to the localCntx - often just the sender of the method"
thisCntx _ activeContext.
[thisCntx = localCntx]
whileFalse:
["climb up stack to localCntx"
contextOfCaller _ self fetchPointer: SenderIndex ofObject: thisCntx.
"zap exited contexts so any future attempted use will be caught"
self storePointerUnchecked: SenderIndex ofObject: thisCntx withValue: nilOop.
self storePointerUnchecked: InstructionPointerIndex ofObject: thisCntx withValue: nilOop.
reclaimableContextCount > 0 ifTrue:
["try to recycle this context"
reclaimableContextCount _ reclaimableContextCount - 1.
self recycleContextIfPossible: thisCntx].
thisCntx _ contextOfCaller].
activeContext _ thisCntx.
(thisCntx < youngStart) ifTrue: [ self beRootIfOld: thisCntx ].
self internalFetchContextRegisters: thisCntx. "updates local IP and SP"
self fetchNextBytecode.
self internalPush: localVal.
! !
!Interpreter class methodsFor: 'translation' stamp: 'JMM 4/16/2002 22:32'!
translateInDirectory: directory doInlining: inlineFlag forBrowserPlugin: pluginFlag
^self translateInDirectory: directory doInlining: inlineFlag forBrowserPlugin: pluginFlag forGlobalStructure: false! !
!Interpreter class methodsFor: 'translation' stamp: 'JMM 5/9/2002 14:21'!
translateInDirectory: directory doInlining: inlineFlag forBrowserPlugin: pluginFlag forGlobalStructure: globalStructureFlag
"Translate the Smalltalk description of the virtual machine into C. If inlineFlag is true, small method bodies are inlined to reduce procedure call overhead. On the PPC, this results in a factor of three speedup with only 30% increase in code size. If pluginFlag is true, generate code for an interpreter that runs as a browser plugin (Netscape or IE)."
"Note: The pluginFlag is meaningless on Windows and Unix. On these platforms Squeak runs as it's own process and doesn't need any special attention from the VMs point of view. Meaning that NONE of the required additional functions will be supported. In other words, the pluginFlag is not needed and not supported."
"The forGlobalStructure flag if true uses a different CCodeGenerator to build globals as a pointer to a structure, some RISC based platforms PPC for example
them make better assembler"
"Return the list of exports for this module"
| doInlining cg fileName tStamp fstat |
tStamp _ { Interpreter. ObjectMemory} inject: 0 into: [:tS :cl|
tS _ tS max: cl timeStamp].
"don't translate if the file is newer than my timeStamp"
fileName _ 'interp.c'.
fstat _ directory entryAt: fileName ifAbsent:[nil].
fstat ifNotNil:[tStamp < fstat modificationTime ifTrue:[^nil]].
doInlining _ inlineFlag.
pluginFlag ifTrue: [doInlining _ true]. "must inline when generating browser plugin"
Interpreter initialize.
ObjectMemory initialize.
GenerateBrowserPlugin _ pluginFlag.
cg _ globalStructureFlag
ifTrue: [CCodeGeneratorGlobalStructure new initialize]
ifFalse: [CCodeGenerator new initialize].
cg addClass: Interpreter.
cg addClass: ObjectMemory.
Interpreter declareCVarsIn: cg.
ObjectMemory declareCVarsIn: cg.
cg storeCodeOnFile: (directory fullNameFor: fileName) doInlining: doInlining! !
!MacOSPowerPCOS9VMMaker methodsFor: 'generate sources' stamp: 'JMM 5/9/2002 14:21'!
generateInterpreterFile
"generate the main 'interp.c' file for the interpreter and the list of
export statments"
Interpreter
translateInDirectory: self coreVMDirectory
doInlining: inline
forBrowserPlugin: forBrowser
forGlobalStructure: true.
! !
!TVariableNode methodsFor: 'as yet unclassified' stamp: 'JMM 4/5/2002 14:14'!
emitCCodeOn: aStream level: level generator: aCodeGen
name = 'nil'
ifTrue: [ aStream nextPutAll: (aCodeGen cLiteralFor: nil) ]
ifFalse: [ aStream nextPutAll: (aCodeGen returnPrefixFromVariable: name) ].! !
Interpreter removeSelector: #returnValue:to:!
|
|
From: Tim R. <row...@us...> - 2003-02-04 23:43:49
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/misc/ToCopy In directory sc8-pr-cvs1:/tmp/cvs-serv17833 Added Files: KillOfiles,feb Log Message: This time I really mean it; add KillOfiles.... ***** Bogus filespec: KillOfiles,feb,NONE,1.1 |
|
From: Tim R. <row...@us...> - 2003-02-04 23:41:57
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/misc/ToCopy/!Squeak In directory sc8-pr-cvs1:/tmp/cvs-serv16928 Added Files: !ImName,fff Log Message: Add obey file to remove all obh files from build tree ***** Bogus filespec: !ImName,fff,NONE,1.1 |
|
From: Tim R. <row...@us...> - 2003-02-04 21:10:32
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv13713/vm
Modified Files:
osExports.c sqPlatformSpecific.h sqRPCEvents.c
sqRPCExternalPrims.c sqRPCWindows.c
Log Message:
Rework makefile to combine theold makeplug & makeplugin
Fix problems with fullscreen, change display handling to avoid ugly
'displayBits' hack.
Other minor changes to support compiling with latest Castle/Acorn CC tools.
Index: osExports.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/osExports.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** osExports.c 24 Apr 2002 17:56:36 -0000 1.1
--- osExports.c 4 Feb 2003 21:10:20 -0000 1.2
***************
*** 9,13 ****
extern void setSocketPollFunction(int spf );
void *os_exports[][3] = {
- // #include "platform.exports"
XFN(setSocketPollFunction)
{NULL, NULL, NULL}
--- 9,12 ----
Index: sqPlatformSpecific.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqPlatformSpecific.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** sqPlatformSpecific.h 14 Jan 2003 03:41:09 -0000 1.5
--- sqPlatformSpecific.h 4 Feb 2003 21:10:20 -0000 1.6
***************
*** 28,31 ****
--- 28,37 ----
#define sqFilenameFromString(dst, src, num) sqFilenameFromString(dst, src, num)
+ #undef sqImageFileRead
+ size_t sqImageFileRead(void *ptr, size_t sz, size_t count, FILE* f);
+
+ #undef sqImageFileWrite
+ size_t sqImageFileWrite(void *ptr, size_t sz, size_t count, FILE* f);
+
int sqCopyFilesizetosize(char *srcName, int srcNameSize, char *dstName, int dstNameSize);
Index: sqRPCEvents.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCEvents.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqRPCEvents.c 14 Jan 2003 03:41:09 -0000 1.3
--- sqRPCEvents.c 4 Feb 2003 21:10:21 -0000 1.4
***************
*** 21,24 ****
--- 21,28 ----
#include "sqArguments.h"
+ #define longAt(i) (*((int *) (i)))
+
+ //#define DEBUG
+
extern wimp_w sqWindowHandle;
wimp_block wimpPollBlock;
***************
*** 28,31 ****
--- 32,37 ----
extern os_coord pointerOffset;
extern os_coord scalingFactor, scrollOffset, visibleArea;
+ int displayBitmapIndex;
+ extern unsigned int * displaySpriteBits;
/*** Variables -- Event Recording ***/
***************
*** 61,79 ****
#define KEYBUF_SIZE 64
int keyBuf[KEYBUF_SIZE]; /* circular buffer */
! int keyBufGet = 0; /* ndex of next item of keyBuf to read */
! int keyBufPut = 0; /* ndex of next item of keyBuf to write */
int keyBufOverflows = 0; /* number of characters dropped */
! int buttonState = 0; /* mouse button and modifier state */
os_coord savedMousePosition; /* mouse position; not modified when window is inactive */
! int mouseButtonDown; /* keep track of curent mouse button state - for drags outside window */
extern int getInterruptKeycode(void);
! extern int setInterruptPending(int value);
extern int setInterruptCheckCounter(int value);
int scanLine, startX, xLen, startY, stopY, pixelsPerWord, pixelsPerWordShift;
void (*reverserFunction)(void);
! extern int displayBits;
! void (*socketPollFunction)(int delay, int extraFd) = null;
--- 67,84 ----
#define KEYBUF_SIZE 64
int keyBuf[KEYBUF_SIZE]; /* circular buffer */
! int keyBufGet = 0; /* index of next item of keyBuf to read */
! int keyBufPut = 0; /* index of next item of keyBuf to write */
int keyBufOverflows = 0; /* number of characters dropped */
! int buttonState = 0; /* mouse button and modifier state */
os_coord savedMousePosition; /* mouse position; not modified when window is inactive */
! int mouseButtonDown; /* keep track of curent mouse button state - for drags outside window */
extern int getInterruptKeycode(void);
! extern int setInterruptPending(int value);
extern int setInterruptCheckCounter(int value);
int scanLine, startX, xLen, startY, stopY, pixelsPerWord, pixelsPerWordShift;
void (*reverserFunction)(void);
! void (*socketPollFunction)(int delay, int extraFd) = null;
***************
*** 243,247 ****
void WindowOpen( wimp_open * wblock);
extern void claimCaret(wimp_pointer * wblock);
- extern void aioPollForIO(int, int); /* see sqRPCNetwork.c */
extern void receivedClaimEntity(wimp_message * wblock);
extern void receivedDataRequest(wimp_message * wmessage);
--- 248,251 ----
***************
*** 251,270 ****
void eventBufAppendMouseUp(int buttons, int x, int y);
void eventBufAppendMouseMove(int x, int y);
! extern void platReportError( os_error * e);
- //#define dbg
-
void setSocketPollFunction(int spf ) {
socketPollFunction = (void(*)(int, int))spf;
! #ifdef dbg
{
! extern os_error privateErr;
!
! privateErr.errnum = (bits)0;
! sprintf(privateErr.errmess, "socketPoll %0x", (int)socketPollFunction);
! platReportError((os_error *)&privateErr);
! }
#endif
}
--- 255,271 ----
void eventBufAppendMouseUp(int buttons, int x, int y);
void eventBufAppendMouseMove(int x, int y);
! extern void platReportError( os_error * e);
void setSocketPollFunction(int spf ) {
socketPollFunction = (void(*)(int, int))spf;
! #ifdef DEBUG
{
! extern os_error privateErr;
! privateErr.errnum = (bits)0;
! sprintf(privateErr.errmess, "socketPoll %0x", (int)socketPollFunction);
! platReportError((os_error *)&privateErr);
! }
#endif
}
***************
*** 308,319 ****
if(socketPollFunction) {
socketPollFunction(microSecondsToDelay, 0);
! #ifdef dbg
{
! extern os_error privateErr;
! privateErr.errnum = (bits)0;
! sprintf(privateErr.errmess, "socketPoll %0x", (int)socketPollFunction);
! platReportError((os_error *)&privateErr);
! }
#endif
}
--- 309,320 ----
if(socketPollFunction) {
socketPollFunction(microSecondsToDelay, 0);
! #ifdef DEBUG
{
! extern os_error privateErr;
! privateErr.errnum = (bits)0;
! sprintf(privateErr.errmess, "socketPoll %0x", (int)socketPollFunction);
! platReportError((os_error *)&privateErr);
! }
#endif
}
***************
*** 322,343 ****
xwimp_poll_idle((wimp_MASK_POLLWORD| wimp_MASK_GAIN | wimp_MASK_LOSE | wimp_SAVE_FP) , &wimpPollBlock, (os_t)pollDelay, &wimpPollWord, (wimp_event_no*)&wimpPollEvent);
switch ( wimpPollEvent ) {
! case wimp_NULL_REASON_CODE : /* null means no more interesting events, so return */
! return false ; break;
! case wimp_REDRAW_WINDOW_REQUEST : DisplayPixmap(); break;
! case wimp_OPEN_WINDOW_REQUEST : WindowOpen(&wimpPollBlock.open); break;
! case wimp_CLOSE_WINDOW_REQUEST : WindowClose(&wimpPollBlock.close); break;
! case wimp_POINTER_LEAVING_WINDOW : PointerLeaveWindow(&wimpPollBlock); break;
! case wimp_POINTER_ENTERING_WINDOW: PointerEnterWindow(&wimpPollBlock); break;
! case wimp_MOUSE_CLICK : MouseButtons(&wimpPollBlock.pointer); break;
! case wimp_USER_DRAG_BOX : DoNothing(); break;
! case wimp_KEY_PRESSED : KeyPressed( &wimpPollBlock.key); break;
! case wimp_MENU_SELECTION : DoNothing(); break;
! case wimp_SCROLL_REQUEST : DoNothing(); break;
// dont use gain/lose when using clipboard protocols
! //case wimp_LOSE_CARET : DeactivateWindow(&wimpPollBlock); break;
! //case wimp_GAIN_CARET : ActivateWindow(&wimpPollBlock); break;
! case wimp_USER_MESSAGE : UserMessage(&wimpPollBlock.message); break;
! case wimp_USER_MESSAGE_RECORDED : UserMessage(&wimpPollBlock.message); break;
! case wimp_USER_MESSAGE_ACKNOWLEDGE : UserMessage(&wimpPollBlock.message); break;
}
}
--- 323,361 ----
xwimp_poll_idle((wimp_MASK_POLLWORD| wimp_MASK_GAIN | wimp_MASK_LOSE | wimp_SAVE_FP) , &wimpPollBlock, (os_t)pollDelay, &wimpPollWord, (wimp_event_no*)&wimpPollEvent);
switch ( wimpPollEvent ) {
! case wimp_NULL_REASON_CODE:
! /* null means no more interesting events,
! so return */
! return false ; break;
! case wimp_REDRAW_WINDOW_REQUEST :
! DisplayPixmap(); break;
! case wimp_OPEN_WINDOW_REQUEST :
! WindowOpen(&wimpPollBlock.open); break;
! case wimp_CLOSE_WINDOW_REQUEST :
! WindowClose(&wimpPollBlock.close); break;
! case wimp_POINTER_LEAVING_WINDOW :
! PointerLeaveWindow(&wimpPollBlock); break;
! case wimp_POINTER_ENTERING_WINDOW:
! PointerEnterWindow(&wimpPollBlock); break;
! case wimp_MOUSE_CLICK :
! MouseButtons(&wimpPollBlock.pointer); break;
! case wimp_USER_DRAG_BOX :
! DoNothing(); break;
! case wimp_KEY_PRESSED :
! KeyPressed( &wimpPollBlock.key); break;
! case wimp_MENU_SELECTION :
! DoNothing(); break;
! case wimp_SCROLL_REQUEST :
! DoNothing(); break;
// dont use gain/lose when using clipboard protocols
! //case wimp_LOSE_CARET :
! // DeactivateWindow(&wimpPollBlock); break;
! //case wimp_GAIN_CARET :
! // ActivateWindow(&wimpPollBlock); break;
! case wimp_USER_MESSAGE :
! UserMessage(&wimpPollBlock.message); break;
! case wimp_USER_MESSAGE_RECORDED :
! UserMessage(&wimpPollBlock.message); break;
! case wimp_USER_MESSAGE_ACKNOWLEDGE :
! UserMessage(&wimpPollBlock.message); break;
}
}
***************
*** 349,361 ****
void reverse_image_1bpps(void) {
! unsigned int * linePtr, *pixPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! linePtr = (unsigned int *)(displayBits + 4) + j;
! pixPtr = linePtr + startX;
{ int i, k;
unsigned int w, nw;
! for (i=xLen; i--; pixPtr++) {
! w = (unsigned int ) *pixPtr;
nw = w & 0x1;
for (k=31; k--;) {
--- 367,379 ----
void reverse_image_1bpps(void) {
! unsigned int * srcPtr, *dstPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! srcPtr = (unsigned int *)displayBitmapIndex + j + startX;
! dstPtr = displaySpriteBits + j + startX;
{ int i, k;
unsigned int w, nw;
! for (i=xLen; i--; srcPtr++, dstPtr++) {
! w = (unsigned int ) *srcPtr;
nw = w & 0x1;
for (k=31; k--;) {
***************
*** 363,367 ****
nw = (nw << 1) | (w & 0x1);
}
! *pixPtr = nw;
}
}
--- 381,385 ----
nw = (nw << 1) | (w & 0x1);
}
! *dstPtr = nw;
}
}
***************
*** 370,382 ****
void reverse_image_2bpps(void) {
! unsigned int * linePtr, *pixPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! linePtr = (unsigned int *)(displayBits + 4) + j;
! pixPtr = linePtr + startX;
{ int i, k;
unsigned int w, nw;
! for (i=xLen; i--; pixPtr++) {
! w = (unsigned int ) *pixPtr;
nw = w & 0x3;
for (k=15; k--;) {
--- 388,400 ----
void reverse_image_2bpps(void) {
! unsigned int * srcPtr, *dstPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! srcPtr = (unsigned int *)displayBitmapIndex + j + startX;
! dstPtr = displaySpriteBits + j + startX;
{ int i, k;
unsigned int w, nw;
! for (i=xLen; i--; srcPtr++, dstPtr++) {
! w = (unsigned int ) *srcPtr;
nw = w & 0x3;
for (k=15; k--;) {
***************
*** 384,388 ****
nw = (nw << 2) | (w & 0x3);
}
! *pixPtr = nw;
}
}
--- 402,406 ----
nw = (nw << 2) | (w & 0x3);
}
! *dstPtr = nw;
}
}
***************
*** 391,403 ****
void reverse_image_4bpps(void) {
! unsigned int * linePtr, *pixPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! linePtr = (unsigned int *)(displayBits + 4) + j;
! pixPtr = linePtr + startX;
{ int i;
unsigned int w, nw;
! for (i=xLen; i--; pixPtr++) {
! w = (unsigned int ) *pixPtr;
nw = w & 0xF;
w = w >> 4;
--- 409,421 ----
void reverse_image_4bpps(void) {
! unsigned int * srcPtr, *dstPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! srcPtr = (unsigned int *)displayBitmapIndex + j + startX;
! dstPtr = displaySpriteBits + j + startX;
{ int i;
unsigned int w, nw;
! for (i=xLen; i--; srcPtr++, dstPtr++) {
! w = (unsigned int ) *srcPtr;
nw = w & 0xF;
w = w >> 4;
***************
*** 415,419 ****
w = w >> 4;
nw = (nw << 4) | (w & 0xF);
! *pixPtr = nw;
}
}
--- 433,437 ----
w = w >> 4;
nw = (nw << 4) | (w & 0xF);
! *dstPtr = nw;
}
}
***************
*** 422,441 ****
void reverse_image_bytes(void) {
! unsigned int *linePtr, *pixPtr;
! unsigned char * bytePtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! linePtr = (unsigned int *)(displayBits + 4) + j;
! pixPtr = linePtr + startX;
{ int i;
! unsigned int pix;
! for (i=xLen; i--; pixPtr++) {
! pix = *pixPtr;
! bytePtr = (unsigned char *)pixPtr;
! bytePtr[3] = pix & 0xFF;
! bytePtr[2] = (pix >> 8) & 0xFF;
! bytePtr[1] = (pix >> 16) & 0xFF;
! bytePtr[0] = (pix >> 24);
! /* *pixPtr = (((((pix >> 24)) & 255) + (((pix >> 8)) & 65280)) + (((pix << 8)) & 16711680)) + (((pix << 24)) & 4278190080U); */
}
}
--- 440,460 ----
void reverse_image_bytes(void) {
! unsigned int * srcPtr, *dstPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! srcPtr = (unsigned int *)displayBitmapIndex + j + startX;
! dstPtr = displaySpriteBits + j + startX;
{ int i;
! unsigned int w, nw;
! for (i=xLen; i--; srcPtr++, dstPtr++) {
! w = *srcPtr;
! nw = w & 0xFF;
! w = w >>8;
! nw = (nw << 8) | (w & 0xFF);
! w = w >>8;
! nw = (nw << 8) | (w & 0xFF);
! w = w >>8;
! nw = (nw << 8) | (w & 0xFF);
! *dstPtr = nw;
}
}
***************
*** 444,456 ****
void reverse_image_words(void) {
! unsigned int * linePtr, *pixPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! linePtr = (unsigned int *)(displayBits + 4) + j;
! pixPtr = linePtr + startX;
{ int i;
unsigned int w, nw;
! for (i=xLen; i--; pixPtr++) {
! w = (unsigned int ) *pixPtr;
nw = w & 0x1F;
w = w >> 5;
--- 463,475 ----
void reverse_image_words(void) {
! unsigned int * srcPtr, *dstPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! srcPtr = (unsigned int *)displayBitmapIndex + j + startX;
! dstPtr = displaySpriteBits + j + startX;
{ int i;
unsigned int w, nw;
! for (i=xLen; i--; srcPtr++, dstPtr++) {
! w = (unsigned int ) *srcPtr;
nw = w & 0x1F;
w = w >> 5;
***************
*** 464,468 ****
w = w >> 5;
nw = (nw << 5) | (w & 0x1F);
! *pixPtr = nw;
}
}
--- 483,487 ----
w = w >> 5;
nw = (nw << 5) | (w & 0x1F);
! *dstPtr = nw;
}
}
***************
*** 471,483 ****
void reverse_image_longs(void) {
! unsigned int * linePtr, *pixPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! linePtr = (unsigned int *)(displayBits + 4) + j;
! pixPtr = linePtr + startX;
{ int i;
unsigned int w, nw;
! for (i=xLen; i--; pixPtr++) {
! w = (unsigned int ) *pixPtr;
nw = w & 0xFF;
w = w >> 8;
--- 490,502 ----
void reverse_image_longs(void) {
! unsigned int * srcPtr, *dstPtr;
int j;
for(j = startY; j < stopY; j += scanLine) {
! srcPtr = (unsigned int *)displayBitmapIndex + j + startX;
! dstPtr = displaySpriteBits + j + startX;
{ int i;
unsigned int w, nw;
! for (i=xLen; i--; srcPtr++, dstPtr++) {
! w = (unsigned int ) *srcPtr;
nw = w & 0xFF;
w = w >> 8;
***************
*** 485,489 ****
w = w >> 8;
nw = (nw << 8) | (w & 0xFF);
! *pixPtr = nw;
}
}
--- 504,508 ----
w = w >> 8;
nw = (nw << 8) | (w & 0xFF);
! *dstPtr = nw;
}
}
***************
*** 505,511 ****
default: reverserFunction = reverseNothing; return;
}
pixelsPerWordShift = 5-log2Depth;
! pixelsPerWord= 1 << pixelsPerWordShift; /* was = 32/depth */
! scanLine= (squeakDisplaySize.x + pixelsPerWord-1) >> pixelsPerWordShift; /* words per scan line */
}
--- 524,531 ----
default: reverserFunction = reverseNothing; return;
}
+ /* work out words per scan line */
pixelsPerWordShift = 5-log2Depth;
! pixelsPerWord= 1 << pixelsPerWordShift;
! scanLine= (squeakDisplaySize.x + pixelsPerWord-1) >> pixelsPerWordShift;
}
***************
*** 526,536 ****
extern osspriteop_header *displaySprite;
extern osspriteop_trans_tab * pixelTranslationTable;
! //bool more;
! int more;
wimp_draw wblock;
os_error * e;
int xA, yA, xB, yB;
! if ( sqWindowHandle == null ) return;
wblock.w = sqWindowHandle;
more = wimp_redraw_window( &wblock );
DisplayReverseSetup();
--- 546,575 ----
extern osspriteop_header *displaySprite;
extern osspriteop_trans_tab * pixelTranslationTable;
! extern int displayObject(void);
! osbool more;
wimp_draw wblock;
os_error * e;
int xA, yA, xB, yB;
! if ( displaySpriteBits == NULL ) {
! #ifdef DEBUG
! {
! extern os_error privateErr;
! privateErr.errnum = (bits)0;
! sprintf(privateErr.errmess, "DisplayPixmap NULL");
! platReportError((os_error *)&privateErr);
! }
! #endif
! /* flush the damage rectangles */
! wblock.w = sqWindowHandle;
! more = wimp_redraw_window( &wblock );
! while ( more ) {
! xwimp_get_rectangle (&wblock, &more);
! }
! return;
! }
wblock.w = sqWindowHandle;
+ /* Find latest address of source Bitmap.
+ Sensitive to object format */
+ displayBitmapIndex = longAt((displayObject() + 4)+(0 * 4)) + 4;
more = wimp_redraw_window( &wblock );
DisplayReverseSetup();
***************
*** 542,548 ****
DisplayReverseAreaSetup(xA, yA, xB, yB);
reverserFunction();
! if ((e = xosspriteop_put_sprite_scaled (osspriteop_USER_AREA, spriteAreaPtr,
! (osspriteop_id)&(displaySprite->name), wblock.box.x0, wblock.box.y0,
! os_ACTION_OVERWRITE | osspriteop_GIVEN_WIDE_ENTRIES, (os_factors const *)0,pixelTranslationTable)) != NULL) {
if ( spriteAreaPtr != null) {
platReportError(e);
--- 581,590 ----
DisplayReverseAreaSetup(xA, yA, xB, yB);
reverserFunction();
! if ((e = xosspriteop_put_sprite_scaled (osspriteop_USER_AREA,
! spriteAreaPtr,
! (osspriteop_id)&(displaySprite->name),
! wblock.box.x0, wblock.box.y0,
! os_ACTION_OVERWRITE | osspriteop_GIVEN_WIDE_ENTRIES,
! (os_factors const *)0,pixelTranslationTable)) != NULL) {
if ( spriteAreaPtr != null) {
platReportError(e);
***************
*** 550,554 ****
}
}
- reverserFunction();
xwimp_get_rectangle (&wblock, &more);
}
--- 592,595 ----
***************
*** 584,590 ****
DisplayReverseAreaSetup(xA, yA, xB, yB);
reverserFunction();
! if ((e = xosspriteop_put_sprite_scaled (osspriteop_USER_AREA, spriteAreaPtr,
! (osspriteop_id)&(displaySprite->name), wblock.box.x0, wblock.box.y0,
! os_ACTION_OVERWRITE | osspriteop_GIVEN_WIDE_ENTRIES, (os_factors const *)0,pixelTranslationTable)) != NULL) {
if ( spriteAreaPtr != null) {
platReportError(e);
--- 625,634 ----
DisplayReverseAreaSetup(xA, yA, xB, yB);
reverserFunction();
! if ((e = xosspriteop_put_sprite_scaled (osspriteop_USER_AREA,
! spriteAreaPtr,
! (osspriteop_id)&(displaySprite->name),
! wblock.box.x0, wblock.box.y0,
! os_ACTION_OVERWRITE | osspriteop_GIVEN_WIDE_ENTRIES,
! (os_factors const *)0,pixelTranslationTable)) != NULL) {
if ( spriteAreaPtr != null) {
platReportError(e);
***************
*** 592,596 ****
}
}
- reverserFunction();
xwimp_get_rectangle (&wblock, &more);
}
--- 636,639 ----
Index: sqRPCExternalPrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCExternalPrims.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqRPCExternalPrims.c 14 Jan 2003 03:41:09 -0000 1.3
--- sqRPCExternalPrims.c 4 Feb 2003 21:10:21 -0000 1.4
***************
*** 13,18 ****
// define this to get lots of debug notifiers
! //#define dbg
! #ifdef dbg
#define FPRINTF(s)\
{\
--- 13,18 ----
// define this to get lots of debug notifiers
! //#define DEBUG
! #ifdef DEBUG
#define FPRINTF(s)\
{\
***************
*** 31,48 ****
int ioFindExternalFunctionIn(char *symbol, int moduleHandle) {
// find the function named symbol in the known loaded module moduleHandle
! int fnIndex, address;
! char * foundName;
! fnIndex = 0;
! FPRINTF((privateErr.errmess, "ioFindExternalFunctionIn: (%d)%s", strlen(symbol), symbol));
! do {
! address = (int)rink_enum_named((rink_seghandle)moduleHandle, &fnIndex, &foundName);
if ( strcmp(foundName, symbol) == 0) {
return address;
}
! } while(fnIndex >= 0);
// failed to find the function...
! FPRINTF((privateErr.errmess, " did not find: %s",foundName));
return 0;
}
--- 31,48 ----
int ioFindExternalFunctionIn(char *symbol, int moduleHandle) {
// find the function named symbol in the known loaded module moduleHandle
! int fnIndex= 0, address;
! const char * foundName;
! FPRINTF((privateErr.errmess, "ioFindExternalFunctionIn: %s", symbol));
+ while ( (address = (int)rink_enum_named((rink_seghandle)moduleHandle, &fnIndex, &foundName)), fnIndex >= 0) {
if ( strcmp(foundName, symbol) == 0) {
+ FPRINTF((privateErr.errmess, "found: %s",foundName));
return address;
}
! }
!
// failed to find the function...
! FPRINTF((privateErr.errmess, " did not find: %s", symbol));
return 0;
}
***************
*** 52,75 ****
// of the directory the code and links files are stored in
extern char vmPath[];
! rink_version *Version;
! _kernel_oserror * e;
rink_seghandle moduleHandle;
char codeName[256];
! char linksName[256];
! rink_check CheckBlock;
! // make filename of the code and links
! sprintf(codeName, "%splugins.%s.Code", vmPath, modName);
! sprintf(linksName, "%splugins.%s.Links", vmPath, modName);
FPRINTF((privateErr.errmess, "Load: %s",modName));
!
! // set up the check block
! strcpy(CheckBlock.id, "SqueakSO");
! CheckBlock.main_version = 100;
! CheckBlock.code_version = 0;
!
// load the segment...
! if((e = rink_load(codeName, linksName, &moduleHandle, &CheckBlock)) != NULL) {
FPRINTF((privateErr.errmess, "Plugin load failed: %s", codeName));
return 0;
--- 52,68 ----
// of the directory the code and links files are stored in
extern char vmPath[];
! const rink_version *Version;
! const _kernel_oserror * e;
rink_seghandle moduleHandle;
char codeName[256];
! const rink_check CheckBlock = {"SqueakSO", 100, 0};
! // make filename of the code
! sprintf(codeName, "%splugins.%s", vmPath, modName);
FPRINTF((privateErr.errmess, "Load: %s",modName));
!
// load the segment...
! if((e = rink_load(&CheckBlock, codeName, &moduleHandle)) != NULL) {
FPRINTF((privateErr.errmess, "Plugin load failed: %s", codeName));
return 0;
Index: sqRPCWindows.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCWindows.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqRPCWindows.c 14 Jan 2003 03:41:09 -0000 1.3
--- sqRPCWindows.c 4 Feb 2003 21:10:24 -0000 1.4
***************
*** 24,27 ****
--- 24,29 ----
#define longAt(i) (*((int *) (i)))
+ //#define DEBUG
+
/*** Variables -- Imported from Virtual Machine ***/
extern unsigned char *memory;
***************
*** 74,78 ****
wimp_version_no actualOSLevel;
[...1088 lines suppressed...]
--- 1297,1301 ----
initGlobalStructure();
! dummyWimpPoll();
/* read the image file and allocate memory for Squeak heap */
***************
*** 1290,1294 ****
privateErr.errnum = (bits)0;
sprintf(privateErr.errmess, "Could not open the Squeak image file '%s'\n", imageName);
! platReportFatalError((os_error *)&privateErr);
ioExit();
}
--- 1305,1310 ----
privateErr.errnum = (bits)0;
sprintf(privateErr.errmess, "Could not open the Squeak image file '%s'\n", imageName);
! platReportError((os_error *)&privateErr);
! helpMessage(vmPath, "!ImName");
ioExit();
}
|
|
From: Tim R. <row...@us...> - 2003-02-04 21:10:23
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/misc/ToCopy/!Squeak In directory sc8-pr-cvs1:/tmp/cvs-serv13713/misc/ToCopy/!Squeak Modified Files: !run,feb Log Message: Rework makefile to combine theold makeplug & makeplugin Fix problems with fullscreen, change display handling to avoid ugly 'displayBits' hack. Other minor changes to support compiling with latest Castle/Acorn CC tools. ***** Bogus filespec: !run,feb,1.1,1.2 |
|
From: Tim R. <row...@us...> - 2003-02-04 21:10:23
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/misc/ToCopy In directory sc8-pr-cvs1:/tmp/cvs-serv13713/misc/ToCopy Added Files: MakeFile,fe1 Removed Files: MakePlug,fe1 MakePlugins,fe1 Log Message: Rework makefile to combine theold makeplug & makeplugin Fix problems with fullscreen, change display handling to avoid ugly 'displayBits' hack. Other minor changes to support compiling with latest Castle/Acorn CC tools. ***** Bogus filespec: MakeFile,fe1,NONE,1.1 ***** Bogus filespec: MakePlug,fe1,1.1,NONE ***** Bogus filespec: MakePlugins,fe1,1.2,NONE |
|
From: Tim R. <row...@us...> - 2003-01-14 03:41:12
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv31826/platforms/RiscOS/vm
Modified Files:
sqArgument.c sqPlatformSpecific.h sqRPCEvents.c
sqRPCExternalPrims.c sqRPCWindows.c
Log Message:
Bring the above file up to date with latest Acorn port work.
a) clean ups
b) global variable structure
c) global reg var to point to said struct -> 30% speedup !!
Index: sqArgument.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqArgument.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqArgument.c 5 Apr 2002 00:42:25 -0000 1.3
--- sqArgument.c 14 Jan 2003 03:41:09 -0000 1.4
***************
*** 6,10 ****
#include "sqArguments.h"
! static opt = 0;
static int numOptions;
static char** optionArray;
--- 6,10 ----
#include "sqArguments.h"
! static int opt = 0;
static int numOptions;
static char** optionArray;
***************
*** 22,25 ****
--- 22,26 ----
int magic;
int byteSwapped(int);
+ extern int readableFormat(int imageVersion);
fp = fopen(name,"rb");
Index: sqPlatformSpecific.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqPlatformSpecific.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sqPlatformSpecific.h 23 Apr 2002 22:08:47 -0000 1.4
--- sqPlatformSpecific.h 14 Jan 2003 03:41:09 -0000 1.5
***************
*** 9,18 ****
*/
!
#ifdef ACORN
#include "oslib/os.h"
/* acorn memory allocation */
#undef sqAllocateMemory
#define sqAllocateMemory(minHeapSize, desiredHeapSize) platAllocateMemory(desiredHeapSize)
--- 9,25 ----
*/
! /* This odd looking declaration is to allow the global variable foo to be
! * kept in a register all the time. This produces an approx 30% speedup */
#ifdef ACORN
+ #pragma -r1
+ extern struct foo * foo;
+ #pragma -r0
+
#include "oslib/os.h"
+
/* acorn memory allocation */
#undef sqAllocateMemory
+ int platAllocateMemory(int amount);
#define sqAllocateMemory(minHeapSize, desiredHeapSize) platAllocateMemory(desiredHeapSize)
***************
*** 20,23 ****
--- 27,32 ----
extern void sqFilenameFromString(char*fileName, int sqString, int sqSize);
#define sqFilenameFromString(dst, src, num) sqFilenameFromString(dst, src, num)
+
+ int sqCopyFilesizetosize(char *srcName, int srcNameSize, char *dstName, int dstNameSize);
#define squeakFileOffsetType int
Index: sqRPCEvents.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCEvents.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqRPCEvents.c 23 Apr 2002 22:08:47 -0000 1.2
--- sqRPCEvents.c 14 Jan 2003 03:41:09 -0000 1.3
***************
*** 60,74 ****
#define KEYBUF_SIZE 64
! int keyBuf[KEYBUF_SIZE]; /* circular buffer */
! int keyBufGet = 0; /* ndex of next item of keyBuf to read */
! int keyBufPut = 0; /* ndex of next item of keyBuf to write */
! int keyBufOverflows = 0; /* number of characters dropped */
! int buttonState = 0; /* mouse button and modifier state */
! os_coord savedMousePosition; /* mouse position; not modified when window is inactive */
! int mouseButtonDown; /* keep track of curent mouse button state - for drags outside window */
! extern int interruptKeycode;
! extern int interruptPending;
! extern int interruptCheckCounter;
int scanLine, startX, xLen, startY, stopY, pixelsPerWord, pixelsPerWordShift;
--- 60,74 ----
#define KEYBUF_SIZE 64
! int keyBuf[KEYBUF_SIZE]; /* circular buffer */
! int keyBufGet = 0; /* ndex of next item of keyBuf to read */
! int keyBufPut = 0; /* ndex of next item of keyBuf to write */
! int keyBufOverflows = 0; /* number of characters dropped */
! int buttonState = 0; /* mouse button and modifier state */
! os_coord savedMousePosition; /* mouse position; not modified when window is inactive */
! int mouseButtonDown; /* keep track of curent mouse button state - for drags outside window */
! extern int getInterruptKeycode(void);
! extern int setInterruptPending(int value);
! extern int setInterruptCheckCounter(int value);
int scanLine, startX, xLen, startY, stopY, pixelsPerWord, pixelsPerWordShift;
***************
*** 526,530 ****
extern osspriteop_header *displaySprite;
extern osspriteop_trans_tab * pixelTranslationTable;
! bool more;
wimp_draw wblock;
os_error * e;
--- 526,531 ----
extern osspriteop_header *displaySprite;
extern osspriteop_trans_tab * pixelTranslationTable;
! //bool more;
! int more;
wimp_draw wblock;
os_error * e;
***************
*** 560,564 ****
extern osspriteop_trans_tab * pixelTranslationTable;
extern os_coord squeakDisplaySize;
! bool more;
wimp_draw wblock;
os_error * e;
--- 561,566 ----
extern osspriteop_trans_tab * pixelTranslationTable;
extern os_coord squeakDisplaySize;
! //bool more;
! int more;
wimp_draw wblock;
os_error * e;
***************
*** 651,660 ****
keystate = wblock->c;
! if (keystate == interruptKeycode || ( (keystate == wimp_KEY_PRINT)/* && (buttonState & CmdKey ) */) ) {
// The image tends to set the interruptKeycode to suit the Mac cmd-. nonsense
! // this is decidedly not Acorn compatible, so check for right-ctl-printscrn as well
! // interrupt is a meta-event; do not report it as a keypress
! interruptPending = true;
! interruptCheckCounter = 0;
return;
}
--- 653,662 ----
keystate = wblock->c;
! if (keystate == getInterruptKeycode() || ( (keystate == wimp_KEY_PRINT)) ) {
// The image tends to set the interruptKeycode to suit the Mac cmd-. nonsense
! // this is decidedly not Acorn compatible, so check for printscrn/SysRq as well
! // interrupt is a meta-event; do not report it as a keypress
! setInterruptPending(true);
! setInterruptCheckCounter(0);
return;
}
***************
*** 694,703 ****
void eventBufAppendEvent(int type, int mouseX, int mouseY, int buttons, int key) {
! /* append an event to the queue. DO NOT siganl the input semaphore here since the
* HandleEvents() routine is called from place where that causes segfaults!!
* Leave the signalling to the ioEventsCount() routine.
*/
- /* first check there is room on the queue */
int peek;
peek = (eventBufPut + 1) % EVENTQ_SIZE;
if ( peek == eventBufGet) {/* no room, drop the whole thing */
--- 696,705 ----
void eventBufAppendEvent(int type, int mouseX, int mouseY, int buttons, int key) {
! /* append an event to the queue. DO NOT signal the input semaphore here since the
* HandleEvents() routine is called from place where that causes segfaults!!
* Leave the signalling to the ioEventsCount() routine.
*/
int peek;
+ /* first check there is room on the queue */
peek = (eventBufPut + 1) % EVENTQ_SIZE;
if ( peek == eventBufGet) {/* no room, drop the whole thing */
***************
*** 710,714 ****
int prevEvent;
prevEvent = eventBufPut -1;
! if ( prevEvent == -1) prevEvent = EVENTQ_SIZE -1 ; /* wrap around */
if ( eventBuf[prevEvent].type == SQ_MOUSE_MOVE ) {
/* overwrite previous event data */
--- 712,717 ----
int prevEvent;
prevEvent = eventBufPut -1;
! if ( prevEvent == -1)
! prevEvent = EVENTQ_SIZE -1 ; /* wrap around */
if ( eventBuf[prevEvent].type == SQ_MOUSE_MOVE ) {
/* overwrite previous event data */
***************
*** 838,841 ****
void DoNothing(void) {
! /* do nothing at all, but make sure to do it quickly. primarily a breakpoint option */
}
--- 841,844 ----
void DoNothing(void) {
! /* do nothing at all, but make sure to do it quickly. Primarily a breakpoint option */
}
Index: sqRPCExternalPrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCExternalPrims.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqRPCExternalPrims.c 23 Apr 2002 22:08:47 -0000 1.2
--- sqRPCExternalPrims.c 14 Jan 2003 03:41:09 -0000 1.3
***************
*** 1,7 ****
! /*
! sqRPCExternalPrims.c
! Find the function address of a named function by searching the C code segment. All sorts
! of possible failures here - compiling with function names removed is just the most egregious
! */
#include "oslib/os.h"
#include "sq.h"
--- 1,10 ----
! /**************************************************************************/
! /* A Squeak VM for Acorn RiscOS machines by Tim Rowledge */
! /* ti...@su... & http://sumeru.stanford.edu/tim */
! /* Known to work on RiscOS 3.7 for StrongARM RPCs, other machines */
! /* not yet tested. */
! /* sqRPCExternalPrims.c */
! /* hook up to RiscOS external code modules using 'rink' */
! /**************************************************************************/
#include "oslib/os.h"
#include "sq.h"
Index: sqRPCWindows.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCWindows.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqRPCWindows.c 23 Apr 2002 22:08:47 -0000 1.2
--- sqRPCWindows.c 14 Jan 2003 03:41:09 -0000 1.3
***************
*** 24,48 ****
#define longAt(i) (*((int *) (i)))
-
-
- /*** Compilation Options:
- *
- * define LITTLE_ENDIAN to compile code for the little endian bitblt needed by ARMs
- *
- ***/
-
/*** Variables -- Imported from Virtual Machine ***/
! extern unsigned char *memory;
! extern int interruptPending;
! extern int interruptCheckCounter;
! extern int savedWindowSize; /* set from header when image file is loaded */
/*** Variables -- image and path names ***/
#define IMAGE_NAME_SIZE 300
! char imageName[IMAGE_NAME_SIZE + 1]; /* full path to image */
#define VMPATH_SIZE 300
! char vmPath[VMPATH_SIZE + 1]; /* full path to interpreter's directory */
#ifndef MIN
--- 24,40 ----
#define longAt(i) (*((int *) (i)))
/*** Variables -- Imported from Virtual Machine ***/
! extern unsigned char *memory;
+ /* set from header when image file is loaded */
+ extern int getSavedWindowSize(void);
+ extern int setSavedWindowSize(int value);
/*** Variables -- image and path names ***/
#define IMAGE_NAME_SIZE 300
! char imageName[IMAGE_NAME_SIZE + 1]; /* full path to image */
#define VMPATH_SIZE 300
! char vmPath[VMPATH_SIZE + 1]; /* full path to interpreter's directory */
#ifndef MIN
***************
*** 52,100 ****
/*** Variables -- RPC Related ***/
! wimp_w sqWindowHandle = null;
! char sqTaskName[] = "Squeak!";
! wimp_t Task_Handle;
! os_dynamic_area_no SqueakObjectSpaceDA, SqueakDisplayDA;
! char * clipboardBuffer = null;
! int clipboardByteSize = 0;
! extern int windowActive;
! extern int sqHasClipboard;
! int pointerBuffer[16] =
! {0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999};
! os_coord pointerOffset;
! wimp_icon_create sqIconBarIcon;
wimp_MESSAGE_LIST(4) importantWimpMessages;
! int osLevelOver350;
! wimp_version_no actualOSLevel;
! os_error privateErr;
! char VMVersion[] = "2.30 of "__DATE__;
! // temp for coping with filename handling transition period. Set to 1 if new image is run, and use to test for translate for filenames
! int newImageVersion = 0;
/* argument handling stuff -- see c.sqArgument */
! int numOptionsVM;
! char *(vmOptions[MAX_OPTIONS]);
! int numOptionsImage;
! char *(imageOptions[MAX_OPTIONS]);
! int headlessFlag = 0;
! int helpMe = 0;
! int versionMe = 0;
! int objectHeadroom = 4*1024*1024;
vmArg args[] = {
--- 44,89 ----
/*** Variables -- RPC Related ***/
! wimp_w sqWindowHandle = null;
! char sqTaskName[] = "Squeak!";
! wimp_t Task_Handle;
! os_dynamic_area_no SqueakObjectSpaceDA, SqueakDisplayDA;
! char * clipboardBuffer = null;
! int clipboardByteSize = 0;
! extern int windowActive;
! extern int sqHasClipboard;
! int pointerBuffer[16] =
! {0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999,
! 0x99999999};
! os_coord pointerOffset;
! wimp_icon_create sqIconBarIcon;
wimp_MESSAGE_LIST(4) importantWimpMessages;
! wimp_version_no actualOSLevel;
! os_error privateErr;
! char VMVersion[] = "3.2 of "__DATE__;
/* argument handling stuff -- see c.sqArgument */
! int numOptionsVM;
! char *(vmOptions[MAX_OPTIONS]);
! int numOptionsImage;
! char *(imageOptions[MAX_OPTIONS]);
! int headlessFlag = 0;
! int helpMe = 0;
! int versionMe = 0;
! int objectHeadroom = 4*1024*1024;
vmArg args[] = {
***************
*** 107,154 ****
/* screen description. Needs updating when screenmode changes */
! os_coord squeakDisplaySize,
! screenSize,
! scalingFactor,
! scrollOffset,
! visibleArea;
! int BitsPerPixel, squeakDisplayDepth;
/* display bitmap info */
! osspriteop_area * spriteAreaPtr = NULL;
! osspriteop_header * displaySprite = NULL;
osspriteop_trans_tab * pixelTranslationTable = NULL;
! os_PALETTE (256) paletteTable;
! extern int displayBits;
!
!
! /*** Variables -- Event Recording -- see c.sqRPCEvent ***/
! extern int keyBuf[];
! extern int keyBufGet;
! extern int keyBufPut;
/*** Functions ***/
! void SetColorEntry(int index, int red, int green, int blue);
! void getDisplayParameters(void);
! void displayModeChanged(void);
! extern int HandleEvents(int);
! int InitRiscOS(void);
! void MouseButtons( wimp_pointer * wblock);
! void SetUpWindow(void);
! void SetInitialWindowSize(void);
! int SetupPixmap(int w, int h, int d);
! void SetupPixelTranslationTable(void);
! void SetupPaletteTable(void);
! int createSpriteArea( int size);
! int platAllocateMemory( int amount);
! void platReportFatalError( os_error * e);
! void platReportError( os_error * e);
! void setDefaultPointer(void);
! extern void claimClipboard(void);
! extern void fetchClipboard(void);
/*** RPC-related Functions ***/
void platReportError( os_error * e) {
/* Use the RiscOS Error dialogue to notify users of some problem */
! wimp_report_error( e, wimp_ERROR_BOX_CANCEL_ICON | wimp_ERROR_BOX_HIGHLIGHT_CANCEL |wimp_ERROR_BOX_SHORT_TITLE , sqTaskName);
}
--- 96,141 ----
/* screen description. Needs updating when screenmode changes */
! os_coord squeakDisplaySize,
! screenSize,
! scalingFactor,
! scrollOffset,
! visibleArea;
! int screenBitPerPixel, squeakDisplayDepth;
/* display bitmap info */
! osspriteop_area * spriteAreaPtr = NULL;
! osspriteop_header * displaySprite = NULL;
osspriteop_trans_tab * pixelTranslationTable = NULL;
! os_PALETTE (256) paletteTable;
! extern int displayBits;
/*** Functions ***/
! void SetColorEntry(int index, int red, int green, int blue);
! void getDisplayParameters(void);
! void displayModeChanged(void);
! extern int HandleEvents(int);
! int InitRiscOS(void);
! void MouseButtons( wimp_pointer * wblock);
! void SetUpWindow(void);
! void SetInitialWindowSize(void);
! int SetupPixmap(int w, int h, int d);
! void SetupPixelTranslationTable(void);
! void SetupPaletteTable(void);
! int createSpriteArea( int size);
! int platAllocateMemory( int amount);
! void platReportFatalError( os_error * e);
! void platReportError( os_error * e);
! void setDefaultPointer(void);
! extern void claimClipboard(void);
! extern void fetchClipboard(void);
! extern void setFPStatus(int stat);
/*** RPC-related Functions ***/
void platReportError( os_error * e) {
/* Use the RiscOS Error dialogue to notify users of some problem */
! wimp_report_error( e, wimp_ERROR_BOX_CANCEL_ICON |
! wimp_ERROR_BOX_HIGHLIGHT_CANCEL |
! wimp_ERROR_BOX_SHORT_TITLE ,
! sqTaskName);
}
***************
*** 190,196 ****
}
! int platFree(int chunk) {
! free( (void *)chunk);
! }
int InitRiscOS(void) {
--- 177,183 ----
}
! // int platFree(int chunk) {
! // free( (void *)chunk);
! // }
int InitRiscOS(void) {
***************
*** 208,216 ****
return false;
}
- if (actualOSLevel >= wimp_VERSION_RO35) {
- osLevelOver350 = true;
- } else {
- osLevelOver350 = false;
- }
SqueakDisplayDA =SqueakObjectSpaceDA = (os_dynamic_area_no)NULL;
--- 195,198 ----
***************
*** 229,233 ****
setFPStatus(0);
!
return true;
}
--- 211,215 ----
setFPStatus(0);
!
return true;
}
***************
*** 267,271 ****
}
-
wblock.visible.x1 = (wblock.visible.x0)+width;
wblock.visible.y0 = (wblock.visible.y1) - height;
--- 249,252 ----
***************
*** 300,314 ****
int bpp;
bits junk;
! xos_read_mode_variable( (os_mode)os_CURRENT_MODE, (os_mode_var)os_MODEVAR_XWIND_LIMIT, &screenSize.x, &junk);
! xos_read_mode_variable( (os_mode)os_CURRENT_MODE, (os_mode_var)os_MODEVAR_YWIND_LIMIT, &screenSize.y, &junk);
! xos_read_mode_variable( (os_mode)os_CURRENT_MODE, (os_mode_var)os_MODEVAR_LOG2_BPP, &bpp, &junk);
/* this gets us log2 of actual bpp, so convert back */
! BitsPerPixel = 1<<bpp;
! /* now find the OSunit to pixel scaling factors */
! xos_read_mode_variable( (os_mode)os_CURRENT_MODE, (os_mode_var)os_MODEVAR_XEIG_FACTOR, &scalingFactor.x, &junk);
! xos_read_mode_variable( (os_mode)os_CURRENT_MODE, (os_mode_var)os_MODEVAR_YEIG_FACTOR, &scalingFactor.y, &junk);
}
void displayModeChanged(void){
getDisplayParameters();
SetupPixelTranslationTable();
--- 281,303 ----
int bpp;
bits junk;
! /* get the screen size x & y */
! xos_read_mode_variable( (os_mode)os_CURRENT_MODE,
! (os_mode_var)os_MODEVAR_XWIND_LIMIT, &screenSize.x, &junk);
! xos_read_mode_variable( (os_mode)os_CURRENT_MODE,
! (os_mode_var)os_MODEVAR_YWIND_LIMIT, &screenSize.y, &junk);
! /* find the screen depth */
! xos_read_mode_variable( (os_mode)os_CURRENT_MODE,
! (os_mode_var)os_MODEVAR_LOG2_BPP, &bpp, &junk);
/* this gets us log2 of actual bpp, so convert back */
! screenBitPerPixel = 1<<bpp;
! /* find the OSunit to pixel scaling factors */
! xos_read_mode_variable( (os_mode)os_CURRENT_MODE,
! (os_mode_var)os_MODEVAR_XEIG_FACTOR, &scalingFactor.x, &junk);
! xos_read_mode_variable( (os_mode)os_CURRENT_MODE,
! (os_mode_var)os_MODEVAR_YEIG_FACTOR, &scalingFactor.y, &junk);
}
void displayModeChanged(void){
+ /* the display mode has been changed so we need to refetch all the details */
getDisplayParameters();
SetupPixelTranslationTable();
***************
*** 379,386 ****
for( i = 0; i<256; i++) {
xcolourtrans_return_colour_number_for_mode((os_colour)(paletteTable.entries[i]), colourtrans_CURRENT_MODE, (os_palette*)colourtrans_CURRENT_PALETTE, &val);
! if ( BitsPerPixel <= 8) {
pixelTranslationTable->c[i] = (byte)(val & 0xFF);
} else {
! if ( BitsPerPixel == 16) {
pixelTranslationTable->c[i<<1] = (byte)(val & 0xFF);
pixelTranslationTable->c[(i<<1)+1] = (byte)((val>>8) & 0xFF);
--- 368,375 ----
for( i = 0; i<256; i++) {
xcolourtrans_return_colour_number_for_mode((os_colour)(paletteTable.entries[i]), colourtrans_CURRENT_MODE, (os_palette*)colourtrans_CURRENT_PALETTE, &val);
! if ( screenBitPerPixel <= 8) {
pixelTranslationTable->c[i] = (byte)(val & 0xFF);
} else {
! if ( screenBitPerPixel == 16) {
pixelTranslationTable->c[i<<1] = (byte)(val & 0xFF);
pixelTranslationTable->c[(i<<1)+1] = (byte)((val>>8) & 0xFF);
***************
*** 496,520 ****
int sprMode;
! /* derive the sprite mode from the depth requested. Needs to work with new
! spritemode stuff and support 16/32 bits etc */
! if ( osLevelOver350) {
#define SPR_MODE_WORD(arg) ((arg<<osspriteop_TYPE_SHIFT) | (180<<osspriteop_YRES_SHIFT) | (180<<osspriteop_XRES_SHIFT) | 1 )
! switch (d) {
! case 1: sprMode = SPR_MODE_WORD(osspriteop_TYPE1BPP); break;
! case 2: sprMode = SPR_MODE_WORD(osspriteop_TYPE2BPP); break;
! case 4: sprMode = SPR_MODE_WORD(osspriteop_TYPE4BPP); break;
! case 8: sprMode = SPR_MODE_WORD(osspriteop_TYPE8BPP); break;
! case 16: sprMode = SPR_MODE_WORD(osspriteop_TYPE16BPP); break;
! case 32: sprMode = SPR_MODE_WORD(osspriteop_TYPE32BPP); break;
! }
! } else {
! switch (d) {
! case 1: sprMode = 18; break;
! case 2: sprMode = 19; break;
! case 4: sprMode = 20; break;
! case 8: sprMode = 21; break;
! default: sprMode = 21;
! }
}
/* now clear the sprite area and create a sprite in it */
if ( (e = xosspriteop_clear_sprites( osspriteop_USER_AREA, spriteAreaPtr)) != NULL) {
--- 485,501 ----
int sprMode;
! /* derive the sprite mode from the depth requested.
! * Needs to work with new spritemode stuff and support 16/32 bits etc
! */
#define SPR_MODE_WORD(arg) ((arg<<osspriteop_TYPE_SHIFT) | (180<<osspriteop_YRES_SHIFT) | (180<<osspriteop_XRES_SHIFT) | 1 )
! switch (d) {
! case 1: sprMode = SPR_MODE_WORD(osspriteop_TYPE1BPP); break;
! case 2: sprMode = SPR_MODE_WORD(osspriteop_TYPE2BPP); break;
! case 4: sprMode = SPR_MODE_WORD(osspriteop_TYPE4BPP); break;
! case 8: sprMode = SPR_MODE_WORD(osspriteop_TYPE8BPP); break;
! case 16: sprMode = SPR_MODE_WORD(osspriteop_TYPE16BPP); break;
! case 32: sprMode = SPR_MODE_WORD(osspriteop_TYPE32BPP); break;
}
+
/* now clear the sprite area and create a sprite in it */
if ( (e = xosspriteop_clear_sprites( osspriteop_USER_AREA, spriteAreaPtr)) != NULL) {
***************
*** 624,628 ****
getDisplayParameters();
! if (savedWindowSize != 0) {
} else {
/* set h & w to half screen */
--- 605,609 ----
getDisplayParameters();
! if (getSavedWindowSize() != 0) {
} else {
/* set h & w to half screen */
***************
*** 651,655 ****
--- 632,647 ----
int dispBits, sizeHdr, classHdr, basicHdr, hdrSize, byteSize;
int displayObj, w, h, d;
+ extern int splObj(int index);
+ extern int isPointers(int oop);
+ extern int lengthOf(int oop);
+ extern int fetchPointerofObject(int fieldIndex, int oop);
+ extern int extraHeaderBytes(int oopOrChunk);
+ extern int storePointerofObjectwithValue(int fieldIndex, int oop, int valuePointer);
+
/* if there is no stWindow yet, open the main window */
+ if (0) { privateErr.errnum = (bits)0;
+ sprintf(privateErr.errmess, "SetDisplayBitmap, dBI = %x\n", dispBitsIndex);
+ platReportError((os_error *)&privateErr);
+ }
if (sqWindowHandle == null) SetUpWindow();
***************
*** 751,755 ****
int ioGetKeystroke(void) {
extern int nextKeyPressOrNil(void);
-
ioProcessEvents(); /* process all pending events */
return nextKeyPressOrNil();
--- 743,746 ----
***************
*** 814,818 ****
}
-
int ioEventHandle(void) {
/* do all the vm event stuff */
--- 805,808 ----
***************
*** 821,825 ****
}
-
int ioRelinquishProcessorForMicroseconds(int microSeconds) {
/* This operation is platform dependent. On the Mac, it simply calls
--- 811,814 ----
***************
*** 846,851 ****
don't make too big a window later */
getDisplayParameters();
! w = (unsigned) savedWindowSize >> 16 ;
! h = savedWindowSize & 0xFFFF;
/* maximum size is screen size (minus a little) */
maxWidth = (int)screenSize.x ;
--- 835,840 ----
don't make too big a window later */
getDisplayParameters();
! w = (unsigned) getSavedWindowSize() >> 16 ;
! h = getSavedWindowSize() & 0xFFFF;
/* maximum size is screen size (minus a little) */
maxWidth = (int)screenSize.x ;
***************
*** 915,919 ****
int ioSetFullScreen(int fullScreen) {
static os_coord prevOrigin = {0,0};
! int width, height, maxWidth, maxHeight;
int oldWidth, oldHeight;
wimp_window_info wblock;
--- 904,908 ----
int ioSetFullScreen(int fullScreen) {
static os_coord prevOrigin = {0,0};
! int width, height;
int oldWidth, oldHeight;
wimp_window_info wblock;
***************
*** 928,932 ****
if ((oldWidth < width) || (oldHeight < height)) {
/* save old size if it wasn't already full-screen */
! savedWindowSize = (oldWidth << 16) + (oldHeight & 0xFFFF);
squeakDisplaySize.x = width;
squeakDisplaySize.y = height;
--- 917,921 ----
if ((oldWidth < width) || (oldHeight < height)) {
/* save old size if it wasn't already full-screen */
! setSavedWindowSize( (oldWidth << 16) + (oldHeight & 0xFFFF));
squeakDisplaySize.x = width;
squeakDisplaySize.y = height;
***************
*** 942,947 ****
setWindowParameters(&screenTopLeft);
} else {
! squeakDisplaySize.x = (unsigned) savedWindowSize >> 16 ;
! squeakDisplaySize.y = savedWindowSize & 0xFFFF;
setWindowParameters( &prevOrigin);
}
--- 931,936 ----
setWindowParameters(&screenTopLeft);
} else {
! squeakDisplaySize.x = (unsigned) getSavedWindowSize() >> 16 ;
! squeakDisplaySize.y = getSavedWindowSize() & 0xFFFF;
setWindowParameters( &prevOrigin);
}
***************
*** 984,988 ****
int ioScreenDepth(void) {
// what is the bpp setting of the screen right now?
! return BitsPerPixel;
}
--- 973,977 ----
int ioScreenDepth(void) {
// what is the bpp setting of the screen right now?
! return screenBitPerPixel;
}
***************
*** 1031,1035 ****
temp[i] = 0;
if ((e = xosfscontrol_canonicalise_path (temp, fileName, (char const *) NULL, (char const *)NULL, 1000, &junk)) != null) {
! platReportError(e);
}
}
--- 1020,1031 ----
temp[i] = 0;
if ((e = xosfscontrol_canonicalise_path (temp, fileName, (char const *) NULL, (char const *)NULL, 1000, &junk)) != null) {
! // when canonicalizing filenames we can get errors like
! // no disc
! // bad use of ^
! // bad name
! // etc
! // just copy the ugly string to the destination for now
! strcpy(fileName, temp);
! // debugging-> platReportError(e);
}
}
***************
*** 1055,1059 ****
int imageNamePutLength(int sqImageNameIndex, int length) {
- char *sqImageName = (char *) sqImageNameIndex;
int count;
// should update the window struct details for title bar; length, address etc
--- 1051,1054 ----
***************
*** 1073,1077 ****
int vmPathGetLength(int sqVMPathIndex, int length) {
- char *stVMPath = (char *) sqVMPathIndex;
int count;
--- 1068,1071 ----
***************
*** 1188,1196 ****
switch (id) {
case 0: return vmPath; break;
! case 1: if(newImageVersion) return imageName;
! else return "" /* imageName*/;
! break;
! case 1001: newImageVersion = 1; return "RiscOS"; break; // this will only be called by a newer image that expects the filenames to be translated. I hope!
! case 1002: return "RiscOS 3.70"; break;
case 1003: return "ARM"; break;
case 1004: return (char *)interpreterVersion; break;
--- 1182,1188 ----
switch (id) {
case 0: return vmPath; break;
! case 1: return imageName; break;
! case 1001: return "RiscOS"; break;
! case 1002: return "RiscOS 4"; break;
case 1003: return "ARM"; break;
case 1004: return (char *)interpreterVersion; break;
***************
*** 1207,1211 ****
tmp = imageOptions[id-1];
if (*tmp) return tmp;
! }
}
--- 1199,1204 ----
tmp = imageOptions[id-1];
if (*tmp) return tmp;
! }
! return "";
}
***************
*** 1272,1275 ****
--- 1265,1269 ----
int main(int argc, char *argv[]) {
FILE *f;
+ extern void initGlobalStructure(void);
parseArguments( argv, argc, args);
***************
*** 1280,1283 ****
--- 1274,1278 ----
InitRiscOS();
+ initGlobalStructure();
/* quick wimp_poll to allow icon to appear */
***************
*** 1300,1304 ****
readImageFromFileHeapSize(f, objectHeadroom);
fclose(f);
-
/* run Squeak */
--- 1295,1298 ----
|
|
From: Tim R. <row...@us...> - 2003-01-14 03:41:12
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/misc/ToCopy/!Squeak In directory sc8-pr-cvs1:/tmp/cvs-serv31826/platforms/RiscOS/misc/ToCopy/!Squeak Modified Files: !Help,fff Log Message: Bring the above file up to date with latest Acorn port work. a) clean ups b) global variable structure c) global reg var to point to said struct -> 30% speedup !! ***** Bogus filespec: !Help,fff,1.1,1.2 |
|
From: Tim R. <row...@us...> - 2003-01-14 03:41:12
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/plugins/FilePlugin
In directory sc8-pr-cvs1:/tmp/cvs-serv31826/platforms/RiscOS/plugins/FilePlugin
Modified Files:
sqRPCDirectory.c
Log Message:
Bring the above file up to date with latest Acorn port work.
a) clean ups
b) global variable structure
c) global reg var to point to said struct -> 30% speedup !!
Index: sqRPCDirectory.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/plugins/FilePlugin/sqRPCDirectory.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqRPCDirectory.c 23 Apr 2002 22:08:47 -0000 1.2
--- sqRPCDirectory.c 14 Jan 2003 03:41:09 -0000 1.3
***************
*** 33,37 ****
#ifdef DEBUG
#define FPRINTF(s)\
! {\
extern os_error privateErr;\
extern void platReportError( os_error * e);\
--- 33,37 ----
#ifdef DEBUG
#define FPRINTF(s)\
! if(1){\
extern os_error privateErr;\
extern void platReportError( os_error * e);\
***************
*** 65,70 ****
void dirReportError( os_error * e) {
/* Use the RiscOS Error dialogue to notify users of some problem */
! // Maybe sometime later...
! //wimp_report_error( e, wimp_ERROR_BOX_CANCEL_ICON | wimp_ERROR_BOX_HIGHLIGHT_CANCEL |wimp_ERROR_BOX_SHORT_TITLE , sqTaskName);
}
--- 65,70 ----
void dirReportError( os_error * e) {
/* Use the RiscOS Error dialogue to notify users of some problem */
! extern void platReportError( os_error * e);
! platReportError(e);
}
***************
*** 90,94 ****
/* For now replicate the normal sqFileDeleteNameSize, since that appears to be adequate, except for returning true if all is well - essential ! */
char cFileName[MAXDIRNAMELENGTH];
- int err;
if (pathStringLength >= MAXDIRNAMELENGTH) {
--- 90,93 ----
***************
*** 99,103 ****
sqFilenameFromString(cFileName, (int)pathString, pathStringLength);
if (remove(cFileName) != 0) {
! FPRINTF((privateErr.errmess, "dir delete error %d\n", err));
return interpreterProxy->success(false);
}
--- 98,102 ----
sqFilenameFromString(cFileName, (int)pathString, pathStringLength);
if (remove(cFileName) != 0) {
! FPRINTF((privateErr.errmess, "dir delete error\n"));
return interpreterProxy->success(false);
}
***************
*** 113,122 ****
char *name, int *nameLength, int *creationDate, int *modificationDate,
int *isDirectory, int *sizeIfFile) {
! /* Lookup the index-th entry of the directory with the given path, starting
! at the root of the file system. Set the name, name length, creation date,
! creation time, directory flag, and file size (if the entry is a file).
! Return: ENTRY_FOUND if a entry is found at the given index
! NO_MORE_ENTRIES if the directory has fewer than index entries
! BAD_PATH if the given path has bad syntax or does not reach a directory
*/
char dirname[MAXDIRNAMELENGTH];
--- 112,121 ----
char *name, int *nameLength, int *creationDate, int *modificationDate,
int *isDirectory, int *sizeIfFile) {
! /* Lookup the index-th entry of the directory with the given path, starting
! at the root of the file system. Set the name, name length, creation date,
! creation time, directory flag, and file size (if the entry is a file).
! Return: ENTRY_FOUND if a entry is found at the given index
! NO_MORE_ENTRIES if the directory has fewer than index entries
! BAD_PATH if the given path has bad syntax or does not reach a directory
*/
char dirname[MAXDIRNAMELENGTH];
***************
*** 134,143 ****
if( pathStringLength > MAXDIRNAMELENGTH) return BAD_PATH;
context = index-1;
if ( pathStringLength == 0) {
- #if 1
#define F2HJump 4
int junk, run_total, adfs_flop=0, adfs_hard=0, scsifs_flop=0, scsifs_hard=0, ramfs_flop=0, ramfs_hard=0, cdfs_hard=0;
char discid[20];
/* no path, so try to enumerate all the attached discs */
run_total = 0;
--- 133,143 ----
if( pathStringLength > MAXDIRNAMELENGTH) return BAD_PATH;
context = index-1;
+ FPRINTF((privateErr.errmess, "dir_Lookup:raw pathname %s\n", pathString));
if ( pathStringLength == 0) {
#define F2HJump 4
int junk, run_total, adfs_flop=0, adfs_hard=0, scsifs_flop=0, scsifs_hard=0, ramfs_flop=0, ramfs_hard=0, cdfs_hard=0;
char discid[20];
+ FPRINTF((privateErr.errmess, "dir_Lookup:null pathname, scanning disc %d\n", context));
/* no path, so try to enumerate all the attached discs */
run_total = 0;
***************
*** 194,202 ****
decode_disc_id:
if ((e = xosfscontrol_canonicalise_path (discid, dirname, (char const *) NULL, (char const *)NULL, MAXDIRNAMELENGTH, &junk)) != null) {
! // for any error, it seems best to copy the instring to the outstring
strcpy (dirname, discid);
! if ( (e->errnum & 0xFF) >= 0xD3 || (e->errnum & 0xFF) <= 0xD5 ) {
! // disc not present type error shouldn't cause too many upsets
! } else dirReportError(e);
}
--- 194,203 ----
decode_disc_id:
if ((e = xosfscontrol_canonicalise_path (discid, dirname, (char const *) NULL, (char const *)NULL, MAXDIRNAMELENGTH, &junk)) != null) {
! // for any error, it seems best to copy the instring
! // to the outstring.
! // we shouldn't get too many types of error here since
! // the names have come from the OS anyway
strcpy (dirname, discid);
! // debugging -> dirReportError(e);
}
***************
*** 208,232 ****
*sizeIfFile = 0;
return ENTRY_FOUND;
- #else
- return BAD_PATH;
- #endif
}
! //return NO_MORE_ENTRIES;
! /* looks like this should be strncpy( dirname, pathString, pathStringLength); */
sqFilenameFromString(dirname, (int)pathString, pathStringLength);
! /* lookup indexth entry in the directory */
count = 1;
i = /* osgbpb_SIZEOF_SYSTEM_INFO(MAXDIRNAMELENGTH + 4)*/ 28 +MAXDIRNAMELENGTH + 4;
e = xosgbpb_dir_entries_system_info(dirname,(osgbpb_system_info_list *)&buffer, count, context, i, (char const *)0, &count, &context);
- if ( count != 1 ) return NO_MORE_ENTRIES;
if ( e != NULL ) {
i = e->errnum & 0xFF;
! if ( i >= 0xD3 || i<= 0xD5 ) return NO_MORE_ENTRIES;
! return BAD_PATH;
}
!
!
*nameLength = strlen(buffer.name);
--- 209,229 ----
*sizeIfFile = 0;
return ENTRY_FOUND;
}
!
sqFilenameFromString(dirname, (int)pathString, pathStringLength);
+ FPRINTF((privateErr.errmess, "dir_Lookup:pathName = %s\n", dirname));
! /* lookup indexth entry in the directory */
count = 1;
i = /* osgbpb_SIZEOF_SYSTEM_INFO(MAXDIRNAMELENGTH + 4)*/ 28 +MAXDIRNAMELENGTH + 4;
e = xosgbpb_dir_entries_system_info(dirname,(osgbpb_system_info_list *)&buffer, count, context, i, (char const *)0, &count, &context);
if ( e != NULL ) {
+ // debugging-> dirReportError(e);
i = e->errnum & 0xFF;
! if ( i >= 0xD3 && i<= 0xD5 ) return NO_MORE_ENTRIES;
! return BAD_PATH;
}
! if ( count != 1 ) return NO_MORE_ENTRIES;
*nameLength = strlen(buffer.name);
|
|
From: Tim R. <row...@us...> - 2003-01-14 03:41:12
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/misc/ToCopy In directory sc8-pr-cvs1:/tmp/cvs-serv31826/platforms/RiscOS/misc/ToCopy Modified Files: MakePlugins,fe1 Log Message: Bring the above file up to date with latest Acorn port work. a) clean ups b) global variable structure c) global reg var to point to said struct -> 30% speedup !! ***** Bogus filespec: MakePlugins,fe1,1.1,1.2 |
|
From: Tim R. <row...@us...> - 2003-01-14 01:03:35
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/plugins/SoundPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv17688 Added Files: sqRPCSound.c Log Message: Initial addition of thenull sound plugin code for Acorn. Fill it out oneday --- NEW FILE: sqRPCSound.c --- /**************************************************************************/ /* A Squeak VM for Acorn RiscOS machines by Tim Rowledge */ /* ti...@su... & http://sumeru.stanford.edu/tim */ /* Known to work on RiscOS 3.7 for StrongARM RPCs, other machines */ /* not yet tested. */ /* sqRPCSound.c */ /* sound output */ /**************************************************************************/ #include "sq.h" #include "SoundPlugin.h" extern struct VirtualMachine * interpreterProxy; /* module initialization/shutdown */ int soundInit(void) { // anything to do ? } int soundShutdown(void) { // anything to do? } /****************/ /* sound output */ /****************/ int snd_AvailableSpace(void) { /* Returns the number of bytes of available sound output buffer space. This should be (frames*4) if the device is in stereo mode, or (frames*2) otherwise */ } int snd_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr, int samplesOfLeadTime) { /* Insert a buffer's worth of sound samples into the currently playing buffer. Used to make a sound start playing as quickly as possible. The new sound is mixed with the previously buffered sampled. */ /* Details: Unlike primitiveSoundPlaySamples, this primitive always starts with the first sample the given sample buffer. Its third argument specifies the number of samples past the estimated sound output buffer position the inserted sound should start. If successful, it returns the number of samples inserted. */ } int snd_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex) { /* Output a buffer's worth of sound samples. */ } int snd_PlaySilence(void) { /* Output a buffer's worth of silence. Returns the number of sample frames played. */ } int snd_Start(int frameCount, int samplesPerSec, int stereo, int semaIndex) { /* Start the double-buffered sound output with the given buffer size, sample rate, and stereo flag. */ } int snd_Stop(void) { /* Stop double-buffered sound output. */ } /***************/ /* sound input */ /***************/ int snd_SetRecordLevel(int level) { interpreterProxy->primitiveFail(); return null; } int snd_StartRecording(int desiredSamplesPerSec, int stereo, int semaIndex) { interpreterProxy->primitiveFail(); return null; } int snd_StopRecording(void) { interpreterProxy->primitiveFail(); return null; } double snd_GetRecordingSampleRate(void) { interpreterProxy->primitiveFail(); return (double)1.0; } int snd_RecordSamplesIntoAtLength(int buf, int startSliceIndex, int bufferSizeInBytes) { interpreterProxy->primitiveFail(); return null; } void snd_Volume(double *left, double *right) { // used to GET the volume settings } void snd_SetVolume(double left, double right) { // used to SET the volume settings interpreterProxy->primitiveFail(); } |
|
From: Tim R. <row...@us...> - 2003-01-14 01:01:43
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/plugins/SoundPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv17399/SoundPlugin Log Message: Directory /cvsroot/squeak/squeak/platforms/RiscOS/plugins/SoundPlugin added to the repository |
|
From: John M M. <jo...@us...> - 2002-12-21 06:46:39
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/Documentation In directory sc8-pr-cvs1:/tmp/cvs-serv32074/squeak/platforms/Mac OS/vm/Documentation Modified Files: readme Log Message: 3.4.0b2 Misc changes per experiences by others in building the VM Index: readme =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/Documentation/readme,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** readme 14 Nov 2002 19:50:07 -0000 1.4 --- readme 21 Dec 2002 06:46:36 -0000 1.5 *************** *** 63,67 **** A. Install change sets from the specialChangeSets Folder. These are required to build a VM that has globals as a structure which improves ! performance by 10%. MoreInterpAccessors-JMM.2.cs --- 63,69 ---- A. Install change sets from the specialChangeSets Folder. These are required to build a VM that has globals as a structure which improves ! performance by 10% or more. There has been some discussion that the line endings ! might be wrong for the following change sets that might depend on what CVS thinks, ! so do a "remove linefeeds" first. MoreInterpAccessors-JMM.2.cs *************** *** 134,138 **** (The only error you should get is warning: passing arg 1 of `sqImageFileStartLocation' makes integer from pointer without a cast) ! Run a tinyBenchmark benchmark against your VM, versus the production VM to confirm yours is simular in performance Step Seven: Download and print your Squeak VM Developer's Certificate --- 136,143 ---- (The only error you should get is warning: passing arg 1 of `sqImageFileStartLocation' makes integer from pointer without a cast) ! Run a tinyBenchmark benchmark against your VM, versus the production VM to confirm yours is simular in performance. ! John suggests: "You might need to switch back to the Squeak VM Debug and back to ensure the setting actually are taken. ! There seems to be a bug where although you've got the Opt build picked it really builds a non-optimized debug version." ! You will know this because performance will be off by 30-40%. Step Seven: Download and print your Squeak VM Developer's Certificate |
|
From: John M M. <jo...@us...> - 2002-12-21 06:38:54
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/Developer In directory sc8-pr-cvs1:/tmp/cvs-serv30807/squeak/platforms/Mac OS/vm/Developer Modified Files: SqueakVMForCarbon.pbproj.sit Log Message: 3.4.0b2 Ensure pathnames are all relative, versus one that was absolute Index: SqueakVMForCarbon.pbproj.sit =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/Developer/SqueakVMForCarbon.pbproj.sit,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvs6Nb1Zj and /tmp/cvsSCHDGt differ |