Author Topic: Icaros 64 PRE-ALPHA WIP  (Read 1208 times)

wawa

  • Senior Member
  • ****
  • Posts: 252
  • Karma: +1/-0
Re: Icaros 64 PRE-ALPHA WIP
« Reply #15 on: October 15, 2019, 06:52:50 PM »
Any bug reports for 64bit are best tp direct at nick or maybe michal. Or create issue ib aros github

miker1264

  • Senior Member
  • ****
  • Posts: 327
  • Karma: +12/-1
Re: Icaros 64 PRE-ALPHA WIP
« Reply #16 on: October 15, 2019, 07:54:26 PM »
Ok. I mentioned it here because paolone set up this thread and bug reports was one of the items.

But I'll repirt it to Nick or Michal as you indicated.

paolone

  • Moderator
  • Senior Member
  • *****
  • Posts: 293
  • Karma: +3/-0
Re: Icaros 64 PRE-ALPHA WIP
« Reply #17 on: October 16, 2019, 10:19:08 AM »
I have a few bug reports for Icsros 64bit.

After opening a shell when starting to type the first char is always ' ( '

Maybe it's related to the next issue? Even after initial setup when restarting Icaros the keyboard layout reverts to "Italiana" and I have to constantly use Input Prefs to set it to American (default).

Lastly when using Wanderer in Icon Mode to drag-n-drop to copy Wanderer only copies one time. Each successive copy operation seems to fail. So I must use shell wth Copy From To for copying.
Hi Miker, I must have left some unwanted input.prefs file somewhere with the Italian keyboard. I noticed the issue as well, but I thought (since I obviously always choose the italian layout) that - for some reason - there was some write lock on the preferecences file, maybe due to the initial copy operation from a readonly media. But, even in that case, I'd expect it to revert to default American, not italian. I will check it ASAP.

paolone

  • Moderator
  • Senior Member
  • *****
  • Posts: 293
  • Karma: +3/-0
Re: Icaros 64 PRE-ALPHA WIP
« Reply #18 on: October 16, 2019, 10:20:28 AM »
Ok. I mentioned it here because paolone set up this thread and bug reports was one of the items.
And you did it right. Feel free to report strictly-AROS-related bugs to the AROS devs, while the keyboard one surely is my mistake.

pjhutch1200

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Icaros 64 PRE-ALPHA WIP
« Reply #19 on: October 19, 2019, 02:32:22 PM »
Has anyone got any guidelines on converting or re-compiling programs to 64 bit?

I found this article for GCC
https://www.geeksforgeeks.org/compile-32-bit-program-64-bit-gcc-c-c/
and this
http://aros.sourceforge.net/documentation/developers/compiling.php#hosted-aros-i386-linux-or-aros-i386-freebsd

if interested.

miker1264

  • Senior Member
  • ****
  • Posts: 327
  • Karma: +12/-1
Re: Icaros 64 PRE-ALPHA WIP
« Reply #20 on: October 19, 2019, 02:52:40 PM »
Has anyone got any guidelines on converting or re-compiling programs to 64 bit?

I found this article for GCC
https://www.geeksforgeeks.org/compile-32-bit-program-64-bit-gcc-c-c/
and this
http://aros.sourceforge.net/documentation/developers/compiling.php#hosted-aros-i386-linux-or-aros-i386-freebsd

if interested.

That's a good question. I think we are still discovering the process at the moment. There is some information available for conversion but 64bit and 32bit are completely different. I'm discovering that the hard way. I have a datatype that works fine for 32bit, but it refuses to work for 64bit. Now I have to go back to make sure all the methods I'm using in the datatype are safe for 64bit as well as 32bit. Then it works in both.

The main thing I get from the GeeksForGeeks article is that a ULONG in 32bit is 4 bytes. But a ULONG in 64bit addressing is 8 bytes. So if we use a lot of LONG or ULONG values that presents a potential problem converting 32bit to 64bit.
« Last Edit: October 19, 2019, 04:31:11 PM by miker1264 »

Yannick

  • Newbie
  • *
  • Posts: 31
  • Karma: +2/-0
Re: Icaros 64 PRE-ALPHA WIP
« Reply #21 on: October 19, 2019, 07:50:57 PM »
This needs to be corrected, ULONG is always 4 bytes on 32 and 64 bits AROS versions. Main issue converting to 64 bits is that ULONGs are often used to store pointers that are 4bytes on 32bits but 8bytes on 64bits systems. All those must be changed to IPTR (integer pointer) and integer long enough to store a pointer on any system, it will be 4bytes long on 32bit systems and 8bytes on 64bits systems.

miker1264

  • Senior Member
  • ****
  • Posts: 327
  • Karma: +12/-1
Re: Icaros 64 PRE-ALPHA WIP
« Reply #22 on: October 19, 2019, 09:20:24 PM »
This needs to be corrected, ULONG is always 4 bytes on 32 and 64 bits AROS versions. Main issue converting to 64 bits is that ULONGs are often used to store pointers that are 4bytes on 32bits but 8bytes on 64bits systems. All those must be changed to IPTR (integer pointer) and integer long enough to store a pointer on any system, it will be 4bytes long on 32bit systems and 8bytes on 64bits systems.

That's a very good point. I misinterpreted what was being said. Thanks for the correction.

pjhutch1200

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Icaros 64 PRE-ALPHA WIP
« Reply #23 on: October 19, 2019, 11:35:59 PM »
I C you should replace ULONG with uint32 or uint64 as defined in /usr/include/x86_64-linux-gnu/bits/types.h and recommended in the AmigaOS SDK documentation in https://wiki.amigaos.net/wiki/Migration_Guide#Type_Consistency .

Yannick

  • Newbie
  • *
  • Posts: 31
  • Karma: +2/-0
Re: Icaros 64 PRE-ALPHA WIP
« Reply #24 on: October 20, 2019, 07:31:36 AM »
Or use AROS types like IPTR that ensures you that you can store a pointer in them under any architecture.
Changing to uint64 is not always going to work  if you compile with 32bit systems.
We also have QUAD and UQUAD that are 64bits intergers under any arch.

o1i

  • Newbie
  • *
  • Posts: 24
  • Karma: +2/-0
Re: Icaros 64 PRE-ALPHA WIP
« Reply #25 on: October 20, 2019, 09:20:51 AM »
I C you should replace ULONG with uint32 or uint64 as defined in /usr/include/x86_64-linux-gnu/bits/types.h and recommended in the AmigaOS SDK documentation in https://wiki.amigaos.net/wiki/Migration_Guide#Type_Consistency .

No. Use IPTR and APTR. Linux headers are not useful for AROS. Neither is any AmigaOS SDK, which is totally useless for 64bit migration. Doing like described there will cause a lot of trouble for any 64bit migration.
« Last Edit: October 20, 2019, 09:26:54 AM by o1i »

miker1264

  • Senior Member
  • ****
  • Posts: 327
  • Karma: +12/-1
Re: Icaros 64 PRE-ALPHA WIP
« Reply #26 on: October 20, 2019, 09:55:09 AM »
I C you should replace ULONG with uint32 or uint64 as defined in /usr/include/x86_64-linux-gnu/bits/types.h and recommended in the AmigaOS SDK documentation in https://wiki.amigaos.net/wiki/Migration_Guide#Type_Consistency .

No. Use IPTR and APTR. Linux headers are not useful for AROS. Neither is any AmigaOS SDK, which is totally useless for 64bit migration. Doing like described there will cause a lot of trouble for any 64bit migration.

I'm using APTR and IPTR.  But I haven't used them consistently. 64bit is more demanding. So I'll use them more consistently. Thanks.

lm

  • Guest
Re: Icaros 64 PRE-ALPHA WIP
« Reply #27 on: October 20, 2019, 11:03:50 AM »
Last time I checked, Lunapaint wasn't present in 64 bit Aros contrib.
Does it compile now ?

wawa

  • Senior Member
  • ****
  • Posts: 252
  • Karma: +1/-0
Re: Icaros 64 PRE-ALPHA WIP
« Reply #28 on: October 20, 2019, 01:08:18 PM »
has been long time, but afair lunapaint has been moved from aros ports to contrib by matze on my request quite a while ago. that was since i intended to work on it in order to get it working for m68k, because i have already once had it compiling and almost working years earlier for afa os. i have did certain amount of work on it, so that it should at least display the gui on m68k (mostly trying to get correct hooks and dispatcher macros afair, which simply doesnt matter on i386, it works there anyway). but i kinda left the work undone when i discovered that lunapaint was a program storing and working on images internally with 64 bit. this made it potentially too heavy for m68k anyway and therefore less priority for me. i dont remember, but i dont think i tried or was even able to compile 64bit version at that time, still using 32bit host. today id be willing to look back at it and try to help in an effort to have that source fixed for all target platforms. x64 included.

wawa

  • Senior Member
  • ****
  • Posts: 252
  • Karma: +1/-0
Re: Icaros 64 PRE-ALPHA WIP
« Reply #29 on: October 20, 2019, 01:19:39 PM »
il look at aros sources later today and may give more detailed feedback today evening.

for now the sources of lunapaint are here:
https://github.com/aros-development-team/contrib/blob/master/gfx/lunapaint/mmakefile.src
looking at mmakefile.src the compilation is currently only enabled for i386 and arm.
i can actually enable it for x86_64 as well and see if it compiles and so on, its pretty easy.
you simply need to add another line
#MM- contrib-gfx-x86_64 : contrib-gfx-lunapaint
to the makefile somewere along the other targets.