Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
73 user(s) are online (56 user(s) are browsing Forums)

Members: 1
Guests: 72

nbache, more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 8 9 10 (11) 12 13 14 ... 22 »
Re: Porting to AmigaOS4 thread
Quite a regular
Quite a regular


See User information
I'm at the limit of my understanding but...

@Raziel

Link library to Amiga shared library is not a compilation issue, more like a "translation" job for which there is unlikely to be a software solution. The assumptions required of each don't seem to match.

Even the header files look quite different, at least to me. One factor maybe that the commonly used variety is intended to work both within an executable file and loaded separately. This is rather on the OS level (AmigaOS 4: a mention of "shared object" in elf.library). Before the program runs one line. Amiga libraries are "opened" by the program and the OS only complies.

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Thematic

Yes, i know, this was a total noob question, since i never tried or done anything like this.

In the meantime i learned, that it need to be done with
IDLTool and the help of an .xml file to create a skeleton which the .a/.so library is "linked" in somewhat.

Thats about all i know

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
Another noob question:

Address Sanitizer or (-l)asan should be available since gcc 4.8.

It doesn't work though
Quote:

Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: cannot find -lasan


Is it the same case as with -lto, that it has to be turned on in our gcc builds, or do we have to have the corresponding library first to use it in compiling?

Sounds like a really good addition to me and if we could get it, i'd vouche for it.

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@kas1e

Can you tell me if that crash is one of those dos.library not open type ones?
Crash log for task "ScummVM_SDL2_Shared"
Generated by GrimReaper 53.19
Crash occured in module libstdc
++.so at address 0x7C33C6E4
Type of crash
DSI (Data Storage Interruptexception
Alert number
0x80000003

Register dump
:
GPR (General Purpose Registers):
   
07C33809C 4995A300 3D408000 49666584 00000000 00000006 4963E10C 49E16798 
   8
49666584 49E16798 4995A348 00000008 000007A8 4966E398 00000000 4E74D340 
  16
7CAD3EE0 00000000 4F8F7010 4E01E7C8 02B30000 02B30000 00000000 00000001 
  24
6FF8C180 00000001 49E158D0 49666584 4963EFDC 00000000 496639F4 4B9E3E68 


FPR 
(Floating Point RegistersNaN Not a Number):
   
0:              nan                0                0                0 
   4
:                0               -1                1              0.5 
   8
:              300             0.04                0       4.5036e+15 
  12
:              480                0                0                0 
  16
:                0                0                0                0 
  20
:                0                0                0                0 
  24
:                0                0                0                0 
  28
:                0                0                0               -

FPSCR 
(Floating Point Status and Control Register): 0x82008000


SPRs 
(Special Purpose Registers):
           
Machine State (msr) : 0x0200B030
                Condition 
(cr) : 0x4B6C1AB4
      Instruction Pointer 
(ip) : 0x7C33C6E4
       Xtended Exception 
(xer) : 0x4AA64018
                   Count 
(ctr) : 0x6FF494D0
                     Link 
(lr) : 0x7FAE9920
            DSI Status 
(dsisr) : 0x4AA63DD0
            Data Address 
(dar) : 0x021AD048



680x0 emulated registers
:
DATA96F04E00 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
ADDR
6FFB8700 96BC5B00 00000000 00000000 00000000 00000000 00000000 49959CA0 
FPU0
:                0                0                0                0 
FPU4
:                0                0                0                0 



Symbol info
:
Instruction pointer 0x7C33C6E4 belongs to module "libstdc++.so" (PowerPC
Symbol_ZNK10__cxxabiv120__si_class_type_info12__do_dyncastEiNS_17__class_type_info10__sub_kindEPKS1_PKvS4_S6_RNS1_16__dyncast_resultE 0xEC in section 11 offset 0x000068E4

Stack trace
:
    
Games:ScummVM/sobjs/libstdc++.so:_ZNK10__cxxabiv120__si_class_type_info12__do_dyncastEiNS_17__class_type_info10__sub_kindEPKS1_PKvS4_S6_RNS1_16__dyncast_resultE()+0xec (section 11 0x68E4)
    
Games:ScummVM/sobjs/libstdc++.so:__dynamic_cast()+0x94 (section 11 0x229C)
    
module ScummVM_SDL2_Shared at 0x7CC2E000 (section 4 0x2C5FDC)
    
module ScummVM_SDL2_Shared at 0x7CC2D048 (section 4 0x2C5024)
    
module ScummVM_SDL2_Shared at 0x7CC2D370 (section 4 0x2C534C)
    
module ScummVM_SDL2_Shared at 0x7CC2CDD4 (section 4 0x2C4DB0)
    
module ScummVM_SDL2_Shared at 0x7CC2D370 (section 4 0x2C534C)
    
module ScummVM_SDL2_Shared at 0x7CC2CDD4 (section 4 0x2C4DB0)
    
module ScummVM_SDL2_Shared at 0x7CC2E230 (section 4 0x2C620C)
    
module ScummVM_SDL2_Shared at 0x7CC59BF0 (section 4 0x2F1BCC)
    
module Games:ScummVM/plugins/libtitanic.so at 0x79A90450 (section 0 0x1ACC40)
    
module Games:ScummVM/plugins/libtitanic.so at 0x79A9A55C (section 0 0x1B6D4C)
    
module Games:ScummVM/plugins/libtitanic.so at 0x79A99160 (section 0 0x1B5950)
    
module Games:ScummVM/plugins/libtitanic.so at 0x79A98F2C (section 0 0x1B571C)
    
module Games:ScummVM/plugins/libtitanic.so at 0x79AA1C34 (section 0 0x1BE424)
    
module Games:ScummVM/plugins/libtitanic.so at 0x79AA0638 (section 0 0x1BCE28)
    
module Games:ScummVM/plugins/libtitanic.so at 0x798F5D54 (section 0 0x12544)
    
module Games:ScummVM/plugins/libtitanic.so at 0x798FA24C (section 0 0x16A3C)
    
module Games:ScummVM/plugins/libtitanic.so at 0x798FA420 (section 0 0x16C10)
    
module ScummVM_SDL2_Shared at 0x7CAD5660 (section 4 0x16D63C)
    
module ScummVM_SDL2_Shared at 0x7CAD69CC (section 4 0x16E9A8)
    
module ScummVM_SDL2_Shared at 0x7CAD4144 (section 4 0x16C120)
    
native kernel module newlib.library.kmod+0x000020a4
    native kernel module newlib
.library.kmod+0x00002d0c
    native kernel module newlib
.library.kmod+0x00002ee8
    ScummVM_SDL2_Shared
:_start()+0x170 (section 11 0x1AB8)
    
native kernel module dos.library.kmod+0x000255c8
    native kernel module kernel
+0x000420ac
    native kernel module kernel
+0x000420f4

PPC disassembly
:
 
7c33c6dc8361002c   lwz               r27,44(r1)
 
7c33c6e07c0803a6   mtlr              r0
*7c33c6e4816b001c   lwz               r11,28(r11)
 
7c33c6e883810030   lwz               r28,48(r1)
 
7c33c6ec83a10034   lwz               r29,52(r1)

System information:

CPU 
 Model
P.ASemi PWRficient PA6T-1682M VB1 
 CPU speed
1800 MHz 
 FSB speed
900 MHz 
 Extensions
altivec 

Machine 
 Machine name
AmigaOne X1000 
 Memory
2097152 KB 
 Extensions
bus.pci bus.pcie

And if yes, how can i determine it?
Just because dos.library is mentioned after _start() in the stack trace?

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Raziel
Quote:

Address Sanitizer

That one need llvm/clang and stuff

Quote:

And if yes, how can i determine it?
Just because dos.library is mentioned after _start() in the stack trace?


Usually when i see dos.library in stack trace and dar are 0x00000000, then yes. But in your example DAR seems different.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@kas1e

Ah, ok, thanks

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@all

Im trying to port a game engine that doesn't feature sound yet.

Though MorphOS does integrate it like this:
case AUDIO_S16MSB
format_str="S16MSB"
audioConfig.format AUDIO_FLOAT32_SIGNED_LSB;
audioConfig.bytesPerSample 4;
break;

While it compiles i get a crash on starting the game:
Crash log for task "cosmo_amigaos4"
Generated by GrimReaper 53.19
Crash occured in module cosmo_amigaos4 at address 0x7C5B6E20
Type of crash
DSI (Data Storage Interruptexception
Alert number
0x80000003

Register dump
:
GPR (General Purpose Registers):
07C5B8888 3AB1FC50 00000006 00000000 00000038 39AA52E0 295D4000 000D1F8F
8
00000001 00000000 00000008 000D35D7 000F4240 39A8DEB8 00000000 4DC5F680
16
7C4D8CB0 00000000 4CF5D280 39A6E098 02B30000 02B30000 00000000 00000001
24
6FF8C180 00000001 00003E68 3325FFB8 00000038 00000000 00000000 FFFFFFFF

FPR 
(Floating Point RegistersNaN Not a Number):
0nan -5.31401e+303 2.90111e+257 nan
4
: -5.31401e+303 -5.31401e+303 400 200
8
0 640 320 4.5036e+15
12
4.5036e+15 2.14748e+09 0 0
16
0 0 0 0
20
0 0 0 0
24
0 0 0 0
28
0 0 0 0

FPSCR 
(Floating Point Status and Control Register): 0x82004000

SPRs 
(Special Purpose Registers):
Machine State (msr) : 0x0200B030
Condition 
(cr) : 0x4870E064
Instruction Pointer 
(ip) : 0x7C5B6E20
Xtended Exception 
(xer) : 0x34979018
Count 
(ctr) : 0x6FF494D0
Link 
(lr) : 0x7FAE9920
DSI Status 
(dsisr) : 0x34978DD0
Data Address 
(dar) : 0x021AD048

680x0 emulated registers
:
DATA98F7A000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ADDR
6FFB8700 98B43100 00000000 00000000 00000000 00000000 00000000 3AB1F730
FPU0
0 0 0 0
FPU4
0 0 0 0

Symbol info
:
Instruction pointer 0x7C5B6E20 belongs to module "cosmo_amigaos4" (PowerPC)
Symbol_Mix_remove_all_effects 0x24 in section 1 offset 0x000E6DFC

Stack trace
:
cosmo_amigaos4:_Mix_remove_all_effects()+0x24 (section 1 0xE6DFC)
cosmo_amigaos4:Mix_PlayChannelTimed()+0x1c4 (section 1 0xE8864)
cosmo_amigaos4:_Z8play_sfxi()+0xd0 (section 1 0x2C4FC)
cosmo_amigaos4:_Z9main_menuv()+0x238 (section 1 0x12FC0)
cosmo_amigaos4:main()+0x84 (section 1 0x8D10)
native kernel module newlib.library.kmod+0x000020a4
native kernel module newlib
.library.kmod+0x00002d0c
native kernel module newlib
.library.kmod+0x00002ee8
cosmo_amigaos4
:_start()+0x170 (section 1 0x1AB8)
native kernel module dos.library.kmod+0x000255c8
native kernel module kernel
+0x000420ac
native kernel module kernel
+0x000420f4

PPC disassembly
:
7c5b6e1893e1001c stw r31,28(r1)
7c5b6e1c41820074 beq0x7C5B6E90
*7c5b6e2083dc0000 lwz r30,0(r28)
7c5b6e247c7d1b78 mr r29,r3
7c5b6e28
2f9e0000 cmpwi cr7,r30,0


my make file is:
CXX        =    g++
CXXFLAGS=    -Wall -Wextra -`sdl2-config --cflags --static-libs\
                
-std=gnu++11 -I/sdk/local/newlib/include/sdl2
SDL_LIBS
=    `sdl2-config --static-libs\
            
-lSDL2_mixer -lflac -lvorbisfile -lvorbis -logg -lmikmod \
            
-lsmpeg2 -lmodplug \
            
-lSDL2main -lSDL2

OBJS    
=    src/actor.c src/actor.h src/main.c src/player.c src/player.h \
            src
/game.h src/game.c src/palette.c src/palette.h src/util.h \
            src
/util.c src/map.c src/map.h src/defines.h src/input.c \
            src
/input.h src/dialog.c src/dialog.h src/tile.c src/tile.h \
            src
/files/vol.c src/files/vol.h src/files/file.c \
            src
/files/file.h src/video.c src/video.h src/sound/music.c \
            src
/sound/music.h src/backdrop.c src/backdrop.h src/save.c \
            src
/save.h src/status.c src/status.h src/actor_worktype.c \
            src
/actor_worktype.h src/effects.c src/effects.h \
            src
/actor_collision.c src/actor_collision.h src/actor_toss.c \
            src
/actor_toss.h src/font.c src/font.h src/sound/sfx.c \
            src
/sound/sfx.h src/sound/audio.c src/sound/audio.h \
            src
/platforms.c src/platforms.h src/sound/opl.c \
            src
/sound/opl.h src/fullscreen_image.c src/fullscreen_image.h \
            src
/cartoon.c src/cartoon.h src/b800_font.h src/config.c \
            src
/config.h src/high_scores.c src/high_scores.h src/demo.c \
            src
/demo.h src/b800.c src/b800.h

cosmo_amigaos4
: $(OBJS)
        $(
CXX) $(LDFLAGS) -$@ $(OBJS) $(SDL_LIBS) -lm -lz -lpthread

clean
:
    
rm -f src/*.o cosmo_amigaos4


Any ideas?
Any noob stuff i have overlooked again?

See also this thread

Thank y'all

Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
Does it work if you compile without audio?
Just add to audio.c a "return;" and compile:
...
void audio_init()
{
audioConfig.enabled = false;
return;
...

Here it works then fine (no audio), so maybe is some kind of problems with audio not correctly initialized or dunnot.


Try with this Makefile I modified from MorphOS version to use amigaso4 g++:

TARGET cosmo

LIBS 
= -athread=native -lSDL2_image -ltiff -lwebp -lpng -ljpeg -lz -lm -lSDL2_mixer -lmikmod -lmodplug -lFLAC -lsmpeg2 -lvorbisfile -lvorbis -logg -lSDL2 -lpthread
INCS 
= -Wall -gstabs -ISDK:Local/newlib/include/SDL2 -D__AMIGADATE__=\"`c:date LFORMAT %d.%m.%Y`\" -D__MORPHOS__


.SRCS   =               src/actor.c \
                        src
/main.c \
                        src
/player.c \
                        src
/game.c src/palette.c src/util.c \
                        src
/map.c src/input.c src/dialog.c src/tile.c \
                        src
/files/vol.c src/files/file.c src/video.c \
                        src
/sound/music.c src/backdrop.c src/save.c \
                        src
/status.c src/actor_worktype.c \
                        src
/effects.c src/actor_collision.c src/actor_toss.c \
                        src
/font.c src/sound/sfx.c src/sound/audio.c \
                        src
/platforms.c src/sound/opl.c src/fullscreen_image.c \
                        src
/cartoon.c src/config.c src/high_scores.c \
                        src
/demo.c src/b800.

OBJS 
= $(.SRCS:.c=.o)

%.
o: %.
    ppc
-amigaos-g++ -O2 --$@ $< -Isrc $(INCS)

all: $(TARGET)

clean:
    -
rm -$(TARGET) $(OBJS

$(
TARGET): $(OBJS)
    
ppc-amigaos-g++ -O2 -$(TARGET) $(OBJS) $(LIBS)

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@jabirulo

Yes, it even plays without audio, but the idea is to get audio working

Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
try this fast ugly recompile:
[EDIT: removed link]

I build under amigaos4 no crosscompiler was used (or harmed)


Edited by jabirulo on 2020/6/30 9:09:25
Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@jabirulo

That works with sound, cool

Could you share your code changes to the github thread, please?

Also the Makefile seems to be from a completely different project...SDLPop and bin is called "prince", the objects doesn't match either...did that really work for you or was it an oversight?

And the game is still being sold, so you should probably remove the link.

Go to top
Re: Porting to AmigaOS4 thread
Not too shy to talk
Not too shy to talk


See User information
@Raziel

Quote:

Address Sanitizer or (-l)asan should be available since gcc 4.8.

It doesn't work though
Quote:


Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: cannot find -lasan



Is it the same case as with -lto, that it has to be turned on in our gcc builds, or do we have to have the corresponding library first to use it in compiling?

Sounds like a really good addition to me and if we could get it, i'd vouche for it.


Sanitizers are fantastic tools! I use them as soon as I can (they made me able to send patches to ResidualVM codebase).

Unfortunately, on PPC, even on Linux, their support is not working AFAIK. The libasan is found but that crashes at execution.

I don't remember if I tried with clang (maybe I had other problems to get it working correctly, even without sanitizer options).

I should test again and provide a status.

Edit: Right now, I've just tested on Ubuntu 16.04 PPC with gcc 5.4 and got a valid error detected and reported by the asan sanitizer.


Edited by corto on 2020/6/30 10:23:42
Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
@Raziel

I used BeWorld github sources, so no changes, just added -D__MORPHOS__ to use BeWorld changes.

Oops I thought it was the shareware version/datas I was using.

Double ooops, use the makefile I put a few posts above, I added by mistake the one from PrinceOfPersia

EDIT:
just a few changes (with #ifdef __amigaos4__) in:
#search src/#? all __amigaos4__ quiet
Devel:SDK/ejemplos/cca/cosmo-engine-master/src/video.c
Devel:SDK/ejemplos/cca/cosmo-engine-master/src/video.h
Devel:SDK/ejemplos/cca/cosmo-engine-master/src/main.c
Devel:SDK/ejemplos/cca/cosmo-engine-master/src/input.h
Devel:SDK/ejemplos/cca/cosmo-engine-master/src/config.c
Devel:SDK/ejemplos/cca/cosmo-engine-master/src/files/vol.c
#

http://jabirulo.byethost13.com/temp/cosmo/cosmo_amigaos4.7z
(removed data files, only exec and BeWorld sources + changes)


Edited by jabirulo on 2020/6/30 11:25:58
Edited by jabirulo on 2020/6/30 12:39:42
Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
There si a linker error i'm getting and since the code is adapted from MorphOS i'd like you epople to show me the errors.

Thank you

The error is
Quote:

backends/libbackends.a(amigaos-dialogs.o): In function `Common::DialogManager::~DialogManager()':
./common/dialogs.h:60: undefined reference to `AmigaOSDialogManager::utf8ToLocal(char*)'
./common/dialogs.h:60: undefined reference to `IAsl'
gmake: *** [scummvm] Error 1


The two source files in question are those:

amigaos-dialogs.cpp
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
#define FORBIDDEN_SYMBOL_EXCEPTION_strdup
#include "common/scummsys.h"

#if defined(__amigaos4__) && defined(USE_SYSDIALOGS)

#include "backends/dialogs/amigaos/amigaos-dialogs.h"

#include "common/config-manager.h"
#include "common/encoding.h"

#include <proto/asl.h>
#include <proto/dos.h>
#include <proto/exec.h>

Common::DialogManager::DialogResult AmigaOSDialogManager::showFileBrowser(const Common::U32String &titleCommon::FSNode &choicebool isDirBrowser) {

    
DialogResult result kDialogCancel;
    
char pathBuffer[MAXPATHLEN];
    
Common::String utf8Title title.encode();
    
struct Library *AslBase IExec->OpenLibrary(AslName39);

    if (
AslBase) {

        
struct FileRequester *fr NULL;

        if (
ConfMan.hasKey("browser_lastpath")) {
            
strncpy(pathBufferConfMan.get("browser_lastpath").c_str(), sizeof(pathBuffer) - 1);
        }

        
fr = (struct FileRequester *)IAsl->AllocAslRequestTags(ASL_FileRequestTAG_DONE);

        if (!
fr)
            return 
result;

        
char *newTitle utf8ToLocal((char *)utf8Title.c_str());

        if (
IAsl->AslRequestTags(frASLFR_TitleText, (APTR)newTitleASLFR_RejectIconsTRUEASLFR_InitialDrawer, (APTR)pathBufferASLFR_DrawersOnly, (isDirBrowser TRUE FALSE), TAG_DONE)) {

            if (
strlen(fr->fr_Drawer) < sizeof(pathBuffer)) {
                
strncpy(pathBufferfr->fr_Drawersizeof(pathBuffer));
                if (!
isDirBrowser) {
                    
IDOS->AddPart(pathBufferfr->fr_Filesizeof(pathBuffer));
                }
                
choice Common::FSNode(pathBuffer);
                
ConfMan.set("browser_lastpath"pathBuffer);
                
result kDialogOk;
            }
        }

        
free(newTitle);
        
IAsl->FreeAslRequest((APTR)fr);
        
IExec->CloseLibrary(AslBase);
    }

    return 
result;
}

#endif


amigaos-dialogs.h
#ifndef BACKEND_AMIGAOS_DIALOGS_H
#define BACKEND_AMIGAOS_DIALOGS_H

#if defined(__amigaos4__) && defined(USE_SYSDIALOGS) 

#include "common/fs.h"
#include "common/dialogs.h"

class AmigaOSDialogManager : public Common::DialogManager {
public:
    
virtual DialogResult showFileBrowser(const Common::U32String &titleCommon::FSNode &choicebool isDirBrowser);

private:
    
char *utf8ToLocal(char *in);
};

#endif

#endif // BACKEND_AMIGAOS_DIALOGS_H


I changed two instances of "IPTR" to "APTR" in this line in amigaos-dialogs.cpp, since "IPTR" gave me an undefined reference as well and because "APTR" is used further down in the "free" block, so i probably messed it up there. It compiled, but i don't really what i'm doing.

Original line
if (IAsl->AslRequestTags(fr, ASLFR_TitleText, (IPTR)newTitle, ASLFR_RejectIcons, TRUE, ASLFR_InitialDrawer, (IPTR)pathBuffer, ASLFR_DrawersOnly, (isDirBrowser ? TRUE : FALSE), TAG_DONE))

Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
@Raziel

IAsl: include <proto/asl.h> in the .cpp using IAsl.

utf8ToLocal: you need to add implementation in the .cpp file. Was it a MorphOS related function?

IPTR: what are the types for "pathBuffer" and "newTitle"? Is cast to APTR even necessary? EDIT: okay, types seem to be char[] and char*. Try without (APTR)?

I don't have the ASL autodoc at hand but you can check what are the expected types for these tags.

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Capehill

IAsl: I have, see amigaos-dialogs.cpp, line 14

utf8ToLocal: MorphOS uses #include <proto/charsets.h>, but i don' t have that

IPTR: I removed the "PTR in the round brackets completely and it compiled, still the same error though, guess it's because of the missing or borked charsets

Here is the original MorphOS implementation:
https://github.com/scummvm/scummvm/pull/2574/files

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Raziel
Quote:

IAsl: I have, see amigaos-dialogs.cpp, line 14

But error come from dialog.h (not .cpp), so probabaly just include in dialog.h ?

Also, if you want to just use morphos's code, its better to add at the top of file #define __USE_INLINE__ 1, and then no needs to worry about IASL-> and stuff.

Quote:

utf8ToLocal:


It's in the __MORPHOS__ part, see:

char *MorphosDialogManager::utf8ToLocal(char *in) {

    if (!
in) {
        return 
strdup("");
    }



Quote:

IPTR: I removed the "PTR in the round brackets completely and it compiled, still the same error though, guess it's because of the missing or borked charsets


For IPTR i always use that:

typedef unsigned long IPTR;


Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
@Raziel

Not sure, but don't you need to add IAsl interface opening?
(just after opening the asl.library)

struct AslIFace *IAsl = NULL;
...
struct Library *AslBase = OpenLibrary("asl.library", 50);
IAsl = (struct AslIFace*)GetInterface(AslBase, "main", 1, NULL);
...
and close'em:
DropInterface((struct Interface*)IAsl);
CloseLibrary(AslBase);

Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
@jabirulo

He could open asl.library and get the interface but on the other hand linking with -lauto should handle it as well.

So inluding proto/asl.h and linking with -lauto should do it.

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Capehill

using -lauto and using OpenLibrary can course library to opened twice, as result you can get issue with library open count for etch library, it can course as temporary solution, but should be replaced in the final build.

I had this issue in Basilisk that caused sata device to be closed to many times. This is of course really bad, because the device can risk being unloaded from memory. (You had to run Basilisk maybe 8 times before bad things happened.)


Edited by LiveForIt on 2020/11/16 22:01:07
Edited by LiveForIt on 2020/11/16 22:02:08
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top

  Register To Post
« 1 ... 8 9 10 (11) 12 13 14 ... 22 »

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project