Hi dreamcast gurus,
After playing with dc development over the years with a slow serial cable I finally bought a broadband adapter.
Works great. I just compiled insight (gdb gui) which is really, really cool.
One question: does anyone know why network code on the kos is not compatible with the '-n' flag in dc-tool? (i.e. do not attach console and fileserver).
At least I can't get it to work.
Any ideas?
BTW, I made a quick port of the sdl rdesktop (rdp client) for the Dreamcast. Amazingly it works pretty well, but after a while crashes. I'd like to debug this but I believe dc-tool needs to be running (i.e. no -n).
dc-tool and network enabled code
-
- DCEmu Fast Newbie
- Posts: 21
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Fri Mar 10, 2006 7:57 am
- Has thanked: 0
- Been thanked: 0
- BlueCrab
- The Crabby Overlord
- Posts: 5666
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: dc-tool and network enabled code
If you're using the built-in KOS network stack (in the Subversion repo version of KOS), then everything should work fine with dcload/dc-tool with or without the -n flag. Just make sure you have INIT_NET in the KOS_INIT_FLAGS, and it should "just work" (as long as you're using any revision from the past year or so (fs_dclsocket was added in r570, but I'm sure there have been changes since then that will affect it)).
If you're trying to use lwIP, you're stuck pretty much, unless you can manage to make KOS' fs_dclsocket work with lwIP (I've never tried personally, so it may work just fine).
If you're trying to use lwIP, you're stuck pretty much, unless you can manage to make KOS' fs_dclsocket work with lwIP (I've never tried personally, so it may work just fine).
-
- DCEmu Fast Newbie
- Posts: 21
- Joined: Fri Mar 10, 2006 7:57 am
- Has thanked: 0
- Been thanked: 0
Re: dc-tool and network enabled code
Thanks for the info BlueCrab. I'm using lwip. Latest svn version of KOS.
If I understand correctly KOS internal networking and lwip cannot both be used at the same time?
It looks like KOS only supports UDP.
So I guess there are a couple of solutions:
- Try to get dcload-lwip working (it's in the 1.2 branch). dcplaya seems to have something similar built in.
- Implement KOS support for TCP connections (gulp!)
- Your suggestion of trying fs_dclsocket with lwIP. I need to try to understand this...
If I understand correctly KOS internal networking and lwip cannot both be used at the same time?
It looks like KOS only supports UDP.
So I guess there are a couple of solutions:
- Try to get dcload-lwip working (it's in the 1.2 branch). dcplaya seems to have something similar built in.
- Implement KOS support for TCP connections (gulp!)
- Your suggestion of trying fs_dclsocket with lwIP. I need to try to understand this...
- BlueCrab
- The Crabby Overlord
- Posts: 5666
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: dc-tool and network enabled code
Good to know I haven't managed to break lwIP.nogginthenog wrote:Thanks for the info BlueCrab. I'm using lwip. Latest svn version of KOS.
Correct. Both expect to get direct input from the various network drivers. You might be able to hack up lwIP to send things along to KOS' internal network stack for UDP packets, but that'd probably be pretty ugly (and would require changing both lwIP and the internal network stack too, most likely).If I understand correctly KOS internal networking and lwip cannot both be used at the same time?
Correct.It looks like KOS only supports UDP.
I've never used it, and have no idea if it'd still work, but I suspect it won't be too bad to get working (in fact, I hadn't really noticed it there before you mentioned it).So I guess there are a couple of solutions:
- Try to get dcload-lwip working (it's in the 1.2 branch). dcplaya seems to have something similar built in.
Eventually I'll have this in KOS' tree, but what I have right now is broken and incomplete.- Implement KOS support for TCP connections (gulp!)
From my perspective (I wrote fs_dclsocket), probably the easiest option. The code isn't too horrible, and from looking at it, as long as you don't need to do any printing in an IRQ, it should be relatively easy to port.- Your suggestion of trying fs_dclsocket with lwIP. I need to try to understand this...
-
- DCEmu Fast Newbie
- Posts: 21
- Joined: Fri Mar 10, 2006 7:57 am
- Has thanked: 0
- Been thanked: 0
Re: dc-tool and network enabled code
Well, my quick rdesktop port does crash after a whileBlueCrab wrote:Good to know I haven't managed to break lwIP. (actually it doesn't work at all now, I've broke something!)nogginthenog wrote:Thanks for the info BlueCrab. I'm using lwip. Latest svn version of KOS.
I'll have a play with this tomorrow.I've never used it, and have no idea if it'd still work, but I suspect it won't be too bad to get working (in fact, I hadn't really noticed it there before you mentioned it).So I guess there are a couple of solutions:
- Try to get dcload-lwip working (it's in the 1.2 branch). dcplaya seems to have something similar built in.
OK, I see what you mean now. I had a quick play around but simply calling lwip_kos_init() in fs_dclsocket_init() adds a whole bunch of stuff that probably doesn't belong in the kernel.From my perspective (I wrote fs_dclsocket), probably the easiest option. The code isn't too horrible, and from looking at it, as long as you don't need to do any printing in an IRQ, it should be relatively easy to port.- Your suggestion of trying fs_dclsocket with lwIP. I need to try to understand this...
Out of interest how do you debug low-level stuff on the dc? On the Amiga I would simply write to the hardware colour registers (maybe in a small loop, or wait for the start of a frame) and I'd see a flicker of colour. But I'm kinda stuck on the dc.
- BlueCrab
- The Crabby Overlord
- Posts: 5666
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: dc-tool and network enabled code
The easiest way is using a serial cable, and loading stuff up over it. Then you don't have to worry about when you do printfs and such, because they should work any time. That's how I debugged a lot of the network stack in the beginning (once things were stable enough, I imported fs_dclsocket so I could printf without a serial cable).nogginthenog wrote:Out of interest how do you debug low-level stuff on the dc? On the Amiga I would simply write to the hardware colour registers (maybe in a small loop, or wait for the start of a frame) and I'd see a flicker of colour. But I'm kinda stuck on the dc.
Other than using dcload, your options are limited to playing with the video somehow... You could set up some printing using the bios font or do some border color changing to debug stuff, if you wanted to.
-
- DCEmu Fast Newbie
- Posts: 21
- Joined: Fri Mar 10, 2006 7:57 am
- Has thanked: 0
- Been thanked: 0
Re: dc-tool and network enabled code
Doh! <slaps head> I have a serial cable, of course I can just use that for debugging! Didn't think of thatBlueCrab wrote:The easiest way is using a serial cable, and loading stuff up over it. Then you don't have to worry about when you do printfs and such, because they should work any time. That's how I debugged a lot of the network stack in the beginning (once things were stable enough, I imported fs_dclsocket so I could printf without a serial cable).nogginthenog wrote:Out of interest how do you debug low-level stuff on the dc? On the Amiga I would simply write to the hardware colour registers (maybe in a small loop, or wait for the start of a frame) and I'd see a flicker of colour. But I'm kinda stuck on the dc.