Freeplaytech Forum

Full Version: How do I integrate the link cable into my projects?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hi there guys, so anyways I was wondering if there was any way to integrate the Ngpc link cable into my projects that are written with the c library? Thanks and have a great day.
I think someone did a sample project involving the link cable aaaaages ago. Can't find any trace of it in my archive though

Almost certainly not using the framework though
Check "Plink! v0.01 (2004)(Soft'n Fuzzy)" but it's asm
I've only got vague glimmers on what to do with a link-game, but do we have any documentation/examples on how to integrate - ASM or not, I think I can fudge that into the framework

Couldn't find any source for plink - the soft-n-fuzzy site has long expired
(10-07-2025, 03:09 AM)Ahchay Wrote: [ -> ]I've only got vague glimmers on what to do with a link-game, but do we have any documentation/examples on how to integrate - ASM or not, I think I can fudge that into the framework

Couldn't find any source for plink - the soft-n-fuzzy site has long expired

I did some grave digging, and that might help...
Thanks, that's great

Beautifully commented code Smile
Had more of a look into that plink source and it's missing the .inc files that Steve used Sad
(06-02-2026, 06:24 PM)Ahchay Wrote: [ -> ]Had more of a look into that plink source and it's missing the .inc files that Steve used Sad

which one ?
I've just checked, and it seems to me they are all in the 'mole' sub folder.
So it is, thanks for checking - i couldn't see it for looking!
Okay, so I'm getting into this and I can work out which bits are calling something and which bits are program flow, but I'm not clear on how to check the return values?

For instance - if we look at this bit

Code:
ldb  rw3, VECT_COMCREATEDATA
ldb  rb3,                123
calr             SYSTEM_CALL
cpb  ra3,         COM_BUF_OK
jr    ne,              Again





Right, so we load VECT_COMCREATEDATA(0x13) and the test value 123 into the registers and then call the system_call. We then compare ra3 to COM_BUF_OK and JUMP if NOT EQUAL to the Again label (so,it's a loop)

So, I'm doing that like that 

Code:
    if(wWaitTime1==0)
    {
        u8 again;
        again=0;
    /* Create buffer of four 123 bytes for sending */
        while(again<4)
        {
        // VECT_COMCREATEDATE=0x13
        __asm("ldb  rw3, 0x13");
        __asm("ldb  rb3, 123");
        __asm("calr SYSTEM_CALL");
                __asm("ldb l,ra3"); // Should push the ra3 value to the stack?
        PrintDecimal(SCR_FORE_PLANE,0,0,5,ra3,2);

        if(ra3==COM_BUF_OK)
        {
            again++;
        }
        NegotiateTimeout++;
        PrintDecimal(SCR_FORE_PLANE,0,0,6,NegotiateTimeout,5);
        if(NegotiateTimeout>=1024) again=4;
        }

    }
Edit: So, this is as far I've got - which isn't very far


So far so good, but how do I get the retval from the system call?

Apologies for the stupid questions - I can follow ASM easily enough, but I've only used inline ASM from within C for pretty basic things before
Pages: 1 2 3