Commit Graph

119 Commits

Author SHA1 Message Date
Oliver Schmidt
28f88a7d56 Consistently use the term 'device'. 2019-05-08 17:11:07 +02:00
Oliver Schmidt
c2a71ee62b Updated several aspects regarding Ethernet drivers.
I. Build Ethernet drivers individually for each target.

After all the Ethernet cards/carts are different enough to ask for customized drivers. Building the drivers individually opens the option to use .ifdef's to customize them.

II. Removed Ethernet driver I/O base.

So far the base address of the Ethernet chip was a general property of all Ethernet drivers. It served two purposes:
1. Allowing to use a single Ethernet driver for a certain Ethernet chip, no matter what machine was connected to the chip.
2. Allowing use an Ethernet card in all Apple II slots.

However, we now use customized Ethernet drivers for the individual machines so 1.) isn't relevant anymore. In fact one wants to omit the overhead of a runtime-adjustable base address where it isn't needed.

So only the Apple II slots are left. But this should rather be a driver-internal approach then. We should just hand the driver the slot number the user wants to use and have the driver do its thing.

III. With per-target Ethernet drivers we can have per-target MAC addresses.

IV. Added support for RR-Net MK3 unique MAC addresses.

The RR-Net MK3 can be operated in two modes:

- In cartrigde mode it has a startup-ROM that sets the CS8900A MAC address to the unique MAC address.
- In clockport mode the driver has to read the two lowest MAC address bytes from the EEPROM and combine them with 28:CD:4C:FF.

See http://wiki.icomp.de/wiki/RR-Net#Detecting_MK3 for details.

The driver first checks if the current CS8900A MAC address starts with 28:CD:4C:FF. If it does, it overwrites its built in default MAC address with the CS8900A MAC address.

If the CS8900A MAC address didn't start with 28:CD:4C:FF, it checks if there are two valid MAC address bytes in the EEPROM. If they are there, it overwrites its built in default MAC address with a combination of 28:CD:4C:FF and those two bytes.

V. Added support for the upcoming 'Dracarys' Ethernet PBI for the ATARI.

See http://atariage.com/forums/topic/287376-preannouncement-dragon-cart-ii/ for details on Dracarys.

So far there was only one Ethernet solution for the ATARI. Therefore the relevant driver was loaded statically. With now having two solutions we have to load the corresponding driver dynamically (like on the other machines). Fortunately this doesn't mean significant additional overhead as there are several mouse drivers for the ATARI asking for dynamic mouse driver loading. Therefore the dynamic driver loading infrastructure was linked already.

Another aspect of more than one Ethernet solution is that the Ethernet config program becomes necessary on the ATARI to select the correct driver. Although that program is pretty simple and therefore rather small it means that now only one "major" program fits on a 130kB disk. So we need now 5(!) 130kB disk images instead 3 so far.
2019-05-08 16:46:47 +02:00
Oliver Schmidt
79855ff02d Beautified SLIP macros. 2017-03-18 14:05:36 +01:00
Oliver Schmidt
91beb8670f Added SLIP support to retro platforms.
The cc65 tool chain comes with V.24 drivers so it seems reasonable to use the existing Contiki SLIP driver to implement network access via SLIP as alternative to Ethernet.

Some notes:
- The Ethernet configuration was simplified in order to allow share it with SLIP.
- The Contiki SLIP driver presumes an interrupt driven serial receiver to write into the SLIP buffer. However the cc65 V.24 drivers aren't up to that. Therefore the main loops were extended to pull received data from the V.24 buffers and push it into the SLIP buffer.
- As far as I understand the serial sender is supposed to block until the data is sent. Therefore a loop calls the non-blocking V.24 driver until the data is sent.

On all platforms there's only one V.24 driver available. Therefore V.24 drivers are always loaded statically.

On the Apple][ the mouse driver is now loaded statically - independently from SLIP vs. Ethernet. After all there's only one mouse driver available. However there's a major benefit with SLIP: Here all drivers are loaded statically. Therefore the dynamic module loader isn't necessary at all. And without the loader the heap manager isn't necessary at all. This allows for a reduction in code size roughly compensating for the size of the SLIP buffer.
2017-02-15 23:43:28 +01:00
Oliver Schmidt
fb4c42a357 Added custom log function for CBM machines.
The log function writes directly to the screen. Combined with the usage of PFS this means that the POSIX layer of the C library isn't referenced anymore thus reducing the memory requirements.
2016-10-15 23:36:53 +02:00
Oliver Schmidt
d864e73579 Added directory functions to the Commodore Platform File System.
They reduce the Telnet server's run size by 1231 bytes.
2016-10-15 18:36:54 +02:00
Oliver Schmidt
ae0c5f0dd0 Make use of new cl65 option --print-target-path.
The new cl65 option --print-target-path allows to get rid of CC65_HOME altogether.
2016-06-03 13:30:25 +02:00
Oliver Schmidt
7a5249b066 Added a Contiki version of the CBM exec() system file; it uses PFS instead of POSIX.
It reduces the webbrowsers' size by 735 bytes.
2016-03-28 20:03:47 +02:00
Oliver Schmidt
4f28289df2 Added a pfs_remove() function and a pfs_seek() stub to the Commodore platforms.
- "Normalized" some Assembly code.
- Implemented CFS_APPEND in pfs_open().
- Made CFS_WRITE work in VICE's virtual disk/file system.
2016-03-28 14:07:35 +02:00
Oliver Schmidt
6876b97466 Adjusted segment names to match recent cc65 change. 2016-03-06 21:11:18 +01:00
Oliver Schmidt
5443c740e9 Added 80 column IRC client / web browser for the C64.
Recently support for 80 column CONIO based on 320x200 graphics was added to the cc65 C library for the C64. This change leverages this for the IRC client and the web browser. Because not everybody prefers this 'soft80' display with its small 4x8 charbox the 40 column programs are still available as before (with the new programs called 'irc80' and 'webbrowser80').
2015-10-30 16:48:00 +01:00
Oliver Schmidt
fb5d0b7ef0 Made 80 column display a cc65 application attribute.
So far 80 column display was an attribute of a cc65 platform. Now each cc65 application can ask for 80 column display by defining WITH_80COL. Of course this is ignored by platforms incapable of 80 column display.

I see three types of application:

* Applications not benefitting from 80 column at all and in fact looking better with 40 column display. These are now using 40 column display. Examples: ethconfig, ipconfig

* Applications taking advantage of 80 column display if it is available without drawbacks. These stay as they were. Examples: Telnet server, web server, wget

* Applications needing 80 column display so urgently that it is likely desirable even if the display becomes harder to read. These come now in both flavors allowing the user to choose. Examples: IRC, web browser

Note: This change doesn't actually introduce any 80 column display with drawbacks. This if left to a subsequent change.
2015-10-30 12:42:58 +01:00
Oliver Schmidt
634db88fe0 Adjusted cc65 constructor to recent cc65 change.
With 0ee9b2e446 cc65 constructor may not use the BSS anymore.
2015-10-29 22:25:48 +01:00
Oliver Schmidt
43ac818dd2 Removed mouse pointer initialization.
Now the cc65 C library for CBM takes care of this.
2015-10-09 19:35:31 +02:00
Oliver Schmidt
757809196e Some finishing touch on the CBM retro targets. 2015-08-08 15:41:24 +02:00
Oliver Schmidt
a30e2e0045 Allow to configure Telnetd idle timeout.
The default Telnetd idle timeout of 30 seconds seems somewhat short. Best to have it user-configurable (incl. the option to turn it off with an config value of 0).
2015-07-06 12:25:20 +02:00
Oliver Schmidt
5d039d9848 Optimized retro webbrowser configs.
The change c7b8bac006 optimized memory usage and thus allowed to adjust the retro webbrowser configs for improved web page compatibility.
2015-07-05 16:56:25 +02:00
Oliver Schmidt
a70fbf1bbf Reconfigured Telnet server.
In order to have the wget command make some sense the write command should be present too.
- On the Apple][ reduction of the MTU seems to gain just enough RAM to have the (rather heavy-weight) full-blown C library file I/O working.
- On the C128 there's way too little RAM so there's no wget command but only the file commands.
- On the CBMs a dummy lseek() was necessary to have the read command link.
2015-06-21 21:07:41 +02:00
Víctor Ariño
ccc0d27da0 Integrates uip-nameserver API
On the same commit the src have been uncrustified and some typo
fixes as well as includes missing.
2015-01-09 09:44:06 +01:00
Roy Scheefhals
1058ea986a Changed the parameter 'char * data' of process_start to the
type process_data_t. This was an artifact when the choice was
made to use the void * type for the data parameter in processes.

Changed parameter 'void * data' of process_post_synch to
process_data_t for consistency.

Checked all the uses of process_start() in contiki and fixed casts
of the data parameter.
2014-06-12 13:40:28 +02:00
Adam Dunkels
36a5aadc9e Moved the 6502 custom rules into its own Makefile.customrules-6502 file 2014-01-26 23:20:40 +01:00
Oliver Schmidt
1f4613383f Added more flexibility to webbrowser -> wget forwarding.
- Up to now the CTK program handler was necessary to start wget and forward the URL. Now alternatively the webbrowser uses the underlying OS to exec wget.

- Up to now windowed CTK was necessary to display the acknowledge dialog. Now alternatively the webbrowser displays the acknowledge text and buttons right in the webpage area.

- For now the targets 'win32' and 'c64' make use of the new capabilities.
2014-01-24 16:09:30 +01:00
Oliver Schmidt
fc983e2e79 Copied 'contiki_arg[c|v]' from 'native' to the other desktop targets.
- On the retro targets support for 'contiki_arg[c|v]' is optional as accesing arg[c|v] is rather expensive.
2014-01-24 11:56:40 +01:00
Oliver Schmidt
a24865de72 Add somewhat more support to use different mouse drivers.
- The default mouse driver is now always named 'contiki.mou'.
- Alternative mouse drivers are present in the disk images.
- Users can select their mouse driver by renaming the files.
2014-01-17 23:45:59 +01:00
Oliver Schmidt
3b2173e01f Have CBM DOS filetype of imported files match the one used by cc65.
CFS_WRITE implies O_TRUNC which is implemented on CBM DOS by deleting an
exsisting file. Hoewever this succeeds only if the CBM DOS filetype matches.

We need a working O_TRUNC in order to be able to overwrite the contiki.cfg
configuration file.

Note: Now it has be clarified why overwriting the configuration file started to
fail the CBM PFS (platform file system) can be activated for the recently added
ethconfig program.
2013-12-12 18:57:40 +01:00
Adam Dunkels
bb2dcaa057 A massive all-tree automated update of all double inclusion guard #defines that changes from using two underscores as a prefix, which are reserved, to not using two underscores as a prefix 2013-11-24 20:20:11 +01:00
Oliver Schmidt
6fc83cf601 Initialize tcpip process before resolver process.
Since introduction of mDNS (f145c17039)
the resolver process initialization depends on the tcpip process
already being initialized (because of the call to udp_new()).
2013-09-01 20:53:51 +02:00
Oliver Schmidt
6ab336f55f Several minor consistency improvements. 2013-07-31 00:55:31 +02:00
Oliver Schmidt
79bb5ea73f Removed some more old RCS tags from the Contiki source tree. 2013-06-13 15:54:26 +02:00
Rémy Léone
e6bd4f1dde Rename to md 2013-03-26 23:15:37 +01:00
Rémy Léone
7b40a568a6 Update to markdown
- Spellchecking
- Update plain text to github markdown
2013-03-26 16:55:19 +01:00
Oliver Schmidt
c7b8bac006 Reorganized web page attribute data handling.
- Up to now the web browser used several fixed size arrays to hold the various types attribute data of the web page. This turned out to be way to inflexible for any non-trivial web page. Therefore now all attribute data is stored in a single buffer one after the other as they arrive from the parser only occupying the memory actually needed. This allows for pages with many links with rather short URLs as well as pages with few link with long URLs as well as pages with several simple forms as well as pages with one form with many form inputs.

- Using the actual web page buffer to hold the text buffers of text entry fields was in general a cool idea but in reality it  is often necessary to enter text longer than the size of the text entry field. Therefore the text buffer is now stored in the new unified attribute data buffer.

- Splitting up the process of canonicalizing a link URL and actually navigating to the resulting URL allowed to get rid of the 'tmpurl' buffer used during form submit. Now the form action is canonicalized like a usual link, then the form input name/value pairs are written right into the 'url' buffer and afterwards the navigation is triggered.

- Support for the 'render states' was completely removed. The only actually supported render state was centered output. The new unified attribute buffer would have complicated enumerating all widgets added to the page in order to adjust their position. Therefore I decided to drop the whole feature as the <center> tag is barely used anymore and newer center attributes are to hard to parse.
2013-03-06 16:29:36 +01:00
Oliver Schmidt
98060c1eab Moved from last cc65 release (2.13.3) to recent cc65 snapshot (2.13.9).
Relevant cc65 changes...

General:
- The compiler generates "extended" dependency info (like gcc) so there's no need for postprocessing whatsoever :-)
- The linker is very pernickety regarding the ordering of cmdline options so a custom linker rule is necessary :-(

Apple2:
- The various memory usage scenarios aren't specified anymore via separate linker configs but via defines overriding default values in the builtin linker config.

Atari:
- The builtin linker config allows to override the start addr so there no more need for a custom linker config.
- The C library comes with POSIX directory access. So there's no more need for for a custom coding.

CBM:
- The C library comes with POSIX directory access. So there's no more need for for a custom coding.
2013-02-14 15:42:43 +01:00
Oliver Schmidt
1a5e20bc5f Remove tab chars from retro C sources. 2013-01-28 23:43:08 +01:00
Adam Dunkels
944537fccf Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
Nicholas J Humfrey
680225e99d Converted u8_t to uint8_t and u16_t to uint16_t in the platforms directory.
Added "These names are deprecated, use C99 names" warnings the contiki-conf.h files that were missing it.
2012-02-21 08:33:25 -05:00
oliverschmidt
0ef1171705 Just always call process_run() and etimer_request_poll() in turn - like the "major" platforms do. 2010-10-27 22:17:39 +00:00
oliverschmidt
46122f558f Skip the CBM volume header. 2010-10-26 18:56:39 +00:00
oliverschmidt
5e10cf2eed Implemented cfs_opendir() and friends for CBMs based on cc65's cbm_opendir() and friends. 2010-10-23 13:48:06 +00:00
oliverschmidt
9e9eb4b55c There's no point in pulling in cfs-posix-dir.c if the POSIX functions it depends on are dummies anyway. 2010-10-23 08:17:45 +00:00
oliverschmidt
bcc2120570 Added support for the FTP standalone client to the c64 target. 2010-10-19 22:31:59 +00:00
oliverschmidt
828378ab47 Replaced "retro" color scheme with ergonomic color scheme. 2010-10-03 10:30:53 +00:00
oliverschmidt
f70d4c600d Minor wording change. 2010-09-29 12:07:02 +00:00
oliverschmidt
cd24e920b6 Made cfs-based webserver example compatible with 8.3 file systems. 2010-09-28 20:40:52 +00:00
oliverschmidt
8eeeef17d1 Made cfs-based webserver example compatible with 8.3 file systems. 2010-09-28 19:36:16 +00:00
oliverschmidt
b2fe3db298 Just name the binary always 'contiki'. 2010-09-28 19:23:30 +00:00
oliverschmidt
e53c34770a Integrated latest enhancements contributed by Kajtar Zsolt:
- Use cc65 C library _filetype for writing instead of fixed 'p'.
- Support for fake O_TRUNC through SCRATCH.
2010-07-22 10:16:58 +00:00
oliverschmidt
8a6f7a1dcf The cc65 C64 memory layout offers enough memory for larger URLs so have a nice scrolling URL text entry field. 2010-07-20 22:47:42 +00:00
oliverschmidt
67e775ecee The maximum number of C64 web server connections is now equal to the (new) default as the CBM PFS allows for 10 open files. 2010-04-11 21:30:14 +00:00
oliverschmidt
ce412471e4 Integrated latest fix contributed by Kajtar Zsolt. 2010-04-06 09:46:58 +00:00