Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - OS4User

Pages: 1 ... 7 8 [9] 10 11 ... 28
121
From the NASM docs, https://www.nasm.us/xdoc/2.15.05/html/nasmdoc8.html#section-8.4.1

from OMF spec:
...
A  Alignment
A 3-bit field that specifies the alignment required when this program segment is placed within a
logical segment. Its values are:
   0 Absolute segment.
   1 Relocatable, byte aligned.
   2 Relocatable, word (2-byte, 16-bit) aligned.
   3 Relocatable, paragraph (16-byte) aligned.
   4 Relocatable, aligned on a page boundary. (The original Intel 8086 specification
      defines a page to be 256 bytes. The IBM implementation of OMF uses a 4096-byte or 4K  page size).
   5 Relocatable, aligned on a double word (4-byte) boundary.
   6 Not supported.
   7 Not defined.

So for OMF we have 1,2,4,16,4K  only, with no relation what is supported by NASM.


122
if we have a suitable ELF -> OMF converter that makes the exercise worthwhile

"ELF -> OMF converter"   is not  a good way  from point of view of alignment.

AFAIK   OMF support  2,4,16,4K  only  and thus  data   cannot be aligned  to 64 and 128

123
Anyone know how to use wlink to create an executable from the command line?
Using:
wlink option quiet name helloworld.exe file helloworld.obj library libc_dll.lib


Try

wlink system os2v2 option map name helloworld.exe file helloworld.obj library libc.lib

124
Then it is just the question of whether wlink can convert from ELF to a LX binary.

Once  I linked  ELF produced by NASM into LX  using  Wlink.  It was just test.

125
Well, it may be possible to do a emxelfld that calls wlink.exe and outputs a LX binary. DLLs I'm not sure about, at that building something that needs imports from DLLs might be tricky, likely no 16 bit support at all as well.
Be interesting to see the SDK for the PowerPC version of OS/2 as that was ELF based.

True. Wlink has some limitation for 16 bit DLL. But is it really nessasery for porting software ?

126
to produce OMF from ELF

What all is required to produce OMF from ELF? Is there a doc to read?

From my point of view - there is no need to produce OMF from ELF as WLINK, can generate DLL/EXE from ELF (however, it may be necessary to improve WLINK)

127
Applications / Re: OS/4 (technical details only)
« on: April 05, 2021, 09:55:19 pm »
@Dariusz: the suggested tool is only working without acpi. Without acpi the cores stay disabled. With acpi4.bsd (os4krnl) or with acpi.psd (ibm kernel) the cores disabled by setproc.exe will be enabled immediatly.

ACPIDAEMON.EXE  switches them ON

128
Applications / Re: OS/4 (technical details only)
« on: April 05, 2021, 08:14:12 pm »
... the system freezes sometimes; with os4 kernel and ibm kernel.

I have freezes sometimes too. May be issue is  in some  drivers  or libs. So far my investigation has not brink a result.

And I think with 2 cores it runs more stable - but with os4 kernel I cannot switch off 2 cores.
best regards

Try the utility suggested by Dariusz.

By the way,   os4apic  does not start HT cores until  switch  /HT is used. May be it helps you.

129
Applications / Re: OS/4 (technical details only)
« on: April 04, 2021, 09:01:12 pm »
Hallo,
with IBM Kernel we can switch off cpu cores on boot (acpi.psd /maxcpu=2). Is there an equivalent switch for the os4 kernel.
best regards
Bernhard

what CPU  do you run on ?

130
Applications / Re: OS/4 (technical details only)
« on: March 28, 2021, 11:48:23 am »
On my M93P, I've managed to get the latest OS4 kernel to boot, but I get stuck on a loading cursor in the middle of the screen pre XWP starting.

Assuming you have gone through the enclosed HowTo  -  try to reboot a few times, PM Shell or WPS  have some bug which  brings this behavior. I have met it many times on the original kernel too.

131
Multimedia / Re: AVX safe FFmpeg
« on: February 19, 2021, 10:53:46 pm »
You might want to try linking with wl.exe (wlink) as it seems to me the linker handles larger alignment

Unfortunately, wlink/wl  does not have an option/command to set  "between parts alignment"  within object.

Does it need it? The version I built previously used wl for linking and seemed to align stuff correctly, though I guess maybe a coincidence.

Data for  AVX instruction can be situated in many places, for .ex  - stack, dynamically allocated memory, static vars, etc.

I am speaking about static variables now. Our last GCC is able generate  proper .obj files with necessary  alignments. But if final data object  in LX module  is linked from parts (from several files)    we can meet and we indeed meet   wrong alignment.

Compiler reflects in obj file a demand that  it has to be linked with previous file  with certain alignment    in case current file  contains  data with specific alignment.

But not in our case. Historically, GCC for OS/2  uses a.out  as object format. A.out  is not able to carry info about requested alignment  to linker   that is why  we meet  wrong alignment in final binary.

The  best solution  is  to use  ELF  format  for objects files  (it requested a lot of time  for coding and fixing  GCC for OS/2).    One more way  -  could be just request  from linker   to  link every data parts  with 64 bytes align -  but wlink does not have such option/command -  so no way here.




132
Multimedia / Re: AVX safe FFmpeg
« on: February 19, 2021, 07:45:28 pm »
You might want to try linking with wl.exe (wlink) as it seems to me the linker handles larger alignment

Unfortunately, wlink/wl  does not have an option/command to set  "between parts alignment"  within object.

133
Multimedia / Re: AVX safe FFmpeg
« on: February 19, 2021, 01:32:20 pm »
can you confirm that this AVX enabled version will ONLY EVER run on the OS/4 kernel ?

The R3 code should ask if the operating system supports AVX.  If yes - R3 may decides to use AVX code.  I mean, that correctly  compiled and linked dll  will work  on OS/2 and OS/4 as well.

In OS/4  dll will use AVX code, on OS/2 will NOT use AVX code.

Issue happened because     OS/4 supports AVX  and reports about it to R3 apps,  but FFmpeg libs were generated wrongly  and  cannot use their own AVX code (wrong data alignment).

Of course it does not affect pure OS/2 system - R3 apps   do not see AVX support from OS  and even do try   to use AVX code.

AFAIK,  Igor somehow  generated  dlls  with proper alignments -  so they can use  their AVX code,  but it does not affect OS/2 system at all.

134
Applications / Re: [SOLVED] highmem.exe can't load xul.dll
« on: February 17, 2021, 09:05:44 pm »

135
Multimedia / Re: Updated Uniaud32 build
« on: January 24, 2021, 02:46:54 pm »
Uniaud32 logs record what the number of supported streams is, in a line like:
GetUniaudPcmCaps: pcm 0, cp2. nr of streams: 1

I'm interested to see if anyone has any hardware that has 'nr of streams' > 1 - most likely this would be SB Live! type hardware.

I have  got SB Audigy 1 [SB0092]. It reports:

Code: [Select]
GetUniaudPcmCaps: cp1. pcm 0, phandle e494dc84
GetUniaudPcmCaps: pcm 0, cp2. nr of streams: 32

5.10.10 works ok

Pages: 1 ... 7 8 [9] 10 11 ... 28