| retrohackers.org https://www.retrohackers.org/ |
|
| netboot65 api https://www.retrohackers.org/viewtopic.php?f=5&t=452 |
Page 1 of 1 |
| Author: | jonnosan [ Mon Apr 06, 2009 12:30 pm ] |
| Post subject: | netboot65 api |
There's a new release of netboot65 available from https://sourceforge.net/project/showfil ... _id=250168 netboot65 uses the ip65 IP stack, and is a project for "network booting" C64 (or Apple ][) computers via a RR-NET The netboot65 distribution includes a cartridge image (client/rrnetboot.bin) that can be loaded into a Retro Replay (or burned into a ROM) and allows EITHER download and execution of a file from a tftp server (a ruby based tftp server is also included in the zip file) OR exiting to BASIC to allow loading of a file from a disk. New in this release is an API that can be used by any program (whether loaded from disk or via tftp) to access IP/UDP functions within the cartridge image. This API uses a dispatch function with a fixed entry point, so apps should work across different versions of the cartridge. There are some docs included in the zip, and a sample program showing how to use the api. You can also view an include file (with constants used by the API and a short description of each function) at http://netboot65.svn.sourceforge.net/vi ... iew=markup All feedback gratefully accepted, either here or via email to jonnosan at gmail dot com. I'm sure the implementation has plenty of room for improvement - I'd particularly appreciate any feedback on the API itself, i.e. is it easy enough for coders to use? |
|
| Author: | jonnosan [ Thu Apr 09, 2009 10:27 am ] |
| Post subject: | Re: netboot65 api |
For anyone who's playing with the last release, just a heads-up that I'm still tweaking the API a little bit, and expect to post a new release shortly after Easter. "breaking" changes so far are: 1) removal of the "NB65_SET_IP_CONFIG" function, since the whole point of the API is to remove the need for each app to manage configuration of the IP & MAC addresses. 2) removal of the NB65_INIT_DHCP function. Some cart images will have the NB65_INIT_IP function trigger a DHCP config, others will have IP info hardcoded into the EPROM, still others could (if someone wanted to code it) allow for manual assignment of IP addresses at runtime. In any case this should all be transparent to each app. 3) NB65_UNHOOK_VBL_IRQ will be renamed to NB65_DEACTIVATE. As a result of the removals, all function numbers have been reassigned. My aim is to have a stable 1.0 version of the API by the time the 64NIC+ is shipping, where 'stable' means that there will be no 'breaking' changes after that - only extra functions and a new version # for the API itself. |
|
| Author: | jonnosan [ Fri Apr 10, 2009 5:31 am ] |
| Post subject: | Re: netboot65 api |
the family was out all day so I made some progress and now think I have "release candidate" for the 1.0 version of the NB65 API - the code that implements that API may still change, but the API itself I think is stable enough for anyone wanting to use it to write a UDP based application. I've made a new release which can be downloaded from https://sourceforge.net/project/showfil ... _id=250168 Changes in this version are: * restructured the NB65 API to remove some redundant functions (per my earlier post) * created a NB65 API Technical Reference document - http://netboot65.svn.sourceforge.net/vi ... erence.doc * added a sample NB65 client in DASM format - http://netboot65.svn.sourceforge.net/vi ... iew=markup * added a NB65 RAM stub (so if a NB65 cart has banked itself out prior to executing a downloaded app, that app can find and reactivate the NB65 cart) |
|
| Author: | RaveGuru [ Fri Apr 17, 2009 12:48 pm ] |
| Post subject: | Re: netboot65 api |
Nice work! Keep it up. |
|
| Author: | jonnosan [ Fri Apr 17, 2009 4:58 pm ] |
| Post subject: | Re: netboot65 api |
After many minutes of QA, there's a new release at https://sourceforge.net/project/showfil ... _id=250168 Changes: * renumbered NB65 functions * long-running processes (DHCP/DNS/TFTP) can now be terminated by RUN/STOP * tftp via callback * tftp upload * IP configuration can be edited * display ARP table * assorted bugfixes |
|
| Author: | jonnosan [ Sat Apr 25, 2009 12:14 am ] |
| Post subject: | Re: netboot65 api |
I've just made another release (available from https://sourceforge.net/project/showfil ... _id=250168 ) main change is i've added an API function to stop listening on a UDP port, also added a script you can use to set MAC address and IP defaults in the ROM image prior to burning Plus there's a bit more documentation (which can also be read from the project home page at http://netboot65.sourceforge.net/ ) The cartridge code in this release identifies itself as v0.9 - I'm pretty sure I won't add any more features to the cart (just bugfixes maybe) until the 64NIC+ comes out. This dist also includes a prog (calld d64_upload.prg, available for TFTP boot if you run the supplied TFTP server) that will send the contents of a 1541 disk to the default TFTP server as a D64. |
|
| Author: | RaveGuru [ Mon Apr 27, 2009 10:21 pm ] |
| Post subject: | Re: netboot65 api |
This is starting to get really interesting. It would be great to make this a general purpose API to be put in for instance 64NIC+ ROM and RR hence producing: 1) A consistant API for (inter)networked applications 2) Offloading most of the TCP/IP code from RAM 3) A uniform way to detect the various NIC soultions currently available TCP would need to be implemented though. Keep it up! |
|
| Author: | Devia [ Tue Apr 28, 2009 1:10 pm ] |
| Post subject: | Re: netboot65 api |
RaveGuru wrote: 3) A uniform way to detect the various NIC soultions currently available Hmm.. I think I have the most complete detection algo in my NIC-Test tool.... but probing the I/O area can fuck up devices mapped in there in various ways, which would make it necessary for the detection algo to "know" about all the different crap one is able to stuff into that area in various combinations using various cart expand0rzz.. HW probing is an entirely different discussion, than basic networking.. maybe we should start a thread on that if someone have some great ideas.. Then I just might be arsed to clean up my algo and post some well commented source code. |
|
| Author: | jonnosan [ Wed Apr 29, 2009 2:58 am ] |
| Post subject: | Re: netboot65 api |
RaveGuru wrote: This is starting to get really interesting. It would be great to make this a general purpose API to be put in for instance 64NIC+ ROM and RR hence producing: 1) A consistant API for (inter)networked applications That's pretty much the design goal for the NB65 API RaveGuru wrote: 2) Offloading most of the TCP/IP code from RAM kind of - I would like to allow for NB65 drivers being loaded into RAM, with a way for applications to know whether or not they can safely use the $8000-$9FFF RAM space (and either exit gracefully if they need that space, or operate in a diminished capacity if they can do without it). This is what the 'NB65 Bank Support' variable ($800E) signifies. RaveGuru wrote: 3) A uniform way to detect the various NIC soultions currently available Well the idea really is that an application doesn't need to know what the NIC is at all. That should make it possible to easier to develop new NICs based on different chipsets e.g. a wifi device with an SPI interface) In fact if someone was motivated enough they could probably write a PPP or SLIP driver that implemented the NB65 API. If someone is really keen to know what the underlying hardware is, they can call the NB65_GET_IP_CONFIG function which returns a structure that contains (amongst other strings) a pointer to an ASCIIZ string that describes the NIC hardware. But I would really only see this as the sort of thing someone might need to know when debugging an issue with their application, I wouldn't expect the application itself to need to behave any different based on what the NIC is. RaveGuru wrote: TCP would need to be implemented though. Yes, but I think it will be a "v2.0" feature - I've been focused on trying to get a 1.0 in line with the 64NIC going out, since slipstreaming that project will hopefully get enough copies of the API out in the wild for people to be motivated to develop some apps for it. The two things I'm struggling with on the TCP implementation are 1) a couple of kid free days to get a clear run at it, and 2) what the API should be for calling apps. The normal API for TCP is to abstract away the flow of packets and present data as a byte stream. But if I implement it that way, then there's likely to end up being 3 buffers with copies of data in each direction. For example, for incoming data there will be - the buffer with the incoming ethernet frame, containing ~ 1500 bytes of data - the TCP buffer (of say 4Kb?) into which the data needs to be copied out of the ethernet frame, put in the right order, and kept until the client asks for it. To support multiple concurrent connections, you'd need multiple TCP level buffers. - (most likely) a client side buffer that the client app will copy data into (1 byte at a time) out of the TCP buffer, until it gets whatever application level "chunk" it expects to see. For UDP, there only needs to be 1 buffer - effectively the calling app looks directly at the ethernet buffer whenever a UDP datagram arises (ip65, which netboot65 is built on top of takes some shortcuts and doesn't support re-assembly of IP fragments) Maybe a reasonable compromise here is to implement a TCP API that uses callbacks similar to how UDP is done, so the IP stck only needs to manage the single ethernet buffer, and the calling app can decide if & how to string multiple datagrams together into a bytestream - I would probably provide some example apps doing this so developers didn't need to start completely from scratch. The IP stack would however garuantee that data is only sent to the calling app 1 time, and in the right order (i.e. it would detect duplicate and out of order packets). RaveGuru wrote: Keep it up! Thanks! |
|
| Author: | jonnosan [ Sun May 03, 2009 6:47 am ] |
| Post subject: | Re: netboot65 api |
I've had made a few more changes - new version (0.9.6) now available at https://sourceforge.net/project/showfil ... _id=250168 The main changes in this release are: 1) I've reworked how the tftp server is queried for directory listings, as the way I was doing it before didn't work very well through NAT on my broadband router (and I assume would have caused problems for other people before). There is now no longer a special tftp opcode for directory listings, instead you just try to download a file called '$<filemask>' eg '$*.prg' 2) I've made the version number a bit more granular I've also put up a public tftp server that can used by doing the following: 1) upload a program to nb65.jamtronix.com via tftp - make sure you use binary not ASCII mode (use the "-i" switch on windows) - make sure the filename ends with .prg (case sensitive) - e.g. on windows the command line is "tftp -i nb65.jamtronix.com put example.prg" 2) boot up with your nb65 cartridge attached - on the main screen, hit F7 to get to the "config" screen - on the config screen, hit F5 to set teh tftp server - type in "nb65.jamtronix.com" and hit enter - assuming you have DHCP and DNS working on your LAN, then the hostname you entered should be resolved automatically. - hit F7 to get back to main menu - hit F1 to boot from the tftp server. you should see a list of files to select from, including the one you just uploaded. use the arrow keys to move thrpough the list of files, and hit the letter next to the name of the file you want to run. |
|
| Author: | RaveGuru [ Mon May 04, 2009 2:08 pm ] |
| Post subject: | Re: netboot65 api |
Regarding the TCP implementation I think simplicity is key. After all it's a C64 we're up against. It's not the right platform for practicing high level abstract coding |
|
| Page 1 of 1 | All times are UTC [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|