Current events

From Spectrum
Revision as of 22:21, 18 October 2008 by Winston (talk | contribs)
Jump to navigation Jump to search

Extending BASIC ... with C?

Yes! It now can be done. If you've been following the development of the BASIC extension tutorial, you'll see that there's C code there. No, it's not theoretical, you really can write BASIC extensions in C with the Spectranet.

Actually, making a library to do it isn't all that hard, but strings do need some special handling as ZX BASIC does not use C strings. The strings are sequences of bytes as you might expect, but they aren't null terminated, instead the ROM's string handling functions return string lengths plus a pointer to the string. This is being handled in the C library by copying the string, null terminating it, and returning a length. (Copying only as much as the buffer, of course).

The next thing to do with C is to develop some guidelines for making ROMmable routines. Certain things in the z88dk expect the ZX ROM to be present (the print routines, for example, use the ROM's scrolling routine even if the character printing routines belong to the z88dk). This isn't a great deal, since C routines destined for ROM which need to do things like this can use the Spectranet's print42 routine (and I probably ought to make a library that lets stdout go there).

Winston 22:02, 16 October 2008 (BST)

Developers, developers, developers, developers!

OK, I think it's at a stage where someone else can also have a go at doing things with the Spectranet. You just know you need an interesting project for your own Spectrum as the dark days of winter approach...so...

What I am going to do is this. I've already posted in the WOS hardware forum, but I'm going to post this into the Development forum. I'm going to loan out (on a free loan, indefinite) 6 of the prototype boards to anyone who wants to develop for it. The deal is this - tell me what you want to develop, and if there's more than 6 developers chomping at the bit I'll have to choose the 6 ideas I like the most. You will need a real working Spectrum (48K, 128K or one of the Amstrad models) since the Spectranet is not emulated. You don't need any sort of mass storage for the Speccy - already there's a method to send data to the Spectrum from another machine over ethernet, accessable on the NMI menu.

This isn't a competition or anything like that for some fancy or uber-imaginative networked program for the Spectrum. Examples of some things that are fine ideas are:

  • An FTP client, perhaps with the ability to run a .SNA or use tape traps to load a .TAP file off the network.
  • A *good* IRC client, perhaps improving the rinkety-dink one I've written as a test, or perhaps something completely new
  • A networked strategy game.
  • A simple web browser
  • A news ticker and/or weather display. (Perhaps that's a good one for demo writers - there's lots of scope for making a novel way of displaying the current weather which can make the most of the Speccy's hardware)

Pretty much anything that needs the network qualifies. (I wonder if anyone can squeeze enough performance out of the Z80 for an SSH client!)

At the moment if you want to join in with development you'll have to do it in C (with the Z88DK) or in assembly language - channels/streams support is something I've got planned but it won't be there for a while. If you want a feel for the Spectranet's API (which, for the net code is a subset of the BSD socket library) you can take a look at the Software page. To contact me you can do so via the WOS forums or to my email address 'dyls (at) alioth (punto) net' (please put 'Spectranet' in the subject). Hopefully by the end of this month, there will be a few willing developers who want to hack at this thing.

Winston 15:50, 4 October 2008 (BST)

The last 10%

As usual, the last 10% is taking 90% of the time (and it doesn't help that I'm overloaded with projects at the moment). But it is getting closer, I promise!

I need to do some tidying up (hopefully this weekend) in the code - for instance, the socket library should save and restore the memory that's paged into area A, otherwise this paging area isn't very useful as a place to put code. The library also ought to make an attempt to allow data in this area to be transferred, hiding the fact that the ethernet buffers are memory mapped from the programmer as much as possible. I've thought of a way of swapping paging area B to do this, although this obviously has an issue if the buffer crosses the boundary between paging area A and B.

I've also been doing quite a bit of documentation recently (as you will have seen if you follow 'Recent Changes') including things like a nice memory map diagram. Some more must be done, though - for instance, documenting how to extend BASIC (fairly low priority at the moment) and how to write a ROM module (much higher priority).

What I want to do next is get the socket library paging sorted out, then once that's done, I think it's in a fit state for someone else to try and write some programs for it too. So continue to watch this space. I would like to make an announcement on the availability of development boards at the end of September if possible, since the long dark winter nights are coming and perhaps people will be looking for a new project for their beloved rubbery friend!

Winston 21:00, 11 September 2008 (BST)

Getting ready for the Steve Ballmer Monkey Dance

It's time to get ready and do a Ballmer impression: "Developers...developers...developers...developers..." - you've probably seen the video. But soon, that's what the Spectranet will need.

It's mainly an issue of documentation: so that people who fancy doing development know where to start, I need to get a basic user guide out for the development boards (things like 'what does jumper J1 do', and 'how do I set the IP address', and "how do I flash a new ROM" etc.) Also the tutorials - I need the tutorials and basic socket library API documented so that people who are otherwise great Spectrum developers, but who've not done much with netcode, know where to start. You'll note if you look at 'Recent Changes' on the wiki I've been doing some of this over the weekend (including a minor re-org of the front page).

It's my intention to do the following, once I feel I can release some boards for development. The deal is this: I'll make a permanent, free loan of a prototype board to anyone who's interested in developing something. If the developer can't continue for whatever reason, then they just pass the board onto the next person. The requirements for the developer who wants to take advantage of the free loan is to have something they want to develop, and also have a real Spectrum to hand - no emulators emulate this board yet, so a developer must have a real, serviceable Spectrum to hand. (What reduces the pain is that even now, before I've even developed the network filesystem, you CAN load programs over ethernet, making it fast and easy to test your code on the real machine). If demand outstrips supply, I'll choose whatever I consider the most interesting projects are. Hopefully, I'll have at least half a dozen boards I can lend to people (5 currently exist, and I hope to make a couple more soon). I'll be making an announcement on the World of Spectrum forums (and here, of course) when I get to that point. But it should be pretty soon.

Winston 20:50, 17 August 2008 (BST)

Older News