Marc Feeley wrote:
That's great! It makes me want to buy a Nintendo DS just to try it out! 3MB seems a bit big though. Did you try any of my suggestions to cut down on code size?
Well, the system does a strip automatically when preparing the nds image. I haven't tried any of the other things because I wanted as much as possible available when I tried networking.
At some point, I'll have to post a binary somewhere for people to try. Especially since it works under the emulators.
This is normal because your "stdin" is directly reading from the keyboard, and the "read" procedure will know the expression is complete when it reads the closing parenthesis or the whitespace after a symbol, number, etc.
Ah. Fine then. I'll leave it alone.
Where does the output of the "console" go? Does it go to the screen? Does it support cursor movement and xterm/vt100 escape codes? If not you have to complete the implementation of the function lineeditor_output_terminal_op in lib/os_tty.c .
It goes to the screen. The screen does support ANSI escape codes. However, I'll probably ignore that for now.
I assume you know about DS Wifi (http://akkit.org/dswifi/) and lwIP (http://masscat.afraid.org/ninds/lwip.php).
Yes, the lwIP implementation isn't completed and DS Wifi has its own somewhat quirky TCP system. I really wish he had used lwIP instead.
For the threading system to work, you will need a heartbeat interrupt (complete the implementation of setup_heartbeat_interrupt_handling and friends in lib/os_time.c)
Heartbeat interrupt. On the DS that's *really* easy. I'll set one of the timers to fire at once every couple of seconds initially. With all the debug logging going to flash it's slowing the system down pretty dramatically.
and non-blocking I/O, at least for networking
Okay, that can be done, but it needs to use the ioctl calls instead of the the fcntl calls.
(I think lwIP support non-blocking sockets). You will have to "#define USE_NETWORKING" in lib/os.h and complete the implementation of the sections "TCP client stream device" and "TCP server device" in lib/os_io.c .
Got it.
This is not an easy task but I can help you figure out what needs to be done. In the interest of keeping the mailing-list traffic down I will stop cross-posting to the mailing-list.
Unless you really don't want me to, I'd like to keep crossposting. Having this discussion in a publicly available archive for the next person who wants to port Gambit to something else would be very useful.
-a