Who's Online |
159 user(s) are online ( 84 user(s) are browsing Forums)
Members: 2
Guests: 157
Georg, cygnusEd,
more...
|
|
Headlines |
-
amiarcadia.lha - emulation/gamesystem
Mar 28, 2024
-
losmalditosdemo.lha - game/adventure
Mar 26, 2024
-
libfreetype.lha - development/library/graphics
Mar 25, 2024
-
ign-addon-ods.lha - office/spreadsheet
Mar 25, 2024
-
meminfo.lha - utility/hardware
Mar 25, 2024
-
libsdl2_ttf.lha - development/library/graphics
Mar 24, 2024
-
thf.lha - game/fps
Mar 24, 2024
-
amigagpt.lha - network/chat
Mar 24, 2024
-
liba52.lha - development/library/audio
Mar 23, 2024
-
libsdl2_mixer.lha - development/library/audio
Mar 23, 2024
|
|
|
|
Re: DevilutionX - Diablo 1
|
Posted on: 2019/8/22 7:17
#1
|
Just popping in
|
@kas1e
Sorry, I was unavailable and busy recently... Anyway, Artur contacted me directly on discord, he seems to be more experienced with porting so I provided him all my codes and information I had, I'm really glad he got into it coz I didn't have so much time recently. Anyway, feel free to compile it for OS4.1 as You already did, the most important is that someone got it working :) I think I will have some time now again, so I can focus on some other project. Thanks guys You got it working :)
|
|
|
|
Re: adtools
|
Posted on: 2019/5/16 10:22
#2
|
Just popping in
|
@salass00
Ah, I forgot this option, thanks ;)
|
|
|
|
Re: adtools
|
Posted on: 2019/5/16 8:42
#3
|
Just popping in
|
Hi fellows any idea what might cause this?
$ /usr/local/amiga/bin/ppc-amigaos-g++ -o hellocpp hello.cpp
/usr/local/amiga/lib/gcc/ppc-amigaos/8.2.0/../../../../ppc-amigaos/lib/libstdc++.a(ios_init.o): In function `__exchange_and_add_dispatch':
/home/pavel.bekesky/adtools/gcc/repo/libstdc++-v3/include/ext/atomicity.h:81: undefined reference to `__gthread_active_p'
/usr/local/amiga/lib/gcc/ppc-amigaos/8.2.0/../../../../ppc-amigaos/lib/libstdc++.a(ios_init.o): In function `__atomic_add_dispatch':
/home/pavel.bekesky/adtools/gcc/repo/libstdc++-v3/include/ext/atomicity.h:95: undefined reference to `__gthread_active_p'
/usr/local/amiga/lib/gcc/ppc-amigaos/8.2.0/../../../../ppc-amigaos/lib/libstdc++.a(ios_init.o): In function `__exchange_and_add_dispatch':
/home/pavel.bekesky/adtools/gcc/repo/libstdc++-v3/include/ext/atomicity.h:81: undefined reference to `__gthread_active_p'
/usr/local/amiga/lib/gcc/ppc-amigaos/8.2.0/../../../../ppc-amigaos/lib/libstdc++.a(locale.o): In function `__gnu_cxx::__mutex::~__mutex()':
/home/pavel.bekesky/adtools/gcc/repo/libstdc++-v3/include/ext/concurrence.h:142: undefined reference to `__gthread_active_p'
/home/pavel.bekesky/adtools/gcc/repo/libstdc++-v3/include/ext/concurrence.h:143: undefined reference to `__gthread_mutex_destroy'
/usr/local/amiga/lib/gcc/ppc-amigaos/8.2.0/../../../../ppc-amigaos/lib/libstdc++.a(locale.o): In function `__gnu_cxx::__mutex::unlock()':
/home/pavel.bekesky/adtools/gcc/repo/libstdc++-v3/include/ext/concurrence.h:161: undefined reference to `__gthread_active_p'
I had to reinstall adtools in cygwin and I'm getting this when trying to recompile simple hello world code:
#include <iostream>
using std::cout;
using std::endl;
int main()
{
std::cout << "Hello cross-compiled c++ World!" << endl;
}
C lang code with gcc works fine... thanks
|
|
|
|
Re: Porting to AmigaOS4 thread
|
Posted on: 2019/2/23 8:45
#4
|
Just popping in
|
Any idea how to deal with lseek() method? I need to offset filepointer by bytes to create new file with specific amount in size but the lseek result ends up with -1. If I don't specify offset bytes, the file is created correctly but the size is incorrect as it needs to be this is from lseek() method specs: Quote: The lseek() function allows the file offset to be set beyond the end of the existing end-of-file of the file. If data is later written at this point, subsequent reads of the data in the gap return bytes of zeros (until data is actually written into the gap).
Some devices are incapable of seeking. The value of the pointer associ- ated with such a device is undefined.
|
|
|
|
Re: DevilutionX - Diablo 1
|
Posted on: 2019/2/18 9:19
#5
|
Just popping in
|
@kas1e Another reason to finish this up :)
I'm in touch with DevilutionX developers, there want to support big endian platforms, so yes, I will upload my changes later on. They also made jokes that that will have AmigaOS port done faster than Apple's :)
|
|
|
|
Re: DevilutionX - Diablo 1
|
Posted on: 2019/2/18 7:27
#6
|
Just popping in
|
@kas1e
ah, I didn't know about that at all, so really good to know... I will also make a note for future projects :) thanks
By the way, encoding is resolved, it is going forward slowly, but there is at least some progress :)
|
|
|
|
Re: DevilutionX - Diablo 1
|
Posted on: 2019/2/16 12:09
#7
|
Just popping in
|
@RIBDEVIL
Now it mainly depends on how fast I will be able to resolve Run-Length Encoding (RLE) on big-endian platform...
Anyone worked with that already on some project? :)
|
|
|
|
Re: DevilutionX - Diablo 1
|
Posted on: 2019/2/15 21:29
#8
|
Just popping in
|
|
|
|
|
Re: Porting to AmigaOS4 thread
|
Posted on: 2019/2/13 14:15
#9
|
Just popping in
|
@Raziel
I think it is great idea, I will also find it handy That wstring issue... I'm also dealing with it at the moment in one project, but no solution so far
|
|
|
|
Re: DevilutionX - Diablo 1
|
Posted on: 2019/2/11 21:50
#10
|
Just popping in
|
What is the correct way for memory allocation? I'm sorry if it was already discussed in some other thread, I just can't find proper answer.. I'm not 100% sure how it works but I will try to describe my concern Lets say I need to open a file, so I will allocate needed memory size with malloc function and load the file into the memory. Now I need to decode the content in memory so I need to use some operations like swap some bytes etc. Is it OK to use malloc operation for this purpose regarding memory protection or should AllocVecTags() be used instead? Devilution goes to GR in following function, I'm trying to understand what is going on and memory protection comes to my mind as possible issue
void __fastcall CelDrawDatOnly(char *pDecodeTo, char *pRLEBytes, int dwRLESize, int dwRLEWdt)
{
char *v4; // esi
char *v5; // edi
int v6; // edx
unsigned int v7; // eax
unsigned int v8; // ecx
char v9; // cf
unsigned int v10; // ecx
char *v11; // [esp+4h] [ebp-8h]
v11 = pRLEBytes;
if ( pDecodeTo && pRLEBytes )
{
v4 = pRLEBytes;
v5 = pDecodeTo;
do
{
v6 = dwRLEWdt;
do
{
while ( 1 )
{
v7 = static_cast<unsigned char>(*v4++);
if ( (v7 & 0x80u) == 0 )
break;
_LOBYTE(v7) = -(char)v7;
v5 += v7;
v6 -= v7;
if ( !v6 )
goto LABEL_14;
}
v6 -= v7;
v8 = v7 >> 1;
if ( v7 & 1 )
{
*v5++ = *v4++; ///<<<<<<<<<<<<<< Grim Reaper
if ( !v8 )
continue;
}
v9 = v8 & 1;
v10 = v7 >> 2;
if ( v9 )
{
*(_WORD *)v5 = *(_WORD *)v4;
v4 += 2;
v5 += 2;
if ( !v10 )
continue;
}
qmemcpy(v5, v4, 4 * v10);
v4 += 4 * v10;
v5 += 4 * v10;
}
while ( v6 );
LABEL_14:
v5 += -dwRLEWdt - 768;
}
while ( &v11[dwRLESize] != v4 );
}
}
Thanks
|
|
|
|
Re: adtools
|
Posted on: 2019/2/10 15:55
#11
|
Just popping in
|
@kas1e
I think it is is pretty clear now, I'm already working on the devilutionX... the speed is kinda different as You said :D
thanks a lot
|
|
|
|
Re: adtools
|
Posted on: 2019/2/10 6:56
#12
|
Just popping in
|
Finally I got the crosscompiler working after two days of installations, reinstallations debugging etc...
Now maybe little stupid questions, but... Include files the project I'm trying to compile needs, like SDL,GL etc, should I install them with cygwin installator or download the libs from os4depot and put them to crosscompiler directory somewhere? Also Cmake on amiga has it's own platform specification file.. should I use this one, default one that it is using by default or write new one? Are there any simple tutorials for this maybe? It would be handy for beginners like me to see the correct process steps.
Thanks
|
|
|
|
Re: adtools
|
Posted on: 2019/2/7 20:11
#13
|
Just popping in
|
@kas1e
Found Your guide on os4coding so I will going through I wonder however, how is debugging working ? I will probably see soon enough :)
|
|
|
|
Re: adtools
|
Posted on: 2019/2/7 19:35
#14
|
Just popping in
|
@kas1e
Indeed, I probably messed up the libraries while experimenting, I will rather reinstall it. I'm in AmigaOS, using abc-shell, cmake, sdk and adtools it looked as best option to me... Downloaded latest adtools package available which gives me version 8.1.0, but I will double check that I don't have crosscompile environment set up but is seems to be better option as I can see thanks for the linking line :)
|
|
|
|
Re: adtools
|
Posted on: 2019/2/7 16:52
#15
|
Just popping in
|
I got those gthread errors while compiling DevilutionX, so I added -athread=native -lpthreads flags and now I got this:
[ 2%] Linking CXX executable devilution
ld: cannot find gthr-amigaos-native.o: No such file or directory
ld: Warning: alignment 4 of symbol `channel' in CMakeFiles/devilution.dir/Stub/sound.cpp.obj is smaller than 8 in /SDK/local/newlib/lib/libSDL2_mixer.a(playmidi.o)
gmake[2]: *** [devilution] Error 1
gmake[1]: *** [CMakeFiles/devilution.dir/all] Error 2
gmake: *** [all] Error 2
the library is present in GCC:lib/gcc/ppc-amigaos/8.1.0/ I also tried it to link it to gcc:lib and /SObjs, include the folder with -L flag but now use... Actually I got error about missing lgcc library, I linked it into GCC:lib folder and now it needs gthr-amigaos-native.o which is unable to find.
|
|
|
|
Re: adtools
|
Posted on: 2019/2/6 10:31
#16
|
Just popping in
|
@kas1e
I think I will stay with newlib,it was build previously succesfully and when You wrote adtools can be safely used with newlib, I don't see any reason to move to clib then :)
|
|
|
|
Re: adtools
|
Posted on: 2019/2/6 10:17
#17
|
Just popping in
|
@kas1e
I have makefiles already generated by cmake with SDK's version of GCC so I will probably try to just modift it for adtools and see how it goes and I will stick with newlib then :)
|
|
|
|
Re: DevilutionX - Diablo 1
|
Posted on: 2019/2/6 9:59
#18
|
Just popping in
|
Is anyone willing to help me with debugging? Since this is my first project, I'm not so experienced with this stuff so it could help to speed it up a lot.
Feel free to send me pm or by email if interested, thanks :)
|
|
|
|
Re: adtools
|
Posted on: 2019/2/6 9:54
#19
|
Just popping in
|
@all
It helped with my code, it now works as it should.
I will try to recompile the DevilutionX code, but it uses cmake which is hardcoded to use newlib while adtools should be used by clib2, I wonder if that might be an issue or not. No idea if cmake is compatible with clib as well
Thanks with adtools configuration :)
|
|
|
|
Re: adtools
|
Posted on: 2019/2/5 21:37
#20
|
Just popping in
|
@salass00 @kas1e Thanks, I'm on it )
|
|
|
|