Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
91 user(s) are online (58 user(s) are browsing Forums)

Members: 0
Guests: 91

more...

Headlines

Forum Index


Board index » All Posts (kas1e)




Re: DrawerGenie for AOS4?
Home away from home
Home away from home


@All
Can somebody point me out how correctly block the patched openwindowtaglist, so it only does what i need, and then do nothing (and not open workbench window). So far i tried to return NULL instead of original, but then while window not opens, it "blink" the title bar.

I.e. we have simple that:

struct Window APICALL (*Original_OpenWindowTagList)(struct IntuitionIFace *Self, const struct NewWindow newWindow, const struct TagItem tagList);

struct Window APICALL Patched_OpenWindowTagList(struct IntuitionIFace *Self, const struct NewWindow nw, const struct TagItem tagList) {

        return 
NULL;
}


How instead of NULL return something which will _not_ open workbench window visually ? (and to not crash, of course)


Edited by kas1e on 2023/11/24 6:04:14
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: Lame intuition/reaction based questions
Home away from home
Home away from home


@Ami603
Quote:

have a look at workbench.library/WhichWorkbenchObject
with the tag WBOBJA_DrawerPath


Wow, thanks! Seems to be what i need !:

screen IIntuition->LockPubScreen(NULL);
....
        
IWorkbench->WhichWorkbenchObject(NULL,screen->MouseX,screen->MouseY,
                                    
WBOBJA_FullPath,&path,
                                    
WBOBJA_FullPathSize,1024,
                                    
WBOBJA_DrawerPath,&dpath,
                                    
WBOBJA_DrawerPathSize,1024,
                                    
TAG_DONE);
        
        
        
IExec->DebugPrintF("path = %s\n",path);
        
IExec->DebugPrintF("dpath = %s\n",dpath);

....



Through found some moment : when one window opens on top of the previous ones, and the mouse cursors are over both of them, then i have empty string returned. While i were expected to get it from the active window.. But maybe there another flag for ?


Edited by kas1e on 2023/11/24 3:13:40
Edited by kas1e on 2023/11/24 3:19:19
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: Lame intuition/reaction based questions
Home away from home
Home away from home


@Javier
Quote:

Does DrawerGenie get such path too? Then you can look in its sources how.


DrawerGeniue written by Daedalus on BlitzBasic, he already answer in the previous post how he do it :) (arexx interface)

Quote:

You posted that DG does "SetMethod()" in these functions:


It wasn't about DG, but about Dopus5 :) Its list of patched functions for Dopus5 when it's in workbench replacement mode. Yeah, will check, maybe it will bring some idea as well

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


Re: Lame intuition/reaction based questions
Home away from home
Home away from home


@Javier
Quote:

Maybe insde wb_lib or whoever do such task to open wb drawers/windows uses a "own" struct with some data and one is STRPTR for fullpath.

Question is where is it :)

Quote:

I used the ARexx interface to get the name of the currently active window,


As one more idea .. but not very "system" ones imho :) Anwyay, thanks for idea.. But why you need to check dimensions ? Just for sake of double-checking ?

@All
When we click on icon, it involves surely some more functions and not only "openwindowtaglist()", but maybe something else which did containt "full path" in structs ? It should be somewhere all in all..

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


Re: Lame intuition/reaction based questions
Home away from home
Home away from home


@All
Is there any correct way to know the full path of the opened workbench window ? So far all i find is *Title string in the window's structure , but i am sure there should be something better to get this information from a workbench window ?

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


Re: DrawerGenie for AOS4?
Home away from home
Home away from home


@javier
Quote:

in textmode window (as your grab) the titles headers are created as CUSTOMGADGET and seems it is just after window is opened/created.


So it's not part of a window then, but of a border ? And then, increasing size, clone gadgets, add our new one to them, and upload them back may work then.

@Petrol
Quote:

Just a suggestion but wouldn't it be simpler to write a small commodity that simply open Filer or any other similar tools directly to the drive/drawer you want to open by double click?


We mostly want to do it for own pleasure and technical interest, and to have something which we fully understand, and which small as possible and still the same old workbench which many of us still love :)

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


Re: DrawerGenie for AOS4?
Home away from home
Home away from home


@Context
I just tried simple way, just by settings win->BorderTop to my value, like this:

win->BorderTop win->BorderTop+50;
return 
win;


And that what i have then:

Resized Image

See, it increases the area where gadgets are, and content of window seems to do not overwrite it. Probably that mean, that gadgets are placed on the border too, not inside the intuition window itself ?

But with this simple change, while it increase size, it bring some rendering issues in the window (At bottom, at the right) when i resize window, which i assume happens because i also need to initialize/clear the whole memory of this new added size to make rendering issues disappear ?

Anyway, if gadgets are attached to the border, and i want my one to be placed before (as first one), then i need to read gadgets, add my one, at upload them back via SetAttr ?

And as i see title are ok still after i change border size ?

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


Re: DrawerGenie for AOS4?
Home away from home
Home away from home


@Context
Quote:

Any gadgets you place inside the windows area will be painted over by the workbench rendering.


Yeah, of course, so we need to place them not inside the window, but use other areas of window: borders, titles, etc. Titles is not the way if we want to cookie up something good-looking, but borders are ok.

Quote:

Therefor, a solution is, to put the custom gadgets inside the window border. Well, this means that the top border is problematic, because of the title. If you increase the top border height, the title will be centered and gets in the way.


So, is it possible to increase top border height from my patching function ? Just want to play with it in sake of tests.


And, isn't gadgets such as "name", "title" and "date" are part of window border, or of window content ? What if i can find in the list of gadget structures where they placed, and add before them another gadget, and upload them back to their original position. This will (probably) automatically extend the area below the title bar, and before the "name/title/data" gadgets to give me a new space to put by gadget in ? Or that will not work ?

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


Re: Do we have fast, accelerated, bug-free, supporting scaling SNES emulator ?
Home away from home
Home away from home


@Olle
Quote:

Btw, i saw your github and awesome stuff.


Almost everything on it's not my stuff, but a ports of something done by others :) SDL1 and SDL2 for OS4 done by Capehill (he still works on it, and his work on SDL probably the best ones of all the ports, with all native amiga support). My version it just his SDL work, to make it work on GL4ES (layer need it to make full opengl to works on our ogles2).

Quote:

Question about SDL/SDL2 on Amiga OS 4, what is the state regarding latency and performance? Should i change to using SDL instead? If supporting OpenGL, maybe rendering to texture is a better option? , and how about audio latency?


That need to ask Capehill about, but in general we still if it possibly remove SDL in favor of native amiga, as it anyway always faster in end (less layers, etc). Also, OpenGL for us in not always good to use , sometimes it can be even slower than without ..

Your version of Warpsness is the best exactly because it uses amiga native rendering IMHO.

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


Re: Do we have fast, accelerated, bug-free, supporting scaling SNES emulator ?
Home away from home
Home away from home


@TheMagicSN
Quote:

BTW I disagree that issues on -O3 are a bug. Things are known to sometimes go wrong on -O3 in gcc. It is no coincidence that GNU people compile all their code with -O2. Actually I do too, in most cases


In last couple of years, we all there discuss this thing (and not only we, but whole internet without amiga meaning), and developers everywhere come to facts that no one ever were able to create a test case without an actual bug , which fail with -O3 and works fine with -O2.

All the time, when any developer (even skilled one), says that "bug was with too much of optimization enabled”, turns out to be real bug in end, just with more optimization on, bug un-hide itself, or just shift the location, so issue happens.

If one fix the issue by removing -O3 in favor of -O2, be sure issue will arise sooner or later. By luck, it can hide well, but the point is bug still will be there.

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


Re: PCI virtio driver development
Home away from home
Home away from home


@Hans
Quote:

You're assuming that people will have to sign an NDA to get access. I don't remember them doing that with their classes.


Not exactly NDA, but one need to wait when Mattew answer (can never happen). Or they will be in needs to register on some site (as it done with classes).


Quote:

The reason that I'm encouraging people to contact A-EON, is so that A-EON is aware that people want access to the library. Hopefully that'll nudge them to take action sooner rather than later. I've already encouraged them to open up access to the library.


If they simply upload it on os4depot for everyone's usage: then that will be very good and correct way : everyone who will be in needs can use it. All good.

But it wasn't like this with classes, and surely will not happen with this library too (i hope to be wrong). Those developers who will be in interest to use this library, will be forced to wait when Mattew will find a time to answer with putting a restriction usage on top of it :)

Do you think they can upload it to os4depot in the end for everyone's usage ? I didn't believe in, but hope to be wrong :)

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


Re: Lame intuition/reaction based questions
Home away from home
Home away from home


@joerg
Added simple IDOS->Delay(1); did the trick indeed ! Isn't there some "safe" and fast way to do that (as Delays are suck hard of course).

I mean, not adding some "microseonds" of wait (which probably will be different on different hardware), but some kind of safe API maybe calling after SetAttr ?

Another question (if you doesn't mind): Is there a safe way how to extend the wb window in terms of gadgets : i.e. i want to shift down to 24 pixels a top gadget "name","type" and "data" of the already opened window, insert in this new place my new gadget, and refresh the window, so it will looks as i need (preferable for users to not notice how those changes to the window applied).

Currently, the new gadget i add by patching just overwrite the window's content on top. I am thinking that probabaly i need to read whole window gadgets by getattr(), relayout them, and upload them back via setattr() together with my new ones.


Edited by kas1e on 2023/11/21 6:50:44
Edited by kas1e on 2023/11/21 6:52:30
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: PCI virtio driver development
Home away from home
Home away from home


@Hans
Quote:

Please try contacting A-EON about using the virtio.library


Mean no open source, another sites to register to download it, another ownership who want to dictate when and how to use it. Maybe can be ok with closed source stuff, but with QEMU having developers to rely on closed source library, IMHO no way to go.

You may know the situation already with all those AEON's classes, which you can't just download from os4depot (you need to register on some sites for), as well as of course they not open sourced, which in end leads to their usage only mostly inside of the Enhancer itself.

If ppls will be in needs to contact to the Mattew (yeah, that Mattew who answer years for simple questions), to get access to the closed source library, to sign some document or register on some site, that IMHO just crazy. Especially when it comes to the things like opensourced emulator (all the work for which done for free mostly).

I am fully up to have video driver for QEMU being closed source and for sale to cover the cost of your work, but anyone else who work for free, IMHO should not step in that mess. I'm seeing all over the places how ppls can't get simple things for aeon tracker be fixed for YEAR! Or how their sites can't be fixed to properly handle SSL things.. IMHO, if one wants to save their nervous, they shouldn't try to do any work based on the AEON's closed source stuff. It leads to the same (if not worse) issues as it was with Hyperion and whole contacting with Mattew and getting answer from him or any action, it's like talking to the black hole.

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


Lame intuition/reaction based questions
Home away from home
Home away from home


@All

Can anybody explain plz, why when i do this:

//
    
struct IBox box;
    
GetWindowAttrwWA_WindowBox, &boxsizeofbox ) );            
    
DebugPrintF("Before : Left = %d  Top = %d  Width = %d Height = %d\n"box.Leftbox.Topbox.Widthbox.Height);    
    
    
SetWindowAttrwWA_Height, (APTR)(LONG)100sizeof(LONG));

    
GetWindowAttrwWA_WindowBox, &boxsizeofbox ) );
    
DebugPrintF("After : Left = %d  Top = %d  Width = %d Height = %d\n"box.Leftbox.Topbox.Widthbox.Height);


While i do change the size of window actually, the latest GetWindowAttr() do not reflect the changes i do, and printf for me the same values (while, i can see the size of window changes).

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


Re: Do we have fast, accelerated, bug-free, supporting scaling SNES emulator ?
Home away from home
Home away from home


@Olle
Quote:

Trying to add links and images below, fingers crossed it works.

Warpsnes 2023-11-20 testversion


This version runs, games works in window mode, but in fullscreen all black (be it fullscreen, or fullscreen 2x). I can heard music, can hit "esc" to return to GUI, but nothing rendered.

I tried to choose 640x480x32 , 640x480x16 - same. If i choose 640x480x8(pseudo colors), then warspness simple crashes in "window events".

Os4depot's version of same 1.43 works ok in full-screen (just with white borders around).

This all probably due to the ", Picasso96 and so on, so i did some changes to support it".

Also, if you say that there were heavy bug , which get rid one you remove -O3 , it means that bug still here, just hide, and will happens just later, or in different place. Optimization didn't add bugs of course, but only show you that something wrong with code. By lower the optimization you only hide the issue, but you probably know it all already :)

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


Re: DrawerGenie for AOS4?
Home away from home
Home away from home


@Javier
Quote:

Maybe 'cos it's easy to set:
GA_Left, _myWin->BorderLeft + 2 + (idx * 24), // as we add IDX gadgets
GA_Top, _myWin->BorderTop + 1,

rather that doing "complex" calculations.


So how this one should be less complex then ?:) :

IIntuition->SetAttrs(browsegad, GA_RelRight, x - browsegad->Width - 1,TAG_END);


@All
Have anyone any idea, how we can try to "expand" our patched window, i.e. not add gadget on top of ready window, but, expand whole window with new gadget (mean resize the whole window on the size of gadgets we add, and put them on new/added position of the window). I.e. to have all those "name", "type" and "date" gadgets at top follow after our bar's gadgets. Not just to have our gadgets over the window's content.

See what i mean:





There the url-bar i added at bottom added just on the window content , and overrites with the content of the window once there anything to add in (see at the end of video). That all because we add it at top of the window, while, it should be part of window's gadgets (by resizing the window and updating actual gadget list of window, not just creating new ones on top of window)

I think it should be something like:

-- reading window's size
-- increase the window size on size of the toolbar
-- find the first gadgets in the window and add our ones before

Any ideas how to do it ?:)


Edited by kas1e on 2023/11/21 2:54:58
Edited by kas1e on 2023/11/21 2:59:03
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: DrawerGenie for AOS4?
Home away from home
Home away from home


@All
I suck on Intution/Reaction coding, learning now, but so far i were able also to create string gadget, with attached string hook to it, which can handle all stuff in (so that kind of "path/url" string). Need to understand now how to calcualte all those negative GA_* things, and what is more necessary : how to expand the window size with adding new gadget in it (i.e. not to overwrite content of window, but read all the gadgets from current window, and change them)

@TSK
Quote:

Don't use GA_RelRight but set gadgets position using GA_Left and GA_Top.


Why not ?

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


Re: DrawerGenie for AOS4?
Home away from home
Home away from home


@TSK
Of course, it's not the work of one day. It's boring work with bug hunting and tests. If you don't ready for, better not worry about :) Giving up after few days mean you have no interest in, so why bother then :)

@All
There is my simple test case when nothing crashes, patching happens of only necessary WB windows, and added simple gadget at top (through, to the title bar for now only):

#include <stddef.h>
#include <string.h>

#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/wb.h>
#include <proto/utility.h>
#include <proto/intuition.h>
#include <intuition/intuition.h>
#include <intuition/gadgetclass.h>
#include <proto/string.h>
#include <proto/button.h>
#include <gadgets/button.h>
#include <images/bitmap.h>
#include <reaction/reaction_macros.h>
#include <proto/bitmap.h>

#define GFLG_RELFLAGS (GFLG_RELRIGHT | GFLG_RELBOTTOM | GFLG_RELWIDTH | GFLG_RELHEIGHT)

#define GID_ADDRESS     2066
#define GID_BROWSE      (GID_ADDRESS + 1)
#define GTYP_ADDRESS    0x00E1 /* Window address gadget */

struct Screen *screen NULL;

struct Window APICALL (*Original_OpenWindowTagList)(struct IntuitionIFace *Self, const struct NewWindow newWindow, const struct TagItem tagList);

//browse gadget add
struct Gadget *browsegad_add(struct Window *winstruct Gadget *firstBOOL browse) {
    
struct Gadget *gad, *browsegad NULL;
    
long x 0w,h,t;
    
struct Image  *img;
    
    if(!
win) {
        return 
NULL;
    }
    
    
img =(struct Image *)IIntuition->NewObject(NULL"bitmap.image",
                                            
IA_ScalableFALSE,
                                            
IA_Width,24
                                            
IA_Height,24,
                                            
BITMAP_SourceFile"TBIMAGES:root",
                                            
BITMAP_Screen,     win->WScreen,
                                            
BITMAP_Precision,  PRECISION_IMAGE,
                                            
BITMAP_Masking,  TRUE,
                                            
TAG_DONE);
    
    if (!
img) {
        
IExec->DebugPrintF("can create an image !\n");
    }
    
    
browsegad = (struct Gadget *) IIntuition->NewObject(NULL"buttongclass",
                                
GA_ToggleSelectTRUE,
                                
GA_IDGID_BROWSE,
                                
GA_UserData, (APTR)GTYP_ADDRESS,
                                
GA_Imageimg,
                                
GA_Selectedbrowse,
                                
BUTTON_BevelStyleBVS_NONE,
                                
BUTTON_TransparentTRUE,
                                
BUTTON_EraseBackgroundFALSE,
                                
TAG_END);
    
    
    
IExec->DebugPrintF("x=%ld,y=%ld,w=%ld,h=%ld, top=%ld width=%ld\n"browsegad->LeftEdgebrowsegad->TopEdgebrowsegad->Widthbrowsegad->Heighttw);
    if(!
browsegad
    return 
NULL;
    
    
browsegad->NextGadget first;
    
    if(!
win)
    return 
browsegad;
    
    
IExec->Forbid();
    for(
gad win->FirstGadgetgadgad gad->NextGadget) {
    if((
gad->Flags GFLG_RELFLAGS) == GFLG_RELRIGHT)
        if(
gad->LeftEdge x)
            
gad->LeftEdge;
    }
    
    
IIntuition->AddGadget(winbrowsegad0);
    
IIntuition->SetAttrs(browsegadGA_RelRightbrowsegad->Width 1,TAG_END);    
    
IIntuition->RefreshGList(browsegadwinNULL,1);
    
IExec->Permit();
    
    
IExec->DebugPrintF("return (x=%ld, y=%ld, w=%ld, h=%ld)\n"browsegad->LeftEdgebrowsegad->TopEdgebrowsegad->Widthbrowsegad->Height);
    return 
browsegad;
}




// patched functions
struct Window APICALL Patched_OpenWindowTagList(struct IntuitionIFace *Self, const struct NewWindow nw, const struct TagItem tagList) {

    
struct Window *NULL;
    static 
struct Task *Caller;
    static 
BOOL wb;
    
    
IExec->DebugPrintF("#1 Inside of Patched_OpenWindowTagList()\n");
    
    
Caller = (struct Task *)IExec->FindTask(NULL);
    
    
IExec->DebugPrintF("#2 Hijacked %08x='%s' newWindow=%08x tagList=%08x!\n"CallerCaller->tc_Node.ln_NamenwtagList);
    
    
Original_OpenWindowTagList(SelfnwtagList);    
    if(!
w) {
        return 
NULL;
    }
    
    
// To find out if it workbench window or not we want to patch, we check on:
    
    // 1. caller's Node name of current Task should be "Workbench"
    // 2. if WFLG_WBNECHWINDOW flag should be set
    // 3. if WFLG_BACKDROP flag is NOT set
    
    // TRUE if it Workbench, WFLG_WBENCHWINDOW and not WFLG_BACKDROP, and FALSE is requments not meet.    
    
wb nw && !stricmp(Caller->tc_Node.ln_Name"Workbench") && (nw->Flags WFLG_WBENCHWINDOW) && !(nw->Flags WFLG_BACKDROP);
        
    if (
wb == TRUE) {
        
IExec->DebugPrintF(" -- This is Workbench Window and need pathing!\n");
    } else {        
        
IExec->DebugPrintF(" -- This window need no patching!\n");
        
// exit from patch
        
return w;
    }
    
    if(
wb) {
        
IExec->DebugPrintF("#3 Let's Add gadgets to Workbench window!\n");
        
// all our code by adding gadgets are there
        
        
browsegad_add(wNULL1);
                
    }
    
    return 
w;
}

// main


void init()
{
    
screen IIntuition->LockPubScreen(NULL);

    
Original_OpenWindowTagList IExec->SetMethod((struct Interface *)IIntuitionoffsetof(struct IntuitionIFaceOpenWindowTagList),  (APTR)Patched_OpenWindowTagList);
}

void deinit()
{
    if(
Original_OpenWindowTagList) {
        
IExec->SetMethod((struct Interface *)IIntuitionoffsetof(struct IntuitionIFaceOpenWindowTagList),  (APTR)Original_OpenWindowTagList);
    }

    if(
screenIIntuition->UnlockPubScreen(NULLscreen);

}


int main()
{    
    
    
BOOL notdone TRUE;
    
uint32 isigmask 0signals;
    
    
    
init();
    
    
// Check on CTRL_C
    
while(notdone) {
        
signals IExec->Wait(sigmask|SIGBREAKF_CTRL_C);
    
        if(
signals SIGBREAKF_CTRL_C) {
            
IDOS->Printf("CTRL+C pressed!\n");
            
notdone FALSE;
            break;
        }
    }    
    
    
deinit();
}


That how it looks like in action:





Now just need to understand how to add this gadget correctly on the window content with resizing and refreshing of the window content on the necessary size and then send/recv actions from window port and that mostly all.

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


Re: DrawerGenie for AOS4?
Home away from home
Home away from home


@Javier
I find some bits as well how to add string and gadgets to our window and interact with them , check the mail plz

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


Re: DrawerGenie for AOS4?
Home away from home
Home away from home


@samo79
Quote:

So how about opening a project there?


How about learn coding and actually help ?:))

But to say for real, this makes no sense. The past show that all what important is the programmer working on. No special hosting, not special teams, no special sites are help there.

And , we talk about patch, which is hack. For amigaos4 itself, it should be just fully rewritten workbench from scratch, or , at least this functionality should be added to the original workbench code, with ability to enable/disable it.

The hacks are just for us, for the time (maybe forever) being, but asking for official include of the hacks to the OS, that hardcore :)

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



TopTop
« 1 ... 4 5 6 (7) 8 9 10 ... 424 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project