Commit Graph

421 Commits

Author SHA1 Message Date
Oliver Schmidt
4f1bdab43a Added VT100 SCS (Select Character Set) capability.
Apple II: The MouseText chars only allow for a partial representation of the VT100 Special Graphics glyphs. Additionally the MouseText chars are not available for reversed video.

C64: The VT100 Special Graphics repurposes the ASCII(!) code points $60-$7f. And the C64 custom font used places them on the same code points. Therefore it makes sense to "tunnel" them through the usual ASCII->PETSCII->ScreenCode processing pipeline by moving them as-is to otherwise unused PETSCII code points ($80-$9f).
2017-05-25 15:46:21 +02:00
Oliver Schmidt
9b345c5f7d Removed Latin-9 support.
The currently used font doesn't contain any Latin-9 glyphs so it doesn't make sense to try to process Latin-9 chars. Instead now only 7-bit ASCII chars are processed - as the original VT100 does. Setting LANG=C in the host shell should make programs aware of the fact that only 7-bit ASCII chars are to be generated.
2017-05-24 00:41:54 +02:00
Oliver Schmidt
086a644afb Streamlined display character selection.
The reverse characters of the alternate char set are place in a somewhat strange arrangement in the Apple II character ROM. This is because of backward compatibility with the standard char set. Therefore it seems more efficient and hopefully easier to understand to use a table to select them.
2017-05-23 23:56:57 +02:00
Oliver Schmidt
1beffbf0b9 Some minor (style) fixes. 2017-05-22 21:28:14 +02:00
Oliver Schmidt
608a2607ca Fixed Cursor Control Key Codes.
http://vt100.net/docs/vt100-ug/table3-6.html says that ESC O A..D is to be send if Cursor Key Mode is set and http://vt100.net/docs/vt100-ug/chapter3.html says "A mode is considered set until it is reset by a reset mode (RM) control sequence.". So ESC O A..D is the default.

Beside this spec perspective sending ESC O A..D instead of ESC [ A..D makes i.e. aptitude and midnight commander work out-of-the-box.
2017-05-22 00:41:42 +02:00
Oliver Schmidt
cc9bab2580 Avoid unnecessary timeout checks.
On the Apple II the timer_read function is actually a delay function. Therefore we want to avoid calling it if we're busy processing incoming data. Fortunately timer_read is only necessary to trigger a TCP keep alive message. But if we're busy processing incoming data then we for sure need no TCP keep alive. So we simply mark if we just processed incoming data and skip the timeout check.
2017-05-21 22:39:10 +02:00
Oliver Schmidt
f8593d6767 Added font for C64 VT100.
The commit e1a29ae411 was missing the font file. It sports the VT100 'special graphics and line drawing' glyphs in the chars $60-$7F. However so far the code to make use of them isn't implemented.
2017-05-20 21:41:18 +02:00
Oliver Schmidt
6ace96aa7f Added VT100 test.
Re-added VT100 test that was created for KIPPERTERM development. Not very usefully as-is but a good template for any offline VT100 rendering test/debugging.

Additionally the disk images were renamed to distinguish them from the disk images created in the apps directory.
2017-05-19 00:17:38 +02:00
Oliver Schmidt
e1a29ae411 Added Telnet65 app.
The file telnet.s in the 'ip65' directory for sure wasn't belonging into a library as it contained a main loop. So I introduced an 'apps' directory for actual apps coming with IP65. The file telnet.s was moved to apps, renamed telnet65.s and heavily modified.

The file c64vt100.s was made up from several files taken from CaTer (www.opppf.de/Cater) and adjusted for the new use case. The was done before for KIPPERTERM. However this time I deliberately avoided unnecessary code reformatting to allow for as easy as possible integration of potential upcoming changes in CaTer.

The file a2vt100.s was copied from c64vt100.s and adjusted to the monochrome 80 column screen of the Apple //e. Again unnecessary code changes were avoided to allow to easily merge upcoming changes from c64vt100.s.

The files atrvt100.s and vic20vt100.s are for now just dummies to allow to successfully link Telnet65. Work for an actually functional Telnet65 would start with a copy of c64vt100.s (as it was done with a2vt100.s).
2017-05-19 00:12:42 +02:00
Oliver Schmidt
73d10bc0e4 Added get_filtered_input for the ATARI.
The code is totally(!) untested but added for now to just make programs link that refer to it.
2017-05-18 23:48:15 +02:00
Oliver Schmidt
a16b18c9cd Adjusted to commit 3d5dd29988 2017-05-18 23:23:03 +02:00
Oliver Schmidt
5144fcc803 Have get_key display a cursor.
On the Apple II this is already the case. The ATARI would need to be checked.
2017-05-16 23:44:04 +02:00
Oliver Schmidt
982b1d45f6 Allow lower case input too.
The ][ doesn't have lower case but the //e defaults to lower case so we need to allow both upper case and lower case (and convert to lower case before DNS lookup).
2017-05-16 22:56:38 +02:00
Oliver Schmidt
3d5dd29988 Fixed error value.
So far the error value was set to KPR_ERROR_TIMEOUT_ON_RECEIVE on negative answer from the DNS server. Now KPR_ERROR_DNS_LOOKUP_FAILED (which was already defined) is set.
2017-05-15 22:09:10 +02:00
Oliver Schmidt
f331f3f43f Fixed ARP setup.
In general I consider the approach of a netmask length a typical case of over-optimzation - incl. the typical downside of an "unnecessary" bug. However as the optimization is already present I opted to not remove it but rather fix the bug:

So far the gateway was in usual environments only used if the target IP address differed already in the first byte from the local net IP addresses. Now the gateway is used correctly - even for i.e. the address 192.168.1.1 from the local net  192.168.0.x
2017-05-15 21:20:51 +02:00
Oliver Schmidt
8c247e1473 Use actual Delete key for delete (too). 2017-05-12 13:30:02 +02:00
Oliver Schmidt
d8ab960443 Some minor changes. 2017-05-07 20:53:04 +02:00
Oliver Schmidt
64e767a0a4 Made get_key_if_available actually work.
On the A2 get_key deletes any already pressed key. Therefore it's a bad idea(tm) to call it to retrieve the key detected in get_key_if_available. So now get_key_if_available insteads retrieves the key on its own via direct hw access. This was already done the very same way in check_for_abort_key. And apart from not working as expected the benefit of get_key displaying a cursor wasn't useful here anyway because get_key was supposed to return right away with the pressed key so the cursor wouldn't have been visible at all.
2017-05-03 20:51:06 +02:00
Oliver Schmidt
645b6c0939 Replaced jsr get_key_ip65 with jsr get_key.
- The C64 variant already used get_key and I don't see a reason why the A2 has different requirements when it comes to the question when it is necessary to call ip65_process.

- On the A2 get_key does display a cursor while get_key_ip65 does not. However get_filtered_input is used to get a string of characters. This is exactly the scenario asking for a cursor.
2017-05-03 20:39:59 +02:00
Oliver Schmidt
b216fa92c7 Some minor changes. 2017-05-02 20:39:27 +02:00
Oliver Schmidt
a242bcf176 Adjusted test to recent change.
c9b309eff4 changed tftp_filename from zeropage to absolute.
2017-05-02 20:36:58 +02:00
Oliver Schmidt
c9b309eff4 Avoid trash of zero page variable.
It's not save to presume any zero page variable to stay intact after using the Ethernet drivers to perform actual network I/O. In example a necessary ARP lookup may require network I/O in not anticipated scenarios. Therefore the tftp_filename is rather to be placed in a normal variable and copied to a zero page variable just-in-time.
2017-04-10 09:06:18 +02:00
Oliver Schmidt
24ab67ce26 Switched from DOS3.3 to ProDOS for IP65demo.dsk
With ProDOS 2.4.1 there's now a nice universal ProDOS - and testing/showcasing compatibility with 'Uther II Drive' requires ProDOS...
2016-10-16 23:51:53 +02:00
Oliver Schmidt
12909ff163 Check for W5100 first.
Check first for a W5100 as checking for the CS8900A / LAN91C96 on similiar ports accidentally screws up a potential W5100 shared access (https://github.com/a2retrosystems/mxp/wiki/W5100-Shared-Access).
2016-09-18 17:57:13 +02:00
Oliver Schmidt
c05e55b0e5 Added compatibility with W5100 shared access.
If the setup of socket 0 to 3 with 4+2+1+1KB is detected then the W5100 is _not_ initialized, otherwise it does set up socket 0 and 1 with 4KB each. Either way socket 0 is used - now with 4KB instead of 8KB as before.
2016-04-05 20:55:45 +02:00
Oliver Schmidt
6bafcf649c Adjusted to recent cc65 linker config changes. 2016-03-30 16:06:45 +02:00
Oliver Schmidt
1a4a85d467 Removed W5100 demo code.
The W5100 demo programs are now available at https://github.com/oliverschmidt/uthernet
2016-02-13 18:34:38 +01:00
Oliver Schmidt
b3f40e5881 Fixed comment. 2015-11-23 20:42:43 +01:00
Oliver Schmidt
1d2b02df9e Fixed comment. 2015-11-23 15:57:54 +01:00
Oliver Schmidt
735dced371 Merge pull request #1 from groessler/something_to_pull
replace absolute values with defines from atari.inc
2015-09-09 14:43:16 +02:00
Christian Groessler
92957893c6 replace absolute values with defines from atari.inc 2015-09-09 14:04:07 +02:00
Oliver Schmidt
6766c2f711 Don't show dos.sys & dup.sys. 2015-08-28 20:29:43 +02:00
Oliver Schmidt
6987df44ed Added support for the ATARI 8-bit with Dragon Cart.
The actual ATARI-specific code is "inspired" by the IP65 variant published in http://atariage.com/forums/topic/211161-dragoncart-software/?p=2734494. The timer routines are modeled after the ones for the VIC20.
2015-08-28 15:19:52 +02:00
Oliver Schmidt
fad1b7364c Improved VBL handler installation check.
Check hibyte of old handler in case it happens to be placed on a page boundary (+ minor beautifications).
2015-08-28 14:42:29 +02:00
Oliver Schmidt
43289fcc5f Minor beautifications. 2015-08-28 14:38:50 +02:00
Oliver Schmidt
d09cda81f8 Set server IP address to "usual" default. 2015-08-11 16:45:15 +02:00
Oliver Schmidt
16dfe30649 Just some minor cleanup. 2015-08-11 15:19:59 +02:00
Oliver Schmidt
96402c8048 Added a C-only W5100 TCP driver. 2015-08-11 14:21:56 +02:00
Oliver Schmidt
45479c7ba1 Do not use a power of two as test packet size as other values give more interesting results. 2015-08-11 14:18:52 +02:00
Oliver Schmidt
392b42888c Added W5100 TCP driver.
The W5100 TCP driver is intentionally very similiar to the UDP driver. It comes with its own test program (again similiar to the UDP test program) and an extension to the communication peer program to support the test program.
2015-08-02 17:23:26 +02:00
Oliver Schmidt
56e8a19b2f Made W5100 UDP driver directly callable from C. 2015-08-02 17:08:12 +02:00
Oliver Schmidt
23e622ef8d Added context to W5100 UDP driver.
In order to ease exploring the W5100 UDP driver a simple test program using it was added. Additionally a communication peer program was introduced. The latter builds as-is for Windows using i.e. the VC++ command line 'cl w5100_peer.c'.
2015-08-01 18:57:58 +02:00
Oliver Schmidt
45955e3e6d Removed cfg_get_configuration_ptr.
cfg_get_configuration_ptr was introduced for NB64 - which is out of scope for this IP65.
2015-07-08 16:20:47 +02:00
Oliver Schmidt
1019985e8d Made use of recent changes for the web server demo.
The Apple 2 web server now uses the "combo" library and optionally uses a2_set_slot to scan all slots for the Ethernet card. Combining both with DHCP allows for complete auto configuration.
2015-07-08 15:51:59 +02:00
Oliver Schmidt
40ed729b08 Added option to set ethernet slot on the Apple 2. 2015-07-08 15:46:28 +02:00
Oliver Schmidt
e1e0aedba4 Exit web server on initialization failure.
As we use the web server for IP65 demo it makes sense to have it behave somewhat more consistent.
2015-07-08 15:44:48 +02:00
Oliver Schmidt
dfd4158a96 Allow fixup to be repeated.
There are scenarios in which it is beneficial to search for an Etherne chip at several i/o locations. To do so the chip initialization is performed at several i/o locations until it succeeds. In order to allow for that operation model the i/o location fixup needs to be repeatable.

Note: This won't work with the RR-Net because the fixup bits overlap with the chip i/o bits.
2015-07-08 15:42:42 +02:00
Oliver Schmidt
0b3e0c2173 Introduced IP65 "combo" libraries.
Up to now every IP65 library contained exactly one Ethernet driver. In scenarios without strict memory limitations I might however be benefitial to have an IP65 library containing all Ethernet drivers available for a given target.

The Ethernet hardware detection that was already present before is used in this scenario to try to initialize one Ethernet driver after the other until one succeeds. If all drivers fail to initialize the user gets informed as usual.

The WIZ811MJ driver was primarily introduced for orthogonality reasons. There are however at least two W5100-based prototypes for the C64 so it makes at least some sense. The name was chosen as sort of placeholder for "something containing a W5100 chip".
2015-07-08 10:13:08 +02:00
Oliver Schmidt
3219d97e4c Allow to build some rudimentary demo disk.
The HTTPD program seems to be the only one somewhat useful for demo purposes. So I added the option to build a "IP65demo" disk containing it for all supported Ethernet devices - currently for the Apple2 only.
2015-04-13 22:42:11 +02:00
Oliver Schmidt
8a903a5cdf Added some linefeeds to clean up console output. 2015-04-13 22:38:55 +02:00