calling MSX UNAPI (ethernet API) from C?

tschak909
Member
Posts: 83
Joined: Sun Sep 09, 2018 5:44 pm

Post by tschak909 »

Absolutely.

I am using BlueMSX.

The Obsonet BIOS and a MSX-DOS disk with INL can be found here:
https://drive.google.com/file/d/1x-au96 ... sp=sharing

From inside the machine editor:

Image

Image

Once the ROM is inserted, you should be able to go to Options->Ethernet and select your internet-facing interface.

insert disk into A, boot.

Image

Image

Image

Image

Image

The test disk has that testing harness that I wrote, as well as the latest copy of platoterm.

-Thom
User avatar
dom
Well known member
Posts: 1194
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Thanks so much for the guide - blueMSX doesn't work under wine so I had to get a windows VM up and running. I can't get the ethernet option to work but I don't think that's important here.

I'm pretty stumped by this one at the moment - it looks like we're getting an error code of 1 - ERR_NOT_IMP despite all the registers being correct at the jump block in codeBlock.
tschak909
Member
Posts: 83
Joined: Sun Sep 09, 2018 5:44 pm

Post by tschak909 »

Am trying to get Konamiman in here to look at it too. :)

I'm actually in awe that he managed to implement a complete TCP/IP stack on the Z80.

-Thom
User avatar
dom
Well known member
Posts: 1194
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Well.... TCP on the z88 was how this project was started!

To eliminate some possibilities I compiled the tcpip tool with sdcc including the unapi libraries. That reported the same error.

Interestingly the ping tool on disc uses a different method for calling into inl so that works.
tschak909
Member
Posts: 83
Joined: Sun Sep 09, 2018 5:44 pm

Post by tschak909 »

Am still falling flat on my face, with this one. :(

-Thom
tschak909
Member
Posts: 83
Joined: Sun Sep 09, 2018 5:44 pm

Post by tschak909 »

Here's a simple TCP I/O program in ASM that uses UNAPI, it might yield some clues:
https://github.com/Konamiman/MSX/blob/m ... tcpcon.asm

-Thom
User avatar
dom
Well known member
Posts: 1194
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I've been afk for a few days which has allowed me to recap on where we were and re-run the tests.

It looks like the sdcc tests were working so the code is essentially correct. To cut a long story short I've tracked this problem down to optimisation rule that was evaluating an expression incorrectly. This causes the UnapiBuildCodeBlock to generate an incorrect code block.

Fixing that and things now seem to work.
tschak909
Member
Posts: 83
Joined: Sun Sep 09, 2018 5:44 pm

Post by tschak909 »

YAY! Thanks! *hug* I will try this shortly.

You guys really are awesome.

(You and the CC65 guys are doing truly amazing work)

I think this will go a long way to also adding serial support for MSX (using FOSSIL driver calls)

-Thom
Post Reply