Welcome, Guest. Please login or register.

Author Topic: new ixemul V62.1 for 68k.  (Read 10550 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: new ixemul V62.1 for 68k.
« Reply #59 from previous page: November 17, 2009, 09:31:11 AM »
Quote
string = malloc(8);

strcpy(string,"123456789");

now with libnix you get memtrash and your program overwrite memory and crash sooner or later randomly.ixemul report this.so a programmer notice this.so ixemul is more safe and bring no speedloss

Bleh. That is not safe. It is placebo. It can crash your system at any time. Ixemul can not magically trap malicious code.

Quote
But now what test we should use to show that ixemul is not safe ?

It just isnt. Do not mix ixemul with native Amiga API calls.

Quote
YOu should really try out ixemul V62 with more programs,then you see it run stable.Then use your MOS ixemul.I think you see this run not so stable.

I can not use your ixemul because it does not support PPC native callbacks (i.e. atexit(), obviously).

Quote
but your only excuse is, that programs should not use ixemul and thats wrong.ixemul can do more than libnix and need not static link, so programs can be smaller.

With ixemul you still have static linking because of stubs.
My Amigas: A500, Mac Mini and PowerBook
 

Offline bernd_afaTopic starter

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by bernd_afa
Re: new ixemul V62.1 for 68k.
« Reply #60 on: November 17, 2009, 12:18:10 PM »
@Itix
>Bleh. That is not safe. It is placebo. It can crash your system at any time. Ixemul can not >magically trap malicious code.

No such often happen programming bugs (that 1-4 bytes more written)cant crash system, because on ixemul is a cookie here.was also on old V48 Versions

Of course this cost a little more mem, but it make all more safe and help finding programming bugs easy.this more mem doesnt matter because also AFA is small and 68k executable save too some mem.

>I can not use your ixemul because it does not support PPC native callbacks (i.e. atexit(), >obviously).

but you can use UAE and here its possible that you can run 68k Software everywhere.

>It just isnt. Do not mix ixemul with native Amiga API calls.

Every software can change so it can work, so its impossible that ixemul cant work with Amiga OS funcs when we know the reason wy it cant work to fix that.

You have no practice argument wy can not amiga OS function use in netsurf or ffplay or ffmpeg, or all the other SDL Ports or other programs that for ixemul are here

I still dont believe that without a example Program in which it is usefull to use amiga Functions, because you are a MOS developer and its possible that you not like that 68k make it more easy to port programs as MOS, because you fear that not so much buy MOS.

But really i dont understand wy so fight for users, users/devs are not stupid, and when you have no reason that explain in a real world example wy ixemul not work with amiga OS api, then you are unbelievable.

I can say you, that i planed buy a Mac mini and maybe MOS.But now i am sure, i not buy or need it, because guys that do that, the feature we not have we need not, i dont want suppport with money.

BTW:I remember MOS devs say long time ago when there are devs that ask for a newer GCC as 2.95 that there is no newer GCC need.or should i post links ?
« Last Edit: November 17, 2009, 02:03:37 PM by bernd_afa »
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: new ixemul V62.1 for 68k.
« Reply #61 on: November 17, 2009, 03:23:47 PM »
Quote
but you can use UAE and here its possible that you can run 68k Software everywhere.

I dont have UAE, I dont have ROMs and I dont intend to buy ROMs.

Quote
Every software can change so it can work, so its impossible that ixemul cant work with Amiga OS funcs when we know the reason wy it cant work to fix that.

Lets see... if I recall correctly ixemul uses tc_UserData for its own purposes. Right/wrong?

Quote
I can say you, that i planed buy a Mac mini and maybe MOS.But now i am sure, i not buy or need it, because guys that do that, the feature we not have we need not, i dont want suppport with money.

And I was going to buy Amiga Forever package but I decided to not buy it.

Quote
BTW:I remember MOS devs say long time ago when there are devs that ask for a newer GCC as 2.95 that there is no newer GCC need.or should i post links ?

Yeah. Problem is that newer GCC versions are quite buggy. There are still newer GCC versions for MorphOS, I have got all three GCC2, GCC3 and GCC4. GCC2 works for me so I am using it most of time. No need to use latest stuff always.
My Amigas: A500, Mac Mini and PowerBook
 

Offline bernd_afaTopic starter

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by bernd_afa
Re: new ixemul V62.1 for 68k.
« Reply #62 on: November 17, 2009, 06:10:42 PM »
>Lets see... if I recall correctly ixemul uses tc_UserData for its own purposes. Right/wrong?

Yes, and its tell, when you not use SDL task creation Function and you want create a own amiga sub task you must create before you use a ixemul file or network function with ix_CreateChildData();
the valid data for this task.thats all

if you not do that then your program stop at first try and bring a error message.but when a program not stop at first try, then there is all right and it work forever and stable.

Edit: or do you mean, this is a big problem if this entry is not usable for amiga ?

I think not, does OWB or netsurf or any other with AOS Code enhanced Linux Port use that ?
If yes, see at ixemul source, its possible to change ixemul to use the tc_trap Data field for this.

#ifdef NOTRAP
  printf ("#define USERPTR_OFFSET %ld\n", offsetof (TASK, tc_UserData));
#else  
  printf ("#define USERPTR_OFFSET %ld\n", offsetof (TASK, tc_TrapData));
#endif

there are other unused fields in the process structure, just tell me a place which is better.
i get a better idea.

i see in process structure a field pr_shellprivate.
Is this not for all that create with CreateProc unsused and only for amiga shell used ?
« Last Edit: November 17, 2009, 06:34:24 PM by bernd_afa »
 

Offline bernd_afaTopic starter

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by bernd_afa
Re: new ixemul V62.1 for 68k.
« Reply #63 on: November 18, 2009, 10:24:26 AM »
>Yeah. Problem is that newer GCC versions are quite buggy. There are still newer GCC >versions for MorphOS, I have got all three GCC2, GCC3 and GCC4. GCC2 works for me so I >am using it most of time. No need to use latest stuff always.

But when you want sell a commerciall OS, its not enough that it working by you, the buyer of this OS must be happy with whats here.

The reason to test newest stuff always is for me and other to help make rock solid software.

We test always newest stuff and report Bugs because GCC and ffmpeg support 68k AOS we get help in ML.It can build with configure and make.

ami_stuff do not only port ffmpeg, he report bugs and he help so to make ffmpeg better.same he do on newest GCC too.

I really dont like when people say new Version have Bugs i use older without reporting the Bugs so devs have a chance to fix.when all users do that, then software get never be more features.best is test newer version and when it have bugs, then report it and use old software until fixed

But i think on MOS/OS4 its more a excuse because of the missing man power to do that additional work, but its a real bad excuse.I see the GCC 4.3 and above produce no wrong code.Have you try out 4.3/ 4.4/ or 4.5 on MOS and this are buggy ?

Because the GCC Team make not GGC as opensource so that commercial OS developers port it to their OS to have a compiler but dont want to help to make it better.

thats only a one way thing, only MOS/OS4 side profit from gcc, but gcc do not get any enhance with MOS/OS4.I think a modern OS should also in GGC source support as 68k amigaos.

>>I can say you, that i planed buy a Mac mini and maybe MOS.But now i am sure, i not >>buy or need it, because guys that do that, the feature we not have we need not, i dont >>want suppport with money.
>And I was going to buy Amiga Forever package but I decided to not buy it.

everybody is free what he do, but the compare is too much diffrent.

1. i dont sell amiga forever or get money from it.
2. amiga forever is that system we all learn in the past and know, but its now not market as a future system.so i understand more that you dont want install amigaforever.

but when users change to new system, there must be more advantages to learn a new system.at least it should have more speed than a emulate amiga forever on X86.

and BTW:

when the MOS 68k emul is fix, then ixemul should be run wirthout amiga forever
« Last Edit: November 18, 2009, 10:27:14 AM by bernd_afa »
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: new ixemul V62.1 for 68k.
« Reply #64 on: November 18, 2009, 11:09:05 AM »
Quote from: bernd_afa;529928
I can say you, that i planed buy a Mac mini and maybe MOS.But now i am sure, i not buy or need it, because guys that do that, the feature we not have we need not, i dont want suppport with money.

Excellent news!
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: new ixemul V62.1 for 68k.
« Reply #65 on: November 18, 2009, 11:49:03 AM »
Quote

I think not, does OWB or netsurf or any other with AOS Code enhanced Linux Port use that ?


I dont know. Do you?

Quote

#ifdef NOTRAP
printf ("#define USERPTR_OFFSET %ld\n", offsetof (TASK, tc_UserData));
#else
printf ("#define USERPTR_OFFSET %ld\n", offsetof (TASK, tc_TrapData));
#endif

there are other unused fields in the process structure, just tell me a place which is better.
i get a better idea.


It is not unused. I can use it in my own applications.

Quote

I really dont like when people say new Version have Bugs i use older without reporting the Bugs so devs have a chance to fix.when all users do that, then software get never be more features.best is test newer version and when it have bugs, then report it and use old software until fixed


Why? I am not a beta tester and I dont have time for that.

Quote

Have you try out 4.3/ 4.4/ or 4.5 on MOS and this are buggy ?


I tried some GCC 4.x version couple of months ago but I dont know which version it was. But it did its job.

Quote

Because the GCC Team make not GGC as opensource so that commercial OS developers port it to their OS to have a compiler but dont want to help to make it better.


If GCC developers are unhappy about it they can always quit developing GCC.

Quote

when the MOS 68k emul is fix, then ixemul should be run wirthout amiga forever


It would need support for PPC native callbacks.
My Amigas: A500, Mac Mini and PowerBook
 

Offline bernd_afaTopic starter

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by bernd_afa
Re: new ixemul V62.1 for 68k.
« Reply #66 on: November 18, 2009, 01:36:30 PM »
>I dont know. Do you?

i think you should know if your netsurf store data in this field.its unused but can use in apps, but i know no practice software that use it.

when i remember correct you can count the Unix Ports that are really enhanced with amiga funcs in 1 Hand (i count all MOS AOS und OS4)

I get in mind OWB, flashplayer, netsurf, mplayer.What did i miss ?

so i think there is no program that make problems and the unchanged Feature Unix Ports i think are more than 1500.

So i really see no need wy AOS need two Unix compatible libs and the limit of ixemul dont use tc_userdata if you want use ixemul funcs in the task is not big Limit that make the work usefull to enhance and maintain 2 big unix compatible libs.

>Why? I am not a beta tester and I dont have time for that.

yes i know you and fab are the most important devs to bring applications to MOS.If you and Fab not here, who do this big Ports then. ?

I see nobody that do so much for free for MOS as you both.
From Piru i read only bashes again 68k ixemul, but i see not that he release something free for MOS.Or did i miss some information ?

But if nobody on MOS side is here to help you is also really not good i think, that MOS have actual BugFree Software.

>Excellent news!

Yes and i thank you again that you the unqualified bashes again ixemul V61 begin before MOS Mac Version, so i pay no money.

and btw, what Itix do i understand not as unqualified bashes, because he bring arguments of real Limits and this help to make it better.

The Limits are very small, i see no real reason to spend much work to add in libnix full Unix Features and must keep update 2 lib Versions.

But if MOS release libnix source, a compile that maybe need not more as 1-2 hours to 68k is ok.

ixemul have also some more advantages to libnix.ixtrace is very usefull to find slowdown problems of bad written Unix software.We all know Unix SOftware is most written today on a 2 GHZ fast X86.A dev does not notice any slowdown here.

but when port to slower systems ixtrace or library timer can help to do profiling and see where the programs waste time.

http://aminet.net/package/dev/misc/LibraryTimer

this is a great tool and help me alot.also that ixemul have fast boundcheck to detect memtrashes better.
so you see all libs have some advantages and when i need choose enhance libnix or ixemul because i have not so much time, my choose is clear ixemul have better solutions to develop more easy bugfree and fast Applications.

memory allocator is faster and do less fragment as libnix on 68k.when programs use malloc.tlsf mem do not help.
file seeking is faster on ixemul because libnix delete after a seek always the full filebuffer and read all again( i add cache to it).seeks inside filebuffer work in ixemul more than 200* faster.result is openredalert start 50* faster as compile with old 68k libnix.

But i do a new libnix that have too a cache before i begin with ixemul.but also here openredalert start 2* faster as with libnix on my system.
« Last Edit: November 18, 2009, 02:05:59 PM by bernd_afa »
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: new ixemul V62.1 for 68k.
« Reply #67 on: November 18, 2009, 02:35:03 PM »
Quote
i think you should know if your netsurf store data in this field.its unused but can use in apps, but i know no practice software that use it.

Some of my Amiga software is using it. Mostly to pass pointers to subtasks.

Quote
I get in mind OWB, flashplayer, netsurf, mplayer.What did i miss ?

Any Amiga software with a GUI.

Btw Netsurf is not "Unix software". It was written for RISCOS and then ported to other systems.
My Amigas: A500, Mac Mini and PowerBook
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: new ixemul V62.1 for 68k.
« Reply #68 on: November 18, 2009, 03:11:07 PM »
Quote from: bernd_afa;530085
did i miss some information ?
Yes, you miss a lot of information.

Quote
if MOS release libnix source
libnix is not open source.

BTW the limitations of the 68k libnix are mostly not present in the MorphOS version. We're not blind, obviously we have taken care of such issues. Funnily enough, under MorphOS the 68k apps built with 68k libnix have much faster memory allocation than ixemul ones.
« Last Edit: November 18, 2009, 03:15:14 PM by Piru »
 

Offline bernd_afaTopic starter

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by bernd_afa
Re: new ixemul V62.1 for 68k.
« Reply #69 on: November 18, 2009, 03:57:08 PM »
>BTW the limitations of the 68k libnix are mostly not present in the MorphOS version. We're

again, where can see what API functions the libnix of MOS have ?

 >not blind, obviously we have taken care of such issues. Funnily enough, under MorphOS >the 68k apps built with 68k libnix have much faster memory allocation than ixemul ones.

sure fabs benchmark it do faster, but dont believe that in real world Linux apps with C++ or programs that use xml2 lib or other that do lots of small memalloc and free.

libnix have only a small first fit allocator 4 kb pool allocator, which do lots fragment and libnix have very small pools that need a lot of free poolsearch when there are programs that use much mem.

See here the code.And i think everybody with programing knowledge should know that a buddy allocator in real world apps is lots faster.



void *malloc(unsigned long size)
{
  struct MinNode *node=__memorylist.mlh_Head;
  struct MemHeader *b;
  ULONG size2,*a;

  size+=sizeof(ULONG);
  while(node->mln_Succ) /* yet some memory in my list ? */
  {
    if((a=Allocate((struct MemHeader *)node,size))!=NULL)
    {
      *a++=size;
      return a;
    }
    node=node->mln_Succ;
  }
  size2=sizeof(struct MemHeader)+sizeof(ULONG)+size; /* Total memory needed */
  if(size2<=_MSTEP)
    size2=_MSTEP; /* Allocate a _MSTEP bytes large block if possible */
  size2=(size2+4095)&~4095; /* Blow up to full MMU Page */
  if((b=(struct MemHeader *)AllocMem(size2,MEMF_ANY))!=NULL)
  {
    b->mh_Lower=b->mh_First=(struct MemChunk *)(b+1);
    b->mh_First->mc_Next=NULL;
    b->mh_Free=b->mh_First->mc_Bytes=size2-sizeof(struct MemHeader);
    b->mh_Upper=(char *)b+size2;
    AddHead((struct List *)&__memorylist,&b->mh_Node);
    a=Allocate(b,size); /* It has to work this time */
    *a++=size;
    return a;
  }
  return NULL;
}

>Any Amiga software with a GUI.

I mean only Linux Software that is enhance with amiga OS features

>Some of my Amiga software is using it. Mostly to pass pointers to subtasks.

Was this mostly based on Unix code and need much API Features ?
« Last Edit: November 18, 2009, 04:18:09 PM by bernd_afa »
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: new ixemul V62.1 for 68k.
« Reply #70 on: November 18, 2009, 05:56:07 PM »
Quote
again, where can see what API functions the libnix of MOS have ?

You cant.

Quote
libnix have only a small first fit allocator 4 kb pool allocator, which do lots fragment and libnix have very small pools that need a lot of free poolsearch when there are programs that use much mem.

You forget that in MorphOS, when using TLSF, memory pools are completely different.

Quote
Was this mostly based on Unix code and need much API Features ?

Amiga native code but I recall I used it in my still uncompleted and unreleased Netsurf 68k release passing data to subthreads (my Netsurf port runs MUI GUI on separate thread). Or, I dont know. I just link with libnix and dont care about ixemul.

But even in Amiga native coding you often use at least snprintf(), maybe printf() or dos I/O. Even if you are happy with ixemul for your ports you still need good libnix for native coding.
My Amigas: A500, Mac Mini and PowerBook
 

Offline bernd_afaTopic starter

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by bernd_afa
Re: new ixemul V62.1 for 68k.
« Reply #71 on: November 18, 2009, 07:32:52 PM »
in what file you set userdata ?.
I look in source here

http://source.netsurf-browser.org/branches/itix/netsurf/mui/

and btw i see that you open libs by hand also when __MORPHOS__ defines and not with libnix autoinit.so no need for libnix too.

I get also the idea just add the alloced memblock at the beginnung or end of the list tc_MemEntry that contain the userdata.

but i dont know how AOS work and add this allocate memblock to the list and on what place it come and of it is always sure that the block is at 1. or last place when i add it here.

Its also possible to change the process create function so it add additional space for that value.

task cant use dos, so ixemul funcs need no userdata

Its possible to add the iserdata address at the end of stack range.only need not forget when use stackswap to copy this value too.but here can use a function ix_stackswap that work more easy as the AOS func.

so you see no reason to enhance libnix and not use ixemul

if ((MUIMasterBase = OpenLibrary("muimaster.library", 11)))
   if ((CyberGfxBase = OpenLibrary("cybergraphics.library", 41)))
   if (classes_init())
   if (mui_schedule_init())
   if (mui_clipboard_init())
#if defined(__MORPHOS__)
   if ((ZBase = OpenLibrary("z.library", 51)))
   if ((JFIFBase = OpenLibrary("jfif.library", 0)))
#endif
   if ((TTEngineBase = OpenLibrary("ttengine.library", TTENGINE_VERSION)))
   if ((IconBase = OpenLibrary("icon.library", 0)))
   if ((IntuitionBase = (APTR)OpenLibrary("intuition.library", 36)))
   if ((SocketBase = OpenLibrary("bsdsocket.library", 0)))
   if ((AsyncIOBase = OpenLibrary("asyncio.library", 0)))
« Last Edit: November 18, 2009, 07:37:12 PM by bernd_afa »
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: new ixemul V62.1 for 68k.
« Reply #72 on: November 19, 2009, 06:42:27 AM »
Quote
and btw i see that you open libs by hand also when __MORPHOS__ defines and not with libnix autoinit.so no need for libnix too.

When using Amiga native APIs (i.e. using MUI GUI) I prefer opening libraries manually. In SDL ports I dont because I dont want Amiga specific code to otherwise fully portable application.

Quote
I get also the idea just add the alloced memblock at the beginnung or end of the list tc_MemEntry that contain the userdata.

You can not guarantee it is compatible with applications using tc_MemEntry. They can add entries to head or tail of list at their will or even remove existing entries.

Quote
but i dont know how AOS work and add this allocate memblock to the list and on what place it come and of it is always sure that the block is at 1. or last place when i add it here.

Amiga does not do much with it. Applications itself manage tc_MemEntry.

Quote
Its also possible to change the process create function so it add additional space for that value.

task cant use dos, so ixemul funcs need no userdata

So you have to hack the OS.

Quote
Its possible to add the iserdata address at the end of stack range.only need not forget when use stackswap to copy this value too.but here can use a function ix_stackswap that work more easy as the AOS func.

But again you are putting restrictions. Ixemul works as long as developer does not do X but uses Y instead.

Quote
so you see no reason to enhance libnix and not use ixemul

And how about sockets? Can I assume WaitSelect() works?
My Amigas: A500, Mac Mini and PowerBook
 

Offline bernd_afaTopic starter

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by bernd_afa
Re: new ixemul V62.1 for 68k.
« Reply #73 on: November 19, 2009, 11:49:24 AM »
>And how about sockets? Can I assume WaitSelect() works?

yes of course it work, when a Amiga program use no Unix socket and amiga sockets instead it work.

this show that the libcurl amigaOSPort and the libcurl Unix Port work well and at same speed on netsurf and ixemul

>So you have to hack the OS.

thats only a enhancement of the AOS.newer AOS need bigger process structures for example for resource tracking, in furtherdevelop of AFA i need sooner or later increase the process structure amd i can then make room for more user data entries.

I think its maybe the easiest way to use the tc_TaskTrap field.thats really must not need in a amiga OS program.i dont know what amiga program use this.debuggers use only tc_ExcpetData

But i look always closer before i change something.thats only some ideas to discuss now.

----

I get also the idea to add for ixemul funcs

SetTaskUserData(slotnum,value) and GetTaskUserData(slotnum,value) and maybe support more than 1 entry(slotnum) and store this then in userdata.depent on what you use libnix or ixemul what this func really do.but when use libnix can only store 1 value.

This is then a enhancement to AOS too and its the correct way to go, when amiga OS go memory Protection.

access of structures direct is bad.
« Last Edit: November 19, 2009, 11:52:20 AM by bernd_afa »
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: new ixemul V62.1 for 68k.
« Reply #74 on: November 19, 2009, 12:01:16 PM »
Quote
when amiga OS go memory Protection.

For fantasy writings I prefer J.R.R. Tolkien.
My Amigas: A500, Mac Mini and PowerBook