Commit Graph

573 Commits

Author SHA1 Message Date
Oliver Schmidt
6f0e4a97b1 Now that we have per-target Ethernet drivers we can omit initialization code necessary only for a certain card/cart from all the other drivers for the same Ethernet chip. This is especially true for the code self-modification only necessary on the Apple II to accommodate to the multiple slots.
Note: The whole chip base address handling will be overhauled in subsequent changes.
2019-04-30 18:54:21 +02:00
Oliver Schmidt
43d7d33c31 Removed support for W5100 on the C64.
Now that we have per-target combo driver wrappers we can remove the W5100 support from the C64. There isn't any actual (known) W5100-based solution for the C64.
2019-04-29 16:41:27 +02:00
Oliver Schmidt
7e6b77f41b Build combo driver wrapper individually for each target.
The set of relevant drivers is after all different for each target. Building the combo driver wrapper individually opens the option to use .ifdef's to only include the drivers relevant for a certain target.
2019-04-29 16:31:59 +02:00
Oliver Schmidt
9c43d29f27 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.
2019-04-29 16:27:07 +02:00
Oliver Schmidt
b18d657753 Don't trash parameter in AX. 2018-12-09 19:49:30 +01:00
Oliver Schmidt
6a296b2058 Improved URL selector handling.
parse_url stores the URL selector in the output_buffer - which is currently 520 bytes. A new entry point called parse_url_buffer was added which instead stores the URL selector in a buffer provided by the user.

url_download now calls the new parse_url_buffer instead of parse_url. The buffer for the URL selector is simply the download_buffer. So the download_buffer is used twice: First to hold the URL selector to be sent as request to the server and then to hold the response received from the server.

However, the URL selector still can't exceed the MSS (aka 1460 bytes).

Note: The User-Agent string was shortened by two bytes as that allows a "default" URL (incl. 'http://' but without port number) of exactly 1400 bytes to end up as 1460 bytes URL selector.
2018-11-13 13:19:47 +01:00
Oliver Schmidt
f349ac6bd3 Increased IFTTT webhook key length. 2018-11-07 20:43:20 +01:00
Oliver Schmidt
334bdb88a0 Added Tweet65.
Tweet65 is sample application for triggering an IFTTT maker webhook. If ~450 chars are not enough for the URL then either the IP65 output_buffer needs to be increased or url_parse needs to be modified to use a different buffer. E.g. when called from url_download then the url_download_buffer could be temporarily used to hold the selector.
2018-11-01 14:21:20 +01:00
Oliver Schmidt
41de6a76bd Allow URLs and URL selectors > 255 chars.
Note: The URL selector is stored in the output_buffer - which is currently 520 bytes. Beside all of the URL (apart from a potential "http://") the 'get' and the 'http_preamble' have to fit into that buffer. Therefore URLs mustn't exceed 450 chars. However, we omit a check to avoid further code size increase as most of the time URLs are known to be much shorter anyhow. If the URLs might become large we just leave it up to the user to check their length.
2018-10-30 22:02:47 +01:00
Oliver Schmidt
1813ce7f7d Allow tcp_send_string to send strings > 255 chars. 2018-10-30 21:07:15 +01:00
Oliver Schmidt
5fcfb2beeb Include Apple II specific header only for Apple II. 2018-10-30 20:00:17 +01:00
Oliver Schmidt
92c50af920 Update README.md 2018-10-28 22:47:56 +01:00
Oliver Schmidt
199d953ca8 Switch to https links where available. 2018-09-20 12:59:36 +02:00
Oliver Schmidt
bf7039b473 Switch to https links where available. 2018-09-20 12:58:43 +02:00
Oliver Schmidt
9c2e55ce3b Migrated GitHub pages from gh-pages branch to /docs folder. 2018-09-18 22:01:19 +02:00
Christian Groessler
e6a7ce4f45 ip65.s (ip65_random_word): use Atari's POKEY 'RANDOM' register 2018-09-10 01:09:14 +02:00
Oliver Schmidt
63df5ac99e Adjusted line editor to recent change in cc65 CONIO. 2018-09-08 19:38:14 +02:00
Oliver Schmidt
300ca8626a Make use of clock_settime().
clock_gettime(), clock_settime() and clock_getres() were added to the cc65 C libaries the other day.
2018-08-18 23:28:59 +02:00
Oliver Schmidt
d79db04aa1 Make use of recently added popptr1. 2018-08-14 11:20:29 +02:00
Oliver Schmidt
374bf749a1 Added link to Wiki home with end user program list. 2018-08-07 20:03:20 +02:00
Oliver Schmidt
bc406246b4 Replaced ProDOS 2.4.1 with ProDOS 2.4.2 (small). 2018-08-06 23:28:40 +02:00
Oliver Schmidt
56c28694ca Fixed access to argv. 2018-08-06 23:13:22 +02:00
Oliver Schmidt
e7f0b6759b Added download to disk feature.
Beside the code for the actual feature this change introduces analysis of the URL to extract a potential filename to be used for saving. Doing so was a prerequisite for disk download because the filename extension in the URL is the only hint for distinguishing ProDOS sector order disk images from DOS 3.3 sector order images.

So far only the URL input was potentially repeated. Now the file input is potentially repeated as well. For normal file paths there's deliberately still no check. But when entering a drive specifier ("!Sx,Dx") then it is checked for plausibility - and there's an additional confirmation question to keep the user from overwriting the "wrong" disk.

With now having both the URL and file input potentially repeated it became clear that loading and saving the input history shouldn't be repeated - and if the user quits without having entered a valid input the history deliberately isn't saved at all.
2018-08-06 20:33:32 +02:00
Oliver Schmidt
7ac8c55603 First step towards download to disk.
So far we were reading (much) more bytes from the W5100 than necessary when processing the HTTP header. The byte were memmove'd to the beginning of the buffer.

However, when downloading a DOS 3.3 sector order disk image (*.dsk / *.do) then we need to place every DOS 3.3 sector at a certain point in the buffer to avoid additional memcpy's later. Therefore the HTTP header processing mustn't read (or rather commit) any body bytes from the W5100. So we now just check for the "\r\n\r\n" after each and every byte. This is of course less than optimal but small/simple - and the header isn't supposed to be that large anyway.
2018-08-04 13:10:13 +02:00
Oliver Schmidt
66ac29285b Interpret empty input as intend to exit. 2018-08-03 13:58:46 +02:00
Oliver Schmidt
fc61ee5358 Fixed recent change.
Brought back re-initialization of port hi-byte.
2018-08-03 00:49:56 +02:00
Oliver Schmidt
74eec87860 Improved handling of abbreviated URLs.
- There was already an explicit code path for something like 'wwww.google.com/' but that code path ended up with the protocol type unset and the port set to 0. Now the protocol defaults to HTTP and the port defaults to 80.
- There was no provision for something like http://www.google.com', rather it was just assumed that the slash after the hostname is always found. Now there's a check if the slash is actually found, and if it isn't found then an empty path is explicitly used.
2018-08-03 00:46:17 +02:00
Oliver Schmidt
fe215b4eda Added timezone support.
After quite some thoughts it was considered best to simply have the timezone configured in the source code and rebuild if a change is desired/necessary.
2018-08-02 17:37:54 +02:00
Oliver Schmidt
29793d4814 Added (Apple II specific) wget65 program.
IP65 doesn't support TCP flow control. Therefore it doesn't make sense to write a program receiving a significant amount of data via TCP using IP65. From that perspective it makes sense that IP65's HTTP client doesn't allow to handle incoming data with a callback but requires a buffer being able to hold the whole HTTP body.

However, on the Apple II there's the Uthernet II card with its W5100 Ethernet controller chip. That chip has it's own TCP implementation supporting TCP flow control. Therefore the wget65 program uses the W5100 TCP capabilities for the HTTP client.

But even with the W5100 TCP implementation in place IP65 still plays a role for the wget65 program as it desires DHCP and requires (usually) DNS. Both are not supported by the W5100 capabilities.
2018-08-01 19:39:06 +02:00
Oliver Schmidt
dcbe2e002b Enable register variables.
Nowadays register variables are out-of-style. So if they appear in some source code they can be assumed to be explicitly meant for cc65, so don't ignore them.
2018-08-01 19:27:08 +02:00
Oliver Schmidt
cfaa0d7c0d Added generic CL65FLAGS and made use of it.
- Maybe not all Apple II C programs want to use the special I/O buffer setup.
- All Make-target-specific variables should go at the top of the Makefile as they are user settings.
2018-08-01 19:24:12 +02:00
Oliver Schmidt
26648fba7f Allow C programs to override the IP driver library used. 2018-08-01 19:17:53 +02:00
Oliver Schmidt
76843a7737 Allow C programs to consist of multiple source files. 2018-08-01 19:14:52 +02:00
Oliver Schmidt
95f97d807d Renamed object files generated from asm files.
Make sure that 'make' doesn't mix up object files generated from asm files and object files generated from C files.
2018-08-01 19:11:47 +02:00
Oliver Schmidt
ab63d8dcf9 Added library for Apple II C programs supporting only the Uthernet II.
The W5100 can be accessed pretty well from C without any library. A C program doing so is of course incompatible with the Uthernet and the LANceGS. So the program needs to make sure that that there' an Uthernet II. It can do so by comparing 'eth_driver_name' with "Uthernet II". However, when space it tight it doesn't seem reasonable to link all Ethernet drivers in the first place.
2018-08-01 19:00:40 +02:00
Oliver Schmidt
4ef85827db Replaced version file with hard coded identifier.
Have the HTTP client work in just the same way the HTTP server does.
2018-08-01 19:00:39 +02:00
Oliver Schmidt
6eb4aef0e8 Enhanced C interface to user input control. 2018-08-01 19:00:39 +02:00
Oliver Schmidt
0bd53f3af7 Added C interface to Ethernet driver configuration. 2018-08-01 19:00:39 +02:00
Oliver Schmidt
b9d6a92534 Minor beautification. 2018-08-01 19:00:38 +02:00
Oliver Schmidt
5f9fe0ad1e Just some minor code style adjustment. 2018-07-23 22:13:32 +02:00
Oliver Schmidt
ee0e11b41f Reduced Apple II binary file sizes.
The Apple II file I/O needs a $400 byte page-aligned buffer for every open file. The default implementation takes those buffers from the heap. However, if a program doesn't use the heap for anything else it is more efficient to place those buffers below the program at $800 by linking iobuf-0800.o and thus avoiding to link any heap code at all. If a program never opens more than one file at a time it can have its start address at $800 + 1 x $400 = $C00.
2018-07-23 14:55:56 +02:00
Oliver Schmidt
29c802c835 Adjusted parameter type to match header file. 2018-07-22 19:35:43 +02:00
Oliver Schmidt
c47a89ce1a Split url.s into url.s and download.s.
url_parse() doesn't require TCP so it makes sense to allow a program using url_parse() to link successfully without TCP support.
2018-07-22 19:22:57 +02:00
Oliver Schmidt
fbdc712e06 Added LOADER.SYSTEM for the Apple II C programs.
It may be useful to be able to run the C programs right from the selector (without loading BASIC.SYSTEM first). Or maybe run them on boot by placing the LOADER.SYSTEM as first file in the root directory.
2018-07-22 16:08:21 +02:00
Oliver Schmidt
8e7454580f Have Date65 set the ProDOS date on the Apple II.
If there's RTC active then the user can at least have the current date set. However, if the machine runs for several days the user needs to re-run Date65.
2018-07-22 15:26:39 +02:00
Oliver Schmidt
6d1306b60c Minimal phrasing change. 2018-07-21 19:56:25 +02:00
Oliver Schmidt
b6afd84d5e Added Wiki links. 2018-07-21 19:40:28 +02:00
Oliver Schmidt
6ba4a5bae0 Minimal style consistency improvements. 2018-07-21 18:46:25 +02:00
Oliver Schmidt
69e72e1114 Minimal comment fix. 2018-07-21 18:37:42 +02:00
Oliver Schmidt
d036abdc0b Fixed links. 2018-07-21 17:37:22 +02:00