U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ Developers corner » Current porting state?
Current porting state? [message #4930] Fri, 25 August 2006 17:24 Go to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
Mirek's message #4924 "PocketPC conquered...."

I am happy to announce that the hard part of PocketPC support is finished - I was able
to run most of "examples" on my PDA (interestingly, without any changes to the examples code,
just compile&run).

Now of course, a lot of issues remains to be resolved, starting with right click emulation etc....
but the core work is already done.

Mirek

P.S.: Somebody to donate OSX capable PowerPC Mac?


gives cause to update my web site. So:

What is the current state of the Linux, UNIX, MacOS, ... portings?

Werner
Re: Current porting state? [message #4942 is a reply to message #4930] Sun, 27 August 2006 19:13 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
- Windows is mature

- Most of Linux problems of past (e.g. printing or PdfDraw) are now resolved. (still missing is OpenGL support). FreeBSD is I believe the same thing.

- PocketPC is under development, I hope that next big release will be able to announce support

- MacOS is still in plans. With the current PocketPC experience, I dare to say that it will need no more than two months, however I do not think there will be MacOS in next release (unfortunately).

Mirek
Re: Current porting state? [message #4953 is a reply to message #4942] Sun, 27 August 2006 20:36 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
luzr wrote on Sun, 27 August 2006 19:13

- Windows is mature

- Most of Linux problems of past (e.g. printing or PdfDraw) are now resolved. (still missing is OpenGL support). FreeBSD is I believe the same thing.

- PocketPC is under development, I hope that next big release will be able to announce support

- MacOS is still in plans. With the current PocketPC experience, I dare to say that it will need no more than two months, however I do not think there will be MacOS in next release (unfortunately).

Mirek


Thanks a lot. I'll incorporate this into the next update of my web site.

Werner

P. S.:

Actually I expected the Linux, FreeBSD, etc. maintainers to answer. Are you doing all the stuff yourself?

Werner

Re: Current porting state? [message #4955 is a reply to message #4953] Sun, 27 August 2006 21:22 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Werner wrote on Sun, 27 August 2006 20:36

Actually I expected the Linux, FreeBSD, etc. maintainers to answer. Are you doing all the stuff yourself?


Hi Werner,

as far as FreeBSD is concerned, I can assure you that Ultimate++ is working. I think it should be similar to all BSDs. But I think one has to compile Ultimate++ on its own for example on NetBSD and OpenBSD for now. Maybe I prepare a pkgsrc port in the near future, which supports quite a lot BSDs since pkgsrc is available for all these systems.
If you are curious, you can have a look at:
http://www.netbsd.org/Documentation/software/packages.html

Matthias
Re: Current porting state? [message #4961 is a reply to message #4953] Sun, 27 August 2006 22:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Quote:


Actually I expected the Linux, FreeBSD, etc. maintainers to answer. Are you doing all the stuff yourself?



Let us say I am responsible for majority of changes in uppsrc... including all platform specific code. This is not quite fortunate situation (nobody likes to depend on one-mans show), but it is as it is now...

So far, I have created all linux releases too (but not freebsd), which shows... Smile (by avoiding all rules... Smile I hope this is gona change soon.

Mirek

[Updated on: Sun, 27 August 2006 22:54]

Report message to a moderator

Re: Current porting state? [message #4973 is a reply to message #4955] Mon, 28 August 2006 21:38 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
masu wrote on Sun, 27 August 2006 21:22

Werner wrote on Sun, 27 August 2006 20:36

Actually I expected the Linux, FreeBSD, etc. maintainers to answer. Are you doing all the stuff yourself?


Hi Werner,

as far as FreeBSD is concerned, I can assure you that Ultimate++ is working. I think it should be similar to all BSDs. But I think one has to compile Ultimate++ on its own for example on NetBSD and OpenBSD for now. Maybe I prepare a pkgsrc port in the near future, which supports quite a lot BSDs since pkgsrc is available for all these systems.
If you are curious, you can have a look at:
http://www.netbsd.org/Documentation/software/packages.html

Matthias


Thanks. I updated my web site accordingly. (Maybe in a slightly optimistic tone as far as NetBSD and OpenBSD are concerned Cool ...)

Werner
Re: Current porting state? [message #5241 is a reply to message #4973] Mon, 11 September 2006 10:35 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

I run Ultimate++ on NetBSD and it was no more than 7-8 changes needed to compile it. However, it will still only run on Little Endian. We are very patiently waiting for BE, and OsX support.

Many users waiting on OsX infact.

I should try the new Japanese fixes though, be curious if it runs better in Japanese.

Lund
Re: Current porting state? [message #5242 is a reply to message #5241] Mon, 11 September 2006 10:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Quote:


I run Ultimate++ on NetBSD and it was no more than 7-8 changes needed to compile it.



Well, I might have missed something, but if they are in the C++ code, could you list them please?

Quote:


However, it will still only run on Little Endian. We are very patiently waiting for BE, and OsX support.



At least, it now runs on ARM Smile

BE support should be easy (right now there is just single place which needs fixing). Do you have any hardware to test with?

Mirek
Re: Current porting state? [message #5251 is a reply to message #5242] Mon, 11 September 2006 14:05 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member
luzr wrote on Mon, 11 September 2006 17:41



Well, I might have missed something, but if they are in the C++ code, could you list them please?



Nah, usual porting things when it's Linux coders Smile .. lets see if I remember.
loff_t=off_t
lseek64=lseek
ftruncate64=ftruncate
strerror_r=strerror

Hmm actually, i think the latter needed some code changes due to the argument count differences.

Considered autoconf? I know it doesn't fit in the picture when you have the IDE running, but to build the ide maybe?

Oh, as a corollary, I need a way to run ./configure in my Project from the ide.. possible?


Quote:


BE support should be easy (right now there is just single place which needs fixing). Do you have any hardware to test with?



Lots and lots. If you want to fiddle with the last place, we can start on some debugging.

Lund

Re: Current porting state? [message #5253 is a reply to message #5251] Mon, 11 September 2006 14:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Quote:


Considered autoconf? I know it doesn't fit in the picture when you have the IDE running, but to build the ide maybe?



No problem, but do not expect me to do that. I still hope for posix maintainer to do that for us...

Quote:


Oh, as a corollary, I need a way to run ./configure in my Project from the ide.. possible?



The only possible way would be using custom build steps AFAIK.

Quote:


Lots and lots. If you want to fiddle with the last place, we can start on some debugging.



Actually, the last place I am aware of deals with swapping order in serialization, it would be problem only if you would want to share serialization between BE/LE machines (which is hardly the case now).

Means, if you can, what about to simply try the current version?

Mirek
Re: Current porting state? [message #5262 is a reply to message #5253] Tue, 12 September 2006 03:13 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member
luzr wrote on Mon, 11 September 2006 21:16


No problem, but do not expect me to do that. I still hope for posix maintainer to do that for us...



Well, let me know. I just forced myself to learn autoconf, and converted 4 of my projects to use it. It was surprisingly easy, but it helped to find an excellent PDF walk-through.


Quote:


The only possible way would be using custom build steps AFAIK.


I'll explore that, as long as it could be a possible step.

Quote:


Actually, the last place I am aware of deals with swapping order in serialization, it would be problem only if you would want to share serialization between BE/LE machines (which is hardly the case now).

Means, if you can, what about to simply try the current version?

Mirek


Ok, I have started that.



Re: Current porting state? [message #5265 is a reply to message #5262] Tue, 12 September 2006 06:01 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

The Makefile seems quite out of date, if it is automatically generated by something, could someone do that for me Smile

Perhaps something else is up. But files like PixelArray.h don't exist, but are mentioned in Makefile.


Re: Current porting state? [message #5266 is a reply to message #5265] Tue, 12 September 2006 07:49 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Sorry for the noise, but it appears I can export the Makefile with my old 604 ide just fine. Nice it seems backward compatible.
Re: Current porting state? [message #5272 is a reply to message #5266] Tue, 12 September 2006 11:03 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Right, I created a new flagNETBSD ok, changed everywhere so it compiles without issue. The IDE does seem to have some trouble:

http://netbsd.interq.or.jp/~lundman/upp-609dev1.jpg

But testing all Examples that build, they all work fine.



Did the same for OSX, which compiles, but it does not start. Initially it is:

0xffff86f8 in ___bzero () at
/System/Library/Frameworks/System.framework/PrivateHeaders/p pc/cpu_capabilities.h:187
101::memset(&obj, 0, sizeof(obj));

Which does not really make sense. A bit of googling seems to suggest there is a namespace issue "history", with libedit (readline).

However, I commented that line out, in the interest to see how much further I could get:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x3a262ff8
0x0026e500 in UnpackRLE (t=0x3a262ff8, s=0x421995 "ËËËÃÔ×\205o^rQ:\204a4\030\003vT=\215udÙåç\001òòò", len=<incomplete type>) at /Users/lundman/uppsrc/uppsrc/Draw/ImageBlit.cpp:51
51 *t++ = h;

Also seems odd, perhaps still related to the first issue, so I need to track that down first.



Re: Current porting state? [message #5273 is a reply to message #5272] Tue, 12 September 2006 11:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
I am a bit confused. That NetBSD test, is it on non-X86 (big endian) architecture?

UnpackRLE - looks like unaligned access or access to invalid memory. Well, unaligned access is unlikely, 0x3a262ff8 is not unaligned. Perhaps there is a problem with heap, that is very likely, please try to compile with USEMALLOC (that could resolve the first problem as well).

Mirek
Re: Current porting state? [message #5281 is a reply to message #5273] Tue, 12 September 2006 12:06 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Correct, two tests.

First one to bring my working Intel-NetBSD-604 to latest. However, it displays that corruption in the IDE. However, programs compiled with ide seems to work. (Maybe I should recompile the ide in the ide hmm)

I will try with USEMALLOC on the ppc OsX.

Re: Current porting state? [message #5282 is a reply to message #5281] Tue, 12 September 2006 12:56 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Hmm is it enough to add -DflagUSEMALLOC in Makefile, and hose the out/ dir to recompile? Because if it is, it is 100% the same problem Smile

Re: Current porting state? [message #5283 is a reply to message #5282] Tue, 12 September 2006 13:00 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Yes, that should be enough.

Well, in that case, I thing you should start with something more simple, some Core application without GUI, like

CONSOLE_APP_MAIN { LOG("Hello world!"); }

to get Core working and add GUI later...

Mirek
Re: Current porting state? [message #5298 is a reply to message #5283] Wed, 13 September 2006 03:27 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

I do not know if I am doing it the correct way, but I exported the Makefile for HelloWorld and set to.

The flagUSEMALLOC, when enabled, created some undefined references MemoryDumpLeaks() in Core.h, which was easy to fix, but I took out USEMALLOC anyway.

Compiling HelloWorld failed due to:

StaticCriticalSection::Initialize

So I wrapped the prototype in #ifdef _MULTITHREADED in mt.h


Then we were linked. Still cores in identical memset(), commented out.

Cores in UnpackRLE, so I made it just return s;

Cores in memcpy:82 Util.h

Cores in memset:273 Image.cpp

At this point I get the Window comes up, with working menu bar.

Picking About will core again, this time in:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x36340834
0x000e14fc in BltAAMapRGBA4 (dest=0x6888c00, s=0x36340834, map=0x6377080) at /Users/lundman/uppsrc/uppsrc/Draw/ImageScale.cpp:278
278 dest[0] = (s[0].b + s[step].b + s[2 * step].b + s[3 * step].b) << 6;
(gdb) p s
$1 = (const RGBA *) 0x36340834
(gdb) p *s
Cannot access memory at address 0x36340834

Why is it that your RGBA's, which seem to be defined as "RGBA *" or, pointers to an RGBA, end up with the RGBA value "0x36340834" (which looks like a clean RGBA value to me) instead of a pointer to said value.

Almost like:
RGBA *rgba;
*rgba = value;
.. is interpreted as "*(rgba)=value;" instead of the correct
"(*rgba)=value;".


Re: Current porting state? [message #5299 is a reply to message #5298] Wed, 13 September 2006 08:10 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Quote:


I do not know if I am doing it the correct way, but I exported the Makefile for HelloWorld and set to.



HelloWorld is still too big. First thing that you should make working when porting is logging (LOG and DUMP).

Quote:


The flagUSEMALLOC, when enabled, created some undefined references MemoryDumpLeaks() in Core.h, which was easy to fix, but I took out USEMALLOC anyway.



Rather stay with malloc. If there is something highly platform sensitive, it is heap allocator implementation.

Quote:


Compiling HelloWorld failed due to:

StaticCriticalSection::Initialize



Error?

Quote:


(gdb) p s
$1 = (const RGBA *) 0x36340834
(gdb) p *s
Cannot access memory at address 0x36340834

Why is it that your RGBA's, which seem to be defined as "RGBA *" or, pointers to an RGBA, end up with the RGBA value "0x36340834" (which looks like a clean RGBA value to me) instead of a pointer to said value.

Almost like:
RGBA *rgba;
*rgba = value;
.. is interpreted as "*(rgba)=value;" instead of the correct
"(*rgba)=value;".



Actually, I believe that debugger and compiler are correct. Just somehow s contains invalid address.

Re: Current porting state? [message #5300 is a reply to message #5299] Wed, 13 September 2006 08:51 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member
luzr wrote on Wed, 13 September 2006 15:10



HelloWorld is still too big. First thing that you should make working when porting is logging (LOG and DUMP).



Alas, I have no idea how I'm supposed to compile/link a
CONSOLE_APP_MAIN { LOG("Hello world!"); }
with the ide, nor have I seen a guide to that effect.. Some hints here would help me plenty.

Quote:


Rather stay with malloc. If there is something highly platform sensitive, it is heap allocator implementation.



Alright, it is back on, same cores.

Quote:


Compiling HelloWorld failed due to:

StaticCriticalSection::Initialize

Error?



That Initialize was undefined. Seems mt.cpp has it in #ifdef _MULTITHREADED but the mt.h does not. This compiler insist it to be defined if it is prototyped in the class.

Similarly, Get method.

Quote:


Actually, I believe that debugger and compiler are correct. Just somehow s contains invalid address.




Understood.

Re: Current porting state? [message #5302 is a reply to message #5300] Wed, 13 September 2006 09:21 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Might not be right, but I gutted hello.cpp to be able to proceed:

# ./HelloWorld
#

# cat ~/.HelloWorld.log
* HelloWorld 13.09.2006 16:19:47, user: lundman

%02d:%02d:%02d log is persistentUnable tHello world!
#
Re: Current porting state? [message #5303 is a reply to message #5302] Wed, 13 September 2006 10:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
lundman wrote on Wed, 13 September 2006 03:21


Might not be right, but I gutted hello.cpp to be able to proceed:

# ./HelloWorld
#

# cat ~/.HelloWorld.log
* HelloWorld 13.09.2006 16:19:47, user: lundman

%02d:%02d:%02d log is persistentUnable tHello world!
#



Interesting. Now what about

CONSOLE_APP_MAIN {
   for(int i = 0; i < 100; i++)
      LOG(i);
}
CONSOLE_APP_MAIN {
   for(int i = 0; i < 100; i++)
      LOG(GetSysDate() + i);
}
CONSOLE_APP_MAIN {
   Vector<Date> m;
   for(int i = 0; i < 100; i++)
      m.Add(GetSysDate() + i);
   DUMPC(m);
}
CONSOLE_APP_MAIN {
   FileOut out(ConfigFile("test"));
   for(int i = 0; i < 100; i++)
      out << GetSysDate() + i);
   DUMP(LoadFile(ConfigFile("test"));
}

Re: Current porting state? [message #5304 is a reply to message #5303] Wed, 13 September 2006 11:15 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member
luzr wrote on Wed, 13 September 2006 17:01



CONSOLE_APP_MAIN {
   for(int i = 0; i < 100; i++)
      LOG(i);
}



* HelloWorld 13.09.2006 17:43:34, user: lundman

%02d:%02d:%02d log is persistentUnable t0
1
2
[snip]
98
99



Quote:


CONSOLE_APP_MAIN {
   for(int i = 0; i < 100; i++)
      LOG(GetSysDate() + i);
}



* HelloWorld 13.09.2006 17:47:48, user: lundman

%02d:%02d:%02d log is persistentUnable t09/13/2006
09/14/2006
09/15/2006
[snip]
12/20/2006
12/21/2006


Quote:


CONSOLE_APP_MAIN {
   Vector<Date> m;
   for(int i = 0; i < 100; i++)
      m.Add(GetSysDate() + i);
   DUMPC(m);
}



* HelloWorld 13.09.2006 17:55:17, user: lundman

%02d:%02d:%02d log is persistentUnable tm:
        [0] = 09/13/2006
        [1] = 09/14/2006
[snip]
        [98] = 12/20/2006
        [99] = 12/21/2006


Quote:


CONSOLE_APP_MAIN {
   FileOut out(ConfigFile("test"));
   for(int i = 0; i < 100; i++)
      out << GetSysDate() + i;
   DUMP(LoadFile(ConfigFile("test")));
}



(Moved brackets to fix)
* HelloWorld 13.09.2006 18:11:45, user: lundman

%02d:%02d:%02d log is persistentUnable tLoadFile(ConfigFile("test")) = 

cat ~/.HelloWorld/test
09/13/200609/14/200609/15/200609/16/200609/17/200609/18/200609/19/200609/20/200609/21/200609/22/200609/23/200609/24/200609/25/200609/26/200609/27/200609/28/200609/29/200609/30/200610/01/200610/02/200610/03/200610/04/200610/05/200610/06/200610/07/200610/08/200610/09/200610/10/200610/11/200610/12/200610/13/200610/14/200610/15/200610/16/200610/17/200610/18/200610/19/200610/20/200610/21/200610/22/200610/23/200610/24/200610/25/200610/26/200610/27/200610/28/200610/29/200610/30/200610/31/200611/01/200611/02/200611/03/200611/04/200611/05/200611/06/200611/07/200611/08/200611/09/200611/10/200611/11/200611/12/200611/13/200611/14/200611/15/200611/16/200611/17/200611/18/200611/19/200611/20/200611/21/200611/22/200611/23/200611/24/200611/25/200611/26/200611/27/200611/28/200611/29/200611/30/200612/01/200612/02/200612/03/200612/04/200612/05/200612/06/200612/07/200612/08/200612/09/200612/10/200612/11/200612/12/200612/13/200612/14/200612/15/200612/16/200612/17/200612/18/200612/19/200612/20/200612/21/2006



Re: Current porting state? [message #5305 is a reply to message #5304] Wed, 13 September 2006 11:23 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Well, that

"%02d:%02d:%02d log is persistentUnable t"

is strange, but I think I have seen something similiar in Linux, so this bug (which I will resolve ASAP) is most likley harmless.

Rest seem to work OK.

BTW, what is the status of "tweaks"? USEMALLOC, commenting lines in platform headers etc?
Re: Current porting state? [message #5306 is a reply to message #5272] Wed, 13 September 2006 11:39 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Quote:


0xffff86f8 in ___bzero () at
/System/Library/Frameworks/System.framework/PrivateHeaders/p pc/cpu_capabilities.h:187
101::memset(&obj, 0, sizeof(obj));



What about backtrace? (stack)

Quote:


Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x3a262ff8
0x0026e500 in UnpackRLE (t=0x3a262ff8, s=0x421995 "ËËËÃÔ×\205o^rQ:\204a4\030\003vT=\215udÙåç\001òòò", len=<incomplete type>) at /Users/lundman/uppsrc/uppsrc/Draw/ImageBlit.cpp:51
51 *t++ = h;

Also seems odd, perhaps still related to the first issue, so I need to track that down first.



Backtrace?

Could you please check

CONSOLE_APP_MAIN {
DUMP((void *)new byte[100]);
}

to find out where OSX tends to place allocations? (0x3a262ff8 seems a little high for me...).

Mirek
Re: Current porting state? [message #5307 is a reply to message #5305] Wed, 13 September 2006 11:42 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Tweaks are, USEMALLOC on, and about 3 memset, 1 memcpy are commented out.

memset/memcpy in Core/Util.h and memset in Draw/Image.cpp

I shall try with them back in now....


and it's identical.

* HelloWorld 13.09.2006 18:39:01, user: lundman

%02d:%02d:%02d log is persistentUnable tLoadFile(ConfigFile("test")) = 


9/13/200609/14/200609/15/200609/16/200609/17/200609/18/200609/19/200609/20/200609/21/200609/22/200609/23/200609/24/200609/25/200609/26/200609/27/200609/28/200609/29/200609/30/200610/01/200610/02/200610/03/200610/04/200610/05/200610/06/200610/07/200610/08/200610/09/200610/10/200610/11/200610/12/200610/13/200610/14/200610/15/200610/16/200610/17/200610/18/200610/19/200610/20/200610/21/200610/22/200610/23/200610/24/200610/25/200610/26/200610/27/200610/28/200610/29/200610/30/200610/31/200611/01/200611/02/200611/03/200611/04/200611/05/200611/06/200611/07/200611/08/200611/09/200611/10/200611/11/200611/12/200611/13/200611/14/200611/15/200611/16/200611/17/200611/18/200611/19/200611/20/200611/21/200611/22/200611/23/200611/24/200611/25/200611/26/200611/27/200611/28/200611/29/200611/30/200612/01/200612/02/200612/03/200612/04/200612/05/200612/06/200612/07/200612/08/200612/09/200612/10/200612/11/200612/12/200612/13/200612/14/200612/15/200612/16/200612/17/200612/18/200612/19/200612/20/200612/21/2006



Re: Current porting state? [message #5308 is a reply to message #5306] Wed, 13 September 2006 11:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Image::Image(const Init& init)
{
	ASSERT(init.info[0] >= 1);
	Size sz;
	sz.cx = PeekIL(init.info + 1);
	sz.cy = PeekIL(init.info + 5);
	ImageBuffer b(sz);
	int i = 0;
	while(i < init.scan_count) {
		UnpackRLE(b[i], (const byte *)init.scans[i], sz.cx);
		i++;
	}
	while(i < sz.cy)
		memset(b[i++], 0, sizeof(RGBA) * sz.cx);
	b.SetHotSpot(Point(PeekIL(init.info + 9), PeekIL(init.info + 13)));
	Set(b);
}


Maybe PeekIL is the cause as it is affected by endianess.

It is defined in Core/util.h, util.cpp.

Maybe it is worth checking what is the status of

CPU_X86
CPU_LE
CPU_UNALIGNED

macros....

[Updated on: Wed, 13 September 2006 11:46]

Report message to a moderator

Re: Current porting state? [message #5309 is a reply to message #5307] Wed, 13 September 2006 11:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
lundman wrote on Wed, 13 September 2006 05:42


Tweaks are, USEMALLOC on, and about 3 memset, 1 memcpy are commented out.

memset/memcpy in Core/Util.h and memset in Draw/Image.cpp

I shall try with them back in now....


and it's identical.



If I understand you well, most of Core works without tweaks? That is a good prerequisite to further testing Wink

Mirek
Re: Current porting state? [message #5310 is a reply to message #5308] Wed, 13 September 2006 11:53 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

This part of the system is new to me, but I define:

-DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHARED -DflagDEBUG_FULL -DflagBLITZ -DflagOSX -DflagUSEMALLOC

Core.h has hmm oh I see. You define default to be X86. I assumed the default would not set anything. My Bad.

Now there is a CPU_PPC, which I also set in Makefile

Recompiling.
Re: Current porting state? [message #5311 is a reply to message #5310] Wed, 13 September 2006 11:59 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
#elif defined(flagPPC)
	#define CPU_32
	#define CPU_PPC
	#define CPU_BE
	#define CPU_BIG_ENDIAN
	#define CPU_ALIGNED
#else


Is that correct?
Re: Current porting state? [message #5312 is a reply to message #5311] Wed, 13 September 2006 12:03 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Yep, pricely that. The examples you sent run just the same, rebuilding the ide/HelloWorld just to see if it does something differently.

Re: Current porting state? [message #5313 is a reply to message #5312] Wed, 13 September 2006 12:11 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

http://netbsd.interq.or.jp/~lundman/osx1.jpg

http://netbsd.interq.or.jp/~lundman/osx2.jpg

http://netbsd.interq.or.jp/~lundman/osx3.jpg

Same/similar gfx bug I get on Intel, but more advanced.

Quite encouraging though.

Re: Current porting state? [message #5314 is a reply to message #5313] Wed, 13 September 2006 12:13 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
lundman wrote on Wed, 13 September 2006 06:11


http://netbsd.interq.or.jp/~lundman/osx1.jpg

http://netbsd.interq.or.jp/~lundman/osx2.jpg

http://netbsd.interq.or.jp/~lundman/osx3.jpg

Same/similar gfx bug I get on Intel, but more advanced.

Quite encouraging though.




Those missing icons in the list are caused by that "return s" you have placed into UnpackRLE Wink

Mirek
Re: Current porting state? [message #5315 is a reply to message #5314] Wed, 13 September 2006 12:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Those gfx problems look like a result .icpp makefile bug - chameleon initialization is not working.

I believe that recompilation using TheIDE will solve them.
Re: Current porting state? [message #5316 is a reply to message #5314] Wed, 13 September 2006 12:27 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Hah! totally forgot about that!

One second:

http://netbsd.interq.or.jp/~lundman/osx2.jpg

http://netbsd.interq.or.jp/~lundman/osx3.jpg

Now its exactly like NetBSD/Intel Smile

I shall try to compile an example to see if they work.

Re: Current porting state? [message #5317 is a reply to message #5316] Wed, 13 September 2006 12:29 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Hm actually, as for compiling in TheIDE, there will be trouble with flagPPC I am afraid. Maybe just put #define flagPPC into beginning of Core.h for now...
Re: Current porting state? [message #5318 is a reply to message #5317] Wed, 13 September 2006 12:33 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

/Users/lundman/uppsrc/uppsrc/Core/Core.h:11:1: warning: "flagPPC" redefined
<command line>:1:1: warning: this is the location of the previous definition


Can't compile the example, as it doesn't find CtrlLib/CtrlLib.h

Did I mess something starting it the first time, or do I have to set up a build environment?

Re: Current porting state? [message #5319 is a reply to message #5318] Wed, 13 September 2006 12:42 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
You will definitely have to setup build method. (in Setup menu)

Mirek
Re: Current porting state? [message #5320 is a reply to message #5318] Wed, 13 September 2006 12:46 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Well, nope, I was wrong, for <CtrlLib/CtrlLib.h>, the problem is different. TheIDE build system should put paths to all nests as include paths on commandline.

Please activate verbose mode and check...

Mirek
Previous Topic: SO for Draw, Esc and other packages
Next Topic: C strings
Goto Forum:
  


Current Time: Tue Apr 28 16:31:34 GMT+2 2026

Total time taken to generate the page: 0.01304 seconds