Commit Graph

489 Commits

Author SHA1 Message Date
Oliver Schmidt
d21fc5bf40 Fixed code style. 2017-11-15 19:45:08 +01:00
Oliver Schmidt
9f652e7c21 Changed HTTP response Server field to something more generic. 2017-11-15 19:24:50 +01:00
Oliver Schmidt
d2d5edca44 Export httpd_send_response.
The HTTP callback is explicitly allowed to send the HTTP response on its own and set the carry to signal that. Therefore it seems reasonable to export httpd_send_response to allow the HTTP callback to make use of the given infrastructure to send the HTTP response.
2017-11-15 19:24:50 +01:00
Oliver Schmidt
4faf0cbeae Minor style adjustment. 2017-11-15 19:24:49 +01:00
Christian Groessler
4103a54c38 adapt peer.c to Unix 2017-11-15 16:08:24 +01:00
Oliver Schmidt
a64e08786c Enable lowercase display on the Apple II.
Given that Telnet65's 80 column display requires an enhanced Apple //e anyway it seems reasonable to have the C applications benefit from building for that target too.
2017-11-10 12:01:30 +01:00
Oliver Schmidt
3034150a6e Minor output beautification. 2017-11-10 11:53:27 +01:00
Oliver Schmidt
393e27922b Added first C application :-)
The date application isn't of much actual use. But it shows
- how easy to use the IP65 C API is
- the power of combining IP65 with the C library
  (going from SNTP time format to a date string in two lines of code)
2017-11-09 22:13:42 +01:00
Oliver Schmidt
a40942075d Removed VIC20 application build.
I don't have plans to support VIC20 applications.
2017-11-09 22:10:11 +01:00
Oliver Schmidt
a75082ca88 Removed VIC20 programs from default recipe.
I don't have plans to support C programs on the VIC20. So now that there are C test programs the simplest solution is to not (try to) build VIC20 test programs as part of the default recipe.
2017-11-09 22:08:57 +01:00
Oliver Schmidt
5427dee30d Added C interface to SNTP function. 2017-11-09 21:48:08 +01:00
Oliver Schmidt
2045754236 Made error constants actually usable from C code. 2017-11-09 21:46:40 +01:00
Oliver Schmidt
2119b2c267 Have Git ignore the Windows peer program artifacts. 2017-11-08 21:01:24 +01:00
Oliver Schmidt
e6684904cf Made tcp_listen return the client IP address.
Together with the recent change to provide the inbound data buffer address and length to the TCP callback function as C parameters this change allows the TCP API to get along without any global variable :-)
2017-11-08 20:59:06 +01:00
Oliver Schmidt
e1bf89d1a8 Use parameters for TCP C callback.
In contrast to the multiple UDP callbacks there's only one TCP callback so it easy to provide a wrapper for the C callback that pushes C parameters on the stack.
2017-11-07 23:05:05 +01:00
Oliver Schmidt
7af0dcd1fa Moved ip65_process directly to data processing.
Now that we process incoming data from the main loop - and use 'buf' both for incoming and outgoing data we should of course make sure that we never trash the incoming data with outgoing data.
2017-11-07 22:57:15 +01:00
Oliver Schmidt
d059cf858a Don't try to get new data while still processing previous data. 2017-11-06 23:40:05 +01:00
Oliver Schmidt
9a8ba804bc Added C interface to TCP functions. 2017-11-06 23:36:44 +01:00
Oliver Schmidt
c4f5c7dbfc Made C program more robust.
The C test program may serve as copy & paste templates so it should make clear that ip65_process() is supposed to be called pretty regularly. Additionally it isn't supposed to be called recursively meaning that recv callbacks need to return quickly and defer longer processing.
2017-11-06 23:23:00 +01:00
Oliver Schmidt
c6efcebf97 Added C interface to timer handling. 2017-11-05 23:16:34 +01:00
Oliver Schmidt
3c9ab2eb5f Added C interface to abort key control. 2017-11-05 22:55:55 +01:00
Oliver Schmidt
6680772b04 Introduced C interface to IP65.
The IP5 usage of ld65 segments and zeropage variables was made compatible with cc65 C programs already a while ago. This commit is the next logical step which is to introduce the actual C interface to IP65.

IP65 for C programs shares the the ip65.lib / ip65_tcp.lib with IP65 for assembler programs. However the various libraries from the 'drivers' are not reused. Instead there's exactly one library for every target named ip65_<target>.lib. Those libraries contain only functions used by ip65.lib / ip65_tcp.lib.

TODOs:

- Introduce c64_timer.s and atr_timer.s.
- Add a C interface to the rest of the IP65 functionality (especially TCP).
2017-11-05 14:28:49 +01:00
Oliver Schmidt
32a66c5d7c Moved httpd.slotscan to ip65test.dsk and dropped ip65demo.dsk.
Now that with Telnet65 there is a "real" application there's no point anymore in the
ip65demo.dsk. Therefore httpd.slotscan is now part of the ordinary ip65test.dsk.
2017-11-04 00:40:35 +01:00
Oliver Schmidt
b6a6a2f66f Renamed 'tcp' to 'math' as the name 'tcp' will be needed soon. 2017-11-04 00:25:09 +01:00
Oliver Schmidt
23ae6c155b Adjusted comment to (surprising) reality. 2017-10-29 00:08:33 +02:00
Oliver Schmidt
ce98f5d738 Removed obsolete test. 2017-10-28 23:01:28 +02:00
Oliver Schmidt
90c83387f2 Removed unused stuff. 2017-10-27 22:56:04 +02:00
Christian Groessler
244df7212e test/vt100.s: add comments and a line with "line drawing" characters 2017-10-11 23:41:16 +02:00
Christian Groessler
411b945972 Fix Atari linker config file in "apps" and "test" directories. 2017-10-02 08:05:39 +02:00
Oliver Schmidt
6ae6037549 Merge pull request #4 from groessler/something_to_pull
c64: fix latency
2017-10-01 20:12:52 +02:00
Christian Groessler
fc4a2aab96 c64input.s: fix latency when typing 2017-09-30 16:17:07 +02:00
Christian Groessler
6e82e722ad Revert "c64input.s: fix stray cursor image in host and port entry"
This reverts commit 03b2579e33.
2017-09-30 15:57:30 +02:00
Oliver Schmidt
8b3c53ee67 c64input.s: fix stray cursor image in host and port entry
This introduces some latency when typing in host name and port. But
I think that's acceptable. (reverted from commit 36369fb714)
2017-09-30 14:57:18 +02:00
Christian Groessler
7145c4e8a0 c64input.s: fix stray cursor image in host and port entry
This introduces some latency when typing in host name and port. But
I think that's acceptable.
2017-09-29 15:47:44 +02:00
Christian Groessler
78864d2c56 atrvt100.s: use ADRESS instead of xVector variable
This was probably an artifact from early stages of porting to the
Atari. Problem manifested itself e.g. when hitting DEL in the middle
of a 'bash' input line.
The change also includes some cleanups as suggested by Oliver.
2017-09-25 23:40:55 +02:00
Christian Groessler
0c0fd3f397 atrtimer.s: initialize the interrupt variables before enabling the interrupt 2017-09-25 17:07:25 +02:00
Christian Groessler
7652194703 atrtimer.s, vic20timer.s: use decimal mode in interrupt handler
Using decimal mode (SED/CLD) reduces the memory footprint and execution time
of the interrupt routine. Some comments were added or fixed, too.
2017-09-24 02:29:42 +02:00
Christian Groessler
2685d01fe5 Adapt Atari timer code to PAL systems.
The vertical blank interrupt (which is used by the timer) runs with
60Hz on NTSC systems and 50Hz on PAL systems.
This commit also clears 'vbichain' in 'timer_exit', so a subsequent
'timer_init' would do the right thing.
2017-09-12 14:14:14 +02:00
Christian Groessler
e87fbb6111 atrvt100.s: remove a superfluous test introduced in last commit
The same test is eventually done in PrnChr.
2017-09-12 13:41:59 +02:00
Christian Groessler
12d66a2bd0 Atari: add line-drawing chars in font.
Also adds a check for valid ASCII char (<= 0x7f) in ProcIn, and fixes
two typos in a2vt100.s.
2017-09-11 23:35:16 +02:00
Christian Groessler
9fce65d948 atrvt100.s: remove spurious "jsr SLV"s
They were an artifact of previous tests.
2017-09-04 22:23:49 +02:00
Christian Groessler
96cfc32511 Atari: fix stray cursor image when connecting to BSDs.
FreeBSD and NetBSD, at least, have a banner message when you telnet into them
which has an empty line as first line. On those systems, an old "cursor" char
was visible at the top of the login prompt message.
This is fixed by enabling and disabling the cursor in 'get_key' while waiting
for a key press.
2017-09-04 20:03:50 +02:00
Christian Groessler
0a546a7eef Add custom font for the Atari version, fix Atari keyboard input handling. 2017-09-01 22:36:35 +02:00
Oliver Schmidt
a4552b0e34 Improved cursor handling consistency.
So far most of the time the cursor drawing was handled with a 'jsr COff - jsr COn' bracket around the drawing code. However in the area of screen erasing a different approach was used - which caused subtile issues.

4d729ec839 already fixed (most ?) of those issues for the Apple II and the ATARI. However it broke the approach 'jsr COff - jsr COn' brackets.

This is now adjusted - for all machines.
2017-08-30 20:04:57 +02:00
Oliver Schmidt
26e57930a0 Some minor changes.
In order to manage upcoming changes relevant to all machine types it's important that the files are easy to diff. This change improves the similarity between a2<...>.s and atr<...>.s.
2017-08-28 20:50:44 +02:00
Oliver Schmidt
981e3bb5f7 Merge pull request #3 from groessler/something_to_pull
Add VT100 driver for Atari.
2017-08-28 15:46:55 +02:00
Oliver Schmidt
9f611c5c1e Allow Telnet65 to send ASCII code 0 - on the C64.
Lars informed me that $F142 by default produces ASCII code 0 via Ctrl-@. One just needs a way to distinguish it from the no-key-press.

This means that the further processing can be done in that same as on the Apple II - meaning to just replace in the VT100 keyboard translation table $00 with $FF as code for ignore-key.
2017-08-20 20:58:49 +02:00
Christian Groessler
c6aaa3566f use $ff, $fe, etc. for special keys in the Atari version 2017-08-18 02:06:58 +02:00
Christian Groessler
9e3642c589 resolve conflicts with 'master' 2017-08-18 01:03:02 +02:00
Oliver Schmidt
3541c20ba2 Fixed sequence number of initial TCP ACK packet on tcp_connect.
So far the sequence number for the first packet after the initial SYN packet was calculated directly before returning from tcp_connect. This is however far to late as the ACK packet to be send as response for the SYN,ACK packet sent by the server already needs that sequence number. Therefore it is now calculated right after a successful reception of the SYN,ACK packet is detected.
2017-08-12 17:02:56 +02:00