The following warnings occurred:
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/printthread.php(287) : eval()'d code 2 errorHandler->error_callback
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



Freeplaytech Forum
How do I integrate the link cable into my projects? - Printable Version

+- Freeplaytech Forum (https://forum.freeplaytech.com)
+-- Forum: Neo Geo Pocket (https://forum.freeplaytech.com/forumdisplay.php?fid=1)
+--- Forum: Software Development (https://forum.freeplaytech.com/forumdisplay.php?fid=4)
+--- Thread: How do I integrate the link cable into my projects? (/showthread.php?tid=5490)

Pages: 1 2 3


How do I integrate the link cable into my projects? - NeoGeoFreak2004 - 06-18-2025

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.


RE: How do I integrate the link cable into my projects? - Ahchay - 06-19-2025

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


RE: How do I integrate the link cable into my projects? - sodthor - 06-19-2025

Check "Plink! v0.01 (2004)(Soft'n Fuzzy)" but it's asm


RE: How do I integrate the link cable into my projects? - Ahchay - 10-07-2025

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


RE: How do I integrate the link cable into my projects? - Loïc - 10-07-2025

(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...


RE: How do I integrate the link cable into my projects? - Ahchay - 10-07-2025

Thanks, that's great

Beautifully commented code Smile


RE: How do I integrate the link cable into my projects? - Ahchay - 06-02-2026

Had more of a look into that plink source and it's missing the .inc files that Steve used Sad


RE: How do I integrate the link cable into my projects? - Loïc - 06-02-2026

(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.


RE: How do I integrate the link cable into my projects? - Ahchay - 06-02-2026

So it is, thanks for checking - i couldn't see it for looking!


RE: How do I integrate the link cable into my projects? - Ahchay - 06-03-2026

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