Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

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

Members: 1
Guests: 71

trixie, more...

Headlines

Forum Index


Board index » All Posts (thellier)




Re: Finding where a .library is allocated in memory ?
Not too shy to talk
Not too shy to talk


Thanks
But no no I dont want know where is the LibraryBase but where the library code is

Alain

Go to top


Finding where a .library is allocated in memory ?
Not too shy to talk
Not too shy to talk


Hello

I have maded a .library but I encounters various crashes
After lots of investigations (including Enforcer on WinUAE)
I suppose now that library code is trashed at some moment so causing crash some time after

So my goal is to check periodically the .library "integrity"
So my idea :
Make a copy of the .library memory block
Check the changes original vs copy periodically
So find when the trashing happen

So the question : How can I find where a .library is allocated in memory ??

Thank

Alain Thellier

Go to top


Re: AmiDARK Engine Sources for sale
Not too shy to talk
Not too shy to talk


>I don't do semi-colons.

AmiDarkEngine is C based so you can easily create macros to add semi-colons

Like this
#define DARKfunction(a,b,c) AMIDARKfunction((a),(b),(c));


Alain

Go to top


Re: Docs about creating an ARexx support library ???
Not too shy to talk
Not too shy to talk


@Chris
Many Thanks for your sources

@BroadBlues
I will release the arexx part as free source when I will be sure that it works ok (including my OS4 ppc stub that was working).

Alain Thellier

Go to top


Re: Docs about creating an ARexx support library ???
Not too shy to talk
Not too shy to talk


Thanks to all
>See proper ARexx header file for "struct RexxMsg" definition.
>See [...] rexxsyslib.library/CreateArgstring().

Yes i have readed that
1) parameters send from Arexx seems to be OK from Microbe3D side when I print them
For example if I read a 3D object I receive the Scene pointer (3d context) and filename ... but it crash
2) I have implemented the "return two values in D0 and A0/A1" thing but I am not sure it is OK (but Arexx dont send errors)

SO I AM VERY INTERESTED IN SOURCES
( thellier ¤ free ° fr)
Especially the header and glue function for the a0,a1,d0 stuff (*)

All looks like as the memory was trashed ... So I was thinking about a special lib header where arexx write inside
.. so trashing my lib
It may not do an Enforcer hit in this case = still happen in .library memory block

Alain

(*) it is unclear if a0 or a1 is used or both, available doc may be false


Go to top


Docs about creating an ARexx support library ???
Not too shy to talk
Not too shy to talk



I am trying to add ARexx support to my own Microbe3D.library
I have an arexx dispatch function at offset -30
LONG RexxSupport(APTR msg,APTR RexxSupportBase)
that analyze rexx messages parameters then call my functions

All seems to be OK with my .library but I have several crash with Arexx programs calling it....

It seems I am missing something when making an ARexx .library ??!!? perhaps it need some special headers or other stuff...

So the question:
Is there some docs or sources about creating such an arexx .library ?

Alain Thellier


Go to top


Re: What happened to all the files?!?
Not too shy to talk
Not too shy to talk



Go to top


Re: What happened to all the files?!?
Not too shy to talk
Not too shy to talk


>However what we have here is something completely different: removal of existing freeware[...]

Are you really sure about this ? I have only 2 original .lha packages from zzd10h here on my hard-drive (Sysmon,Fastview) the read-me say nothing about "freeware"

Alain

Go to top


Re: What happened to all the files?!?
Not too shy to talk
Not too shy to talk


I agree with zzd10h
He maded a lots of works/utility/update those last years .... and all works need to be paid or have at least some form of "reconnaissance"

It is ironicall that it is french people (Me,Zzd10h,K-L) that defends Price/Works when usually France is seen (from outside) as a socialist country from Old Europe populated with cheese eaters ;-P

>Even a £1 program means I go without breakfast or lunch...
It is sad but food is not free too

Alain Thellier - Wazp3D

Go to top


My wish-list for Gallium3D :-)
Not too shy to talk
Not too shy to talk


Hi

So Gallium still wasnt annonced/released for this year ... again

The good thing is that is not finished so perhaps can add those features that often are missing in Amigaish OpenGL implementations...

The facts :
AmigaOS graphics are based on struct bitmap.
There are others "things" like windows, screens, etc...
but at the end they are bitmaps too
CompositeTags (aka the "Compositing") use intensively
bitmaps as "input" (=textures) and as output (="screen")
It will use it for YUV conversion too so for displaying videos (btw GREAT !!!! it will allow great effects in the most Amigaish way)
But Wazp3D use bitmap as output (="screen") but NOT as input (=textures) also current Warp3D cant render in a texture

So the wish-list for Gallium3D:

1) Create GLcontext from a screen or a window or a bitmap
2) Once GLcontext created and running can change the output bitmap
3) Can use a bitmap as input for creating a texture without conversion/reallocation (if the format is supported of course)
4) Can render in a texture as output
5) An existing texture can be seen as a bitmap without conversion/reallocation (if the format is supported of course)

Then it will allow to mix Composition/video/3D : big fun

Alain Thellier - Wazp3D





Go to top


Re: Saving a bitmap with datatype (again....)
Not too shy to talk
Not too shy to talk


@broadblues

With picture.datatype 45.17 (from os3.9) it works on OS3 too

So the last code given above do the job "Save a bitmap with DataType" on OS3 & OS4

Case closed : I am happy

Thanks to all
Alain Thellier




Go to top


Re: Saving a bitmap with datatype (again....)
Not too shy to talk
Not too shy to talk


Thanks Broadblues
With this part it works now on OS4 but still not on OS3
@Salass00
You seems to be right for OS3 not OS4
Curious : I was thinking that IFF/ILBM writing was supported as it is the Amiga "standard" format
A kind of SaveBitmapAsIff(bm,filename) should be an AmigaOS function

Alain

Joined the source that "Save a bitmap with DataType"

/*==================================================================================*/
inline ULONG MyDoMethodA(Object * obj,Msg msg)
{
ULONG result=0;
Class * cl;

if(obj==NULL)
return(result);
cl = OCLASS(obj);

if(cl==NULL)
return(result);

result =CallHookPkt(&cl->cl_Dispatcher,obj,msg);
return(result);
}
/*==================================================================================*/
#define RECTFMT_RGB 0
#define RECTFMT_RGBA 1
#define RECTFMT_ARGB 2
#define LBMI_WIDTH 0x84001001
#define LBMI_HEIGHT 0x84001002
/*==================================================================================*/
void BmReadPixelArray(UBYTE *buf,void *rast,ULONG width,ULONG height)
{
ReadPixelArray(buf,0,0,(width*24/8),rast,0,0,width,height,RECTFMT_RGB);
}
/*==================================================================================*/
void SaveBitmap(Scene3D *S,UBYTE *filename)
{
Object *dto=NULL;
UBYTE *buf=NULL;
BPTR fp=NULL;
struct BitMap *bm;
struct pdtBlitPixelArray bpa;
struct BitMapHeader *bmhd;
APTR bitMapHandle;
ULONG width,height;
ULONG result;

bm=S->window->RPort->BitMap;
Libprintf("SaveBitmap bm %ld %s\n",bm,filename);

bitMapHandle = LockBitMapTags(bm, LBMI_WIDTH, (ULONG)&width, LBMI_HEIGHT, (ULONG)&height,TAG_END);
if(!bitMapHandle) goto panic;
UnLockBitMap(bitMapHandle);

dto = NewDTObject(NULL, DTA_SourceType,DTST_RAM, DTA_GroupID,GID_PICTURE, TAG_DONE);
if(!dto) goto panic;

buf = MMmalloc(24/8*width*height,"buf");
if(!buf) goto panic;

BmReadPixelArray(buf,&S->bufferrastport,width,height);


result=GetDTAttrs(dto, PDTA_BitMapHeader, (ULONG)&bmhd, TAG_DONE);
bmhd->bmh_Left = 0;
bmhd->bmh_Top = 0;
bmhd->bmh_Width = bmhd->bmh_PageWidth = width;
bmhd->bmh_Height = bmhd->bmh_PageHeight = height;
bmhd->bmh_Depth = 24;
bmhd->bmh_Masking = 0*mskHasAlpha ;

result=SetDTAttrs (dto, NULL, NULL,
DTA_ObjName, (ULONG)"Microbe3D grab",
DTA_NominalHoriz, width,
DTA_NominalVert, height,
PDTA_SourceMode, PMODE_V43,
TAG_DONE);

bpa.MethodID = PDTM_WRITEPIXELARRAY;
bpa.pbpa_PixelData = buf;
bpa.pbpa_PixelFormat = PBPAFMT_RGB;
bpa.pbpa_PixelArrayMod = width*24/8;
bpa.pbpa_Left = 0;
bpa.pbpa_Top = 0;
bpa.pbpa_Height = height;
bpa.pbpa_Width = width;
result=MyDoMethodA(dto,(Msg)&bpa);

result=DoDTMethod(dto,NULL,NULL,DTM_CLEARSELECTED,NULL);

fp=Open(filename,MODE_NEWFILE);
result=DoDTMethod(dto,NULL,NULL,DTM_WRITE,NULL,fp,DTWM_IFF,NULL);
Libprintf(" result:%ld for buf %ld %ldX%ld (bm %ld dto %ld fp %ld)\n",result,buf,width,height,bm,dto,fp);
panic:
if(fp) Close(fp);
if(dto) DisposeDTObject(dto);
if(buf) MMfree(buf);

}
/*==================================================================================*/

Go to top


Re: Saving a bitmap with datatype (again....)
Not too shy to talk
Not too shy to talk


AAAARGHHH after several tests it is still not working
HEEELP
DoDTMethod result is 1 , iff file is empty (size 0)

I also tried
result=DoDTMethod(dto,NULL,NULL,DTM_WRITE,NULL,fp,DTWM_IFF,NULL);
after loading with datatype a jpg and it works


This my code
Some specificity (that works in other part of my sources):
MyDoMethodA is needed cause i dont use libamiga
BmReadPixelArray : to avoid a missing registers error with gcc
MMfree/MMalloc: are my tracked memory functions


/*==================================================================================*/
inline ULONG MyDoMethodA(Object * obj,Msg msg)
{
ULONG result=0;
Class * cl;

if(obj==NULL)
return(result);
cl = OCLASS(obj);

if(cl==NULL)
return(result);

result =CallHookPkt(&cl->cl_Dispatcher,obj,msg);
return(result);
}
/*==================================================================================*/
void BmReadPixelArray(UBYTE *buf,void *rast,ULONG width,ULONG height)
{
ReadPixelArray(buf,0,0,(width*24/8),rast,0,0,width,height,RECTFMT_RGB);
}
/*==================================================================================*/
void SaveBitmap(Scene3D *S,UBYTE *filename)
{
Object *dto=NULL;
UBYTE *buf=NULL;
BPTR fp=NULL;
struct BitMap *bm;
struct pdtBlitPixelArray bpa;
APTR bitMapHandle;
ULONG width,height;
ULONG result;

bm=S->bufferrastport.BitMap;
Libprintf("SaveBitmap bm %ld \n",bm);

bitMapHandle = LockBitMapTags(bm, LBMI_WIDTH, (ULONG)&width, LBMI_HEIGHT, (ULONG)&height,TAG_END);
if(!bitMapHandle) goto panic;
UnLockBitMap(bitMapHandle);

dto = NewDTObject(NULL, DTA_SourceType,DTST_RAM, DTA_GroupID,GID_PICTURE, TAG_DONE);
if(!dto) goto panic;

buf = MMmalloc(24/8*width*height,"buf");
if(!buf) goto panic;

BmReadPixelArray(buf,&S->bufferrastport,width,height);

result=SetDTAttrs (dto, NULL, NULL,
DTA_ObjName, (ULONG)"Microbe3D grab",
DTA_NominalHoriz, width,
DTA_NominalVert, height,
PDTA_SourceMode, PMODE_V43,
TAG_DONE);
if(result) goto panic;

bpa.MethodID = PDTM_WRITEPIXELARRAY;
bpa.pbpa_PixelData = buf;
bpa.pbpa_PixelFormat = PBPAFMT_RGB;
bpa.pbpa_PixelArrayMod = width*24/8;
bpa.pbpa_Left = 0;
bpa.pbpa_Top = 0;
bpa.pbpa_Height = height;
bpa.pbpa_Width = width;
result=MyDoMethodA(dto,(Msg)&bpa);
if(result) goto panic;

result=DoDTMethod(dto,NULL,NULL,DTM_CLEARSELECTED,NULL);
if(result) goto panic;

fp=Open(filename,MODE_NEWFILE);
if(!fp) goto panic;
result=DoDTMethod(dto,NULL,NULL,DTM_WRITE,NULL,fp,DTWM_IFF,NULL);
Libprintf(" result:%ld for buf %ld %ldX%ld (bm %ld dto %ld fp %ld)\n",result,buf,width,height,bm,dto,fp);
panic:
if(fp) Close(fp);
if(dto) DisposeDTObject(dto);
if(buf) MMfree(buf);
}
/*==================================================================================*/

Go to top


Saving a bitmap with datatype (again....)
Not too shy to talk
Not too shy to talk


Hello

(I know that there was several threads about this topic but reading them again just add to my confusion and headaches and i cant find a real example source that do that effectively just pieces of code and ideas...)

How to save an existing bitmap bm created with AllocBitMap() and based on current Screen depth (that I used for Warp3D off screen rendering) to a an IFF/ILBM file with the datatype's DoDTMethod(dto,NULL,NULL,DTM_WRITE,NULL,fp,DTWM_IFF,NULL);
???

Input: existing bm (certainly 15/16/24/32 bits)
Output: an IFF file called filename

Alain Thellier

Go to top


Re: problem with a .library for PPC OS4 called from 68k with float args
Not too shy to talk
Not too shy to talk


@broadblues

finally I have used this syntax that looks more clear to me (and it works)
/*======================================================*/
#define ASFLOAT *(float*)&
[...]
static void stub_U3D_UnitizePPC(uint32 *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
struct Microbe3DIFace *Self = (struct Microbe3DIFace *) ExtLib->MainIFace;

Self->U3D_Unitize(
(APTR)regarray[8],
ASFLOAT regarray[0]
);
}
/*======================================================*/
And so it just need to replace all
(float)regarray[
with
ASFLOAT regarray[

Go to top


Re: problem with a .library for PPC OS4 called from 68k with float args
Not too shy to talk
Not too shy to talk


Hello all

>He has not solved anything, he is asking for help how to handel float values.
No no I am not asking for help : the problem is fixed with the method I wrote

Now all the demos(68k) works well with Microbe3D.library(ppc)
But as all ppc demos works too this is not so usefull

>most of the 680x0 CPU's do not have a FPU, and so this is a mystery to me as well.
If the cpu got an FPU then the float registers may be used
(see StormMesa's agl.library that use fp0, fp1, etc ...) but the lib will only works on some cpu (>68020)
If the cpu dont have an FPU then the data registers are used
(like in my microbe.library that use d0,d1,etc....)

>bszili
>*(float*)®array[0]
You are right this is the good & academic syntax but I was too tired to remember this syntax

Alain





Go to top


problem with a .library for PPC OS4 called from 68k with float args
Not too shy to talk
Not too shy to talk


Hello guys

I will explain a problem (bug?) that gave me some headaches:
(Hope it will help someone someday...)

I have maded a Microbe3D.library for PPC OS4
I have also maded stubs for calling this PPC library from a 68k prog
mydemo(68k) --> Microbe3D.library (ppc)

But it wasnt working well : some functions are called with bad args
Looks like a float arg is allways trashed
like this function

void U3D_Unitize(APTR Object,float size)

size is allways bad
The explanation is in the 68k to ppc stub

static void stub_U3D_UnitizePPC(uint32 *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
struct Microbe3DIFace *Self = (struct Microbe3DIFace *) ExtLib->MainIFace;

Self->U3D_Unitize(
(APTR)regarray[8],
(float)regarray[0]
);
}

d0 is in regarray[0] but ALREADY as a float
So converting again uint32 to float give a false value

here it is my solution:

static void stub_U3D_UnitizePPC(uint32 *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
struct Microbe3DIFace *Self = (struct Microbe3DIFace *) ExtLib->MainIFace;
float* floatregarray=(float*)regarray;

Self->U3D_Unitize(
(APTR)regarray[8],
floatregarray[0]
);
}

regarray[] still contain uint32 but now is "seen as float" with floatregarray[]

Alain Thellier

Go to top


Re: Any Program That Converts MP4, etc. To Ham 8/6?
Not too shy to talk
Not too shy to talk


There is a tutorial about HAM videos here
http://majsta.com/modules.php?name=News&file=article&sid=9

Go to top


Re: Any Program That Converts MP4, etc. To Ham 8/6?
Not too shy to talk
Not too shy to talk


Hello

My DatatypeToHam command may help to convert-to-ham/resize the frames
http://aminet.net/package/gfx/conv/DatatypeToHam

Alain Thellier

Go to top


Re: BSzili port requests
Not too shy to talk
Not too shy to talk


>Freespace2 has serious graphic problems with Wazp3D (only at a portion of gameplay screen is shown, e.t.c) but game runs [...] move at good fps rate.

If you obtain a good fps rate then certainly you are using renderer:compositing2D option.

But compositing dont have a Zbuffer so CANT serve for real 3D programs (*) but only 2D programs (that only use MiniGL and/or Warp3D to draw shapes) like Frogatto,Giddy,etc...

Pure software rendering like "renderer:soft to bitmap" is certainly to slow for this kind of game... but may serve to debug problems

Alain Thellier - Wazp3D

(*) Only known exception is FPSE emulator (with gpuw3d.dll plugin) that can render real 3D games with Wazp3D



Go to top



TopTop
« 1 ... 7 8 9 (10) 11 12 13 14 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project