Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
62 user(s) are online (40 user(s) are browsing Forums)

Members: 0
Guests: 62

more...

Support us!

Headlines

 
  Register To Post  

« 1 2 3 (4) 5 6 7 8 »
Re: have you seen this?
Just can't stay away
Just can't stay away


See User information
@SinanSam460

YES!! with such change BeWorld sources run ok under my SAM460ex no allignment issues.

But fonts still aren't rendered correctly.

Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@jabirulo

Your gcc is ?? Here v11 and i have problem with allignment

Thanks

AmigaOS 4.1 Rulez
Resized Image
Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@HunoPPC

I also use gcc11. (Cross compiling on Ubuntu, amigagccondocker Docker image).

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@SinanSam460

And me on native machine, no cross compiling

I suppose a problem on compiler.

I waiting for solution for this problem

AmigaOS 4.1 Rulez
Resized Image
Go to top
Re: have you seen this?
Home away from home
Home away from home


See User information
@Huno
I think that this just a luck that alignment crash gone after Sinan's change. Alignment issues cant be fixed like this as this is ptoblem which need to be fixed by proper re-coding of some parts.

IMHO, at first game should work on x1000 with proper rendering, then fixing of alignment issues for real to make it works on x5k and co

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@kas1e

I completely agree with you Kas1e because we've been dealing with this kernel problem on x5000 for a while and it's starting to be really blocking on certain portings, I have a few games that have this problem

AmigaOS 4.1 Rulez
Resized Image
Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@all

I have tested this port on betatest machine and normal machine, he working just on x1000
Problem on SAM440, X5000/20 here

Best regards

HunoPPC

AmigaOS 4.1 Rulez
Resized Image
Go to top
Re: have you seen this?
Home away from home
Home away from home


See User information
Ok silly question, how about opening a ticket reporting the issue on their official github :)

Sam440ep Flex 800Mhz 160GB HD + AmigaOS 4.1
Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@samo79

Game is already running on Linux Power PC and MorphOS:

https://github.com/phoboslab/wipeout-rewrite/issues/56

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: have you seen this?
Home away from home
Home away from home


See User information
@SinanSam460

I mean for the alignment issues, kas1e said it need to be properly fixed by re-coding some parts

Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@samo79

The author of the code will close your ticket reporting with the description.
"...Works on all systems. Please report the cause of the problem to the AmigaOS4 developers..."

@all

But a lame question
The problem lies where ?
@HunoPPC wrote - Problem on SAM440
post #48 " Qemu SAM works....
@LiveForIt writes ... "And the textures should be 16bit under QEMU with current drivers, as that's all WB can display,
put perhaps its not working in 32bit, because its using 16bit textures."

On X1000 it works ... on a real Pegasos 2 and AmigaOne will also work ?

is there a problem with the library ? kernel ? - Linux PPC and Morphos works
I know , stupid question and I apologize , but I don't know enough about AOS4.

Go to top
Re: have you seen this?
Just can't stay away
Just can't stay away


See User information
@HunoPPC

#gcc -v
Using built-in specs.
COLLECT_GCC=/Devel/SDK/gcc/ppc-amigaos/bin/11.2.0/gcc
COLLECT_LTO_WRAPPER=/Devel/SDK/gcc/ppc-amigaos/bin/11.2.0/../libexec/gcc/ppc-amigaos/11.2.0/lto-wrapper
Target: ppc-amigaos
Configured with: /opt/adtools/gcc/repo/configure --with-bugurl=https://github.com/sba1/adtools/issues --with-pkgversion='adtools build 11.2.0' --host=ppc-amigaos --target=ppc-amigaos --disable-nls --prefix=/gcc --with-gmp=/opt/adtools/native-build/root-cross --with-mpfr=/opt/adtools/native-build/root-cross --with-mpc=/opt/adtools/native-build/root-cross --program-prefix=ppc-amigaos- --program-suffix=-11 --libexecdir=/gcc/libexec --enable-languages=c,c++ --enable-haifa --enable-sjlj-exceptions --disable-libstdcxx-pch --disable-tls --enable-threads=amigaos --enable-lto --disable-c++tools
Thread model: amigaos
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (adtools build 11.2.0)


Unarchived BeWorld sources to RAM:, added couple of 'defined(__amigaos4__)' and changed to "sdl_path_userdata = SDL_GetPrefPath("", "wipeout");" build and still working here.
I too thinik maybe is just luck how objects are linked, but ¿:-/

http://jabirulo.byethost13.com/temp/wipegame_BEWORLD.7z

Maybe is the way it "allocates memory" in mem.c/.h?

Can the "#pragna pack(whatever_value)" help/solve such allignment issue?


Edited by jabirulo on 2023/9/11 23:09:13
Edited by jabirulo on 2023/9/11 23:33:34
Edited by jabirulo on 2023/9/11 23:34:10
Edited by jabirulo on 2023/9/11 23:43:41
Edited by jabirulo on 2023/9/11 23:52:52
Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@jabirulo

Thanks for your exe i testing this evening

Problem of allignment is here:

https://github.com/phoboslab/wipeout-r ... /src/wipeout/object.c#L58

HunoPPC

AmigaOS 4.1 Rulez
Resized Image
Go to top
Re: have you seen this?
Home away from home
Home away from home


See User information
@smarkugs
Quote:

But a lame question
The problem lies where ?


The alignment issue is a pretty fat one, and CPU specific: "it consists of three separate but related issues: data alignment, data structure padding, and packing" (c) wiki. The issue happens not only on PPC CPUs, but also on ARM (so Pandora, Pyra): The ARM itself can access unaligned data, but coprocessor (so Floats and SIMD (they have Neon, like our Altivec/SPE/etc) ) cannot.

By default, PPC architecture (at least how it has written in the “green book”) does not allow _ANY_ unaligned access. Mean that 16 bit must be 16 bit aligned, 32 bit must be 32 bit aligned, etc. However, this rule may be relaxed by CPUs that actually implement the architecture. So, since most CPUs can do it, the compilers happily generate code that is doing unaligned accesses. In most cases, this works, sometimes it leads to slower access, but the _correct_ response would be an alignment exception (as we have on x5000).

So if we take into account Wipeout : it is a bug in the game, just, as often happens, it's on AmigaOS4 we find most of real bugs which just hide on other cpus/oses/drivers/kerneles/etc. So far to be seen what kind of alignment bug wipeout had: unaligned memory access, unaligned padding, unaligned packing or just mixture of them.

Also, some alignment issues still can be fixed by compiler by providing cpu options as well as -mno-strict-align / -mstrict-align (they on System V.4 and embedded PowerPC systems do not (do) assume that unaligned memory references are handled by the system). But again, it can deal with some alignment issues, but not with others (like accessing to unaligned floats).


An easy and good test case for checking unaligned floats (for example, as one of alignment issues) is:

#include <stdio.h>

int main(int argcchar **argv)
{
    
// Declare a 16-byte buffer, it will be aligned on 16 bytes
    
printf("A buffer contains the same 4-byte pattern at index 1 (unaligned) and 8 (aligned)\n");
    
char buffer[16] = {06012711358567601271135812131415};
    
volatile char ptr;

    
// Read the reference pattern at an aligned address (buffer + 8)
    
ptr buffer 8;
    
printf("Read the reference pattern at an aligned address (buffer + 8) (addr = %p)\n"ptr);
    
printf("float = %f\n", *(float *)ptr);

    
// Read the same pattern at an unaligned address (buffer + 1)
    
ptr buffer 1;
    
printf("Read the same pattern at an unaligned address (buffer + 1) (addr = %p)\n"ptr);
    
printf("float = %f\n", *(float *)ptr);

    return 
0;
}


This test case works on x1000, but didn't on x5000. And, it can be that X1000's PPC CPU do allow unaligned floating point access, for example, while X5000's one and Sam460's one didn't. But as i told before PPC cpus all should not allow unaligned access of any sort.

Back in times, when i port IrrlichtEngine to OS4, there were one loader in engine which do load MS3D meshes, which cause unalignment errors on x5000 for me. And so far, when i ask about issues with, the ppls in os4beta-list explain the things for me (the ones part of which i wrote above), and, Matthias (Corto), do fix it for me, that how the fix were looks like:

https://github.com/kas1e/Irrlicht/comm ... a3b6cc2ea571071a3edb1dcb8

So as can be seen, it's all can't be fixed like by change some line, it should be proper aligned data in the memory, as well as padding , as well as packing. And as i say this is the bug in wipeout and should be fixed.

One may ask: why we have no this issues on Linux PPC and on MorphOS - they may have some software emulation of unalined access in kernels (but it means make things be slower, and to be seen on what CPU wipeout works on linux ppc and morphos to have a proper answer about)

At least, that how i understand it all.


Edited by kas1e on 2023/9/12 6:48:23
Edited by kas1e on 2023/9/12 6:59:30
Edited by kas1e on 2023/9/12 7:03:54
Edited by kas1e on 2023/9/12 7:28:16
Edited by kas1e on 2023/9/12 7:34:23
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@kas1e

Thank you very much for the detailed explanation.
The code has to be improved for PPC according to the specification, some CPUs can handle it and some OSes have implemented the improvement to work properly and it can be partially fixed at compile level.


Can you tell me one more thing. ?
I have checked the test program on the G3 and G4 it seems that this problem does not occur.
I checked under Emulation but I don't know if this is reflected to the real hardware.
If the CPU allows unbalanced floating point access does this affect performance ? (another lame question )

As I understand the problem only applies to x5000 and Sam460 ... what about Tabor ( e500V2) ?

Thank you again very much for the big dose of knowledge

Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@kas1e

Thanks for explanation.

Can this be the cause of why some textures aren't displayed ?

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: have you seen this?
Home away from home
Home away from home


See User information
@SinanSam460

Some desktop PowerPC is more tolerant to alignment issues.
AMCC40x0 CPU’s are embedded chips, cut down versions of desktop CPU’s,

Alignment exceptions are present on PA-Semi / X1000 cpu’s as well AltiVec, and reverse endianness instructions.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: have you seen this?
Home away from home
Home away from home


See User information
@smarkusg
You test on real g3/g4 or emulated ones ? And with what os ?

And yes, fixing it on kernel level will make it slower in compare with original code fixes, but not sure if -that- slow to be noticed.

@Sinan
If textures works fine on x1000, then yes, if no, then no

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: have you seen this?
Not too shy to talk
Not too shy to talk


See User information
@kas1e

Currently QEMU emulation Pegasos 2 x86_64
I will check at home on the Apple M1

Go to top
Re: have you seen this?
Home away from home
Home away from home


See User information
@smarksugs
Emulation can easily deal with alignment issues by default.. But again, maybe G3/G4 and os4 kernel for peg2 are same forgiving for as x1000's cpu. I can check that all on all x1000,x5000,sam460,peg2 and winuae

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post
« 1 2 3 (4) 5 6 7 8 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project