Commit Graph

47 Commits

Author SHA1 Message Date
Oliver Schmidt
dfcc130e51 Some minor (style) fixes. 2017-06-02 18:55:27 +02:00
Oliver Schmidt
c6ce18d172 Some minor style fixes. 2017-05-29 22:26:38 +02:00
Oliver Schmidt
eb6e069cd6 Map C64 F1-F8 keys to terminal keys.
The VT100 has (P)F1-(P)F4 keys. The C64 F1-F4 keys are mapped them. Additionally the C64 F5-F8 keys are mapped to the XTERM F5-F8 keys. However as we pretend to be a VT100 applications tend to ignore them.
2017-05-29 21:35:41 +02:00
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
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
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
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
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
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
Christian Groessler
92957893c6 replace absolute values with defines from atari.inc 2015-09-09 14:04:07 +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
40ed729b08 Added option to set ethernet slot on the Apple 2. 2015-07-08 15:46:28 +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
56dbac78ef Remove received packet(s) to allow to send one.
Behave just like the CS8900A driver: Both the CS8900A and the LAN91C96 dynamically share a buffer for received packets and packets to be send. If the chip is exposed to a network with a lot of broadcasts the shared buffer might fill quicker with received packets than the 6502 reads them (via polling). So we might need to drop some received packets in order to be able to send anything at all.
2015-04-13 21:09:15 +02:00
Oliver Schmidt
ea8be71805 Reduced size of typical binary.
The pretty small check_for_abort_key is used by DHCP and DNS which means it is used by about every IP65 program. The pretty large get_filtered_input on the other hand is very seldom used so it makes sense to put the latter in a separate module to keep it from ending up in binaries unused.
2015-02-16 22:29:22 +01:00
Oliver Schmidt
2e765dbc64 Added LC2UC conversion for the Apple ][ and replaced column-setting-hack with printing a carriage return. 2015-02-16 17:50:26 +01:00
Oliver Schmidt
6178e51148 Fixed hardware detection.
The previous chip detection was inspired by the old IP65 driver code. For some reason it didn't work as expected. The new code is simpler and based on this statement in the chip datasheet: "The upper byte always reads as 33h and can be used to help determine the I/O location of the LAN91C96."
2014-07-12 11:27:01 +02:00
Oliver Schmidt
a0bd7e819a Replaced custom zeropage variables with cc65 default zeropage variables. 2014-07-07 20:56:21 +02:00
Oliver Schmidt
4c0ae26c19 1. Replaced IP65 Ethernet drivers with Contiki drivers.
* CS8900A
The Contiki driver allows to adjust the chip base addr at runtime (which  allows to support different slots in the Apple II) and removes received frames from the chip if there's no room to send frames.

* LAN91C96
The Contiki driver was used by IP65 more or less unchanged in the first place.

* W5100
The Contiki driver allows to adjust the chip base addr at runtime (which  allows to support different slots in the Apple II) and stays clear from the W5100 hybrid mode. It presumes a fully functional W5100 register auto-increment and pre-calculates necessary W5100 frame buffer wrap-arounds and thus achieves the maximal 6502 <-> W5100 transfer speed.
2014-06-13 00:00:53 +02:00
Oliver Schmidt
c4804c4eee Improved file name consistency. 2014-04-28 18:50:02 +02:00
Oliver Schmidt
dbf6fe00a0 Removed custom linker config files. 2014-04-28 18:41:54 +02:00
Oliver Schmidt
09c718b74f Removed explicit copying of defaults.
It's the very purpose of the DATA segment to consolidate all items that potentially need to be copied from ROM to RAM. So there's no need to / point in doing that on a per-item-base.
2014-04-27 19:17:48 +02:00
Oliver Schmidt
3af8fadbef Removed several custom segments. 2014-04-27 18:59:58 +02:00
Oliver Schmidt
636d340b5f Added A2 'timer_seconds' dummy.
The implementation just always returns 0 thus actually disabling timeouts.
2014-04-13 18:47:13 +02:00
Oliver Schmidt
79028c849b Allow all test programs to run on the VIC20:
- Added exit_to_basic symbol.
- Aligned linker config with C64 linker config.
- Made switch to lower charset compatible.

Allow all test programs to run with LANceGS card.

Aligned C64 input file name.
2013-12-29 23:39:35 +01:00
Oliver Schmidt
4a695f97cc General source code cleanup.
- Tab chars were partially used with the unusual width of two blanks. I removed them altogether.
- Line endings were inconsistent even iniside individual files. I normalized them.
- I introduced a consistent coding style regarding comment indenting and blank line usage.
- I removed trailing spaces.
- I removed newlines following unnamed labels.
- ...
2013-12-27 14:57:56 +01:00
Oliver Schmidt
68e869617b Some more cleanup.
- Removed VT100 font belonging to NETBOOT65.
- Removed machine / cart specific tests.
- Have Makefiles ignore errors on the clean goal.
2013-12-27 14:48:16 +01:00
Oliver Schmidt
7b5522ba27 Removed several files that seem to rather belong to NETBOO65. 2013-12-17 22:28:49 +01:00
Oliver Schmidt
624ab62d25 Some test program cleanup.
- Simplify Makefile by allowing to use suffix '_tcp' to denote the requirement to link against TCP-capable IP65 lib.
- Remove 'test' or 'test_' prefix from test program names - every program in 'test' is a test program.
- Have some more test programs switch to lower case charset on the C64.
- I'm no Ruby guy so don't rely on Ruby for building disk images.
2013-12-15 22:50:01 +01:00
Oliver Schmidt
9197cd8ede Distilled IP65 out of NETBOOT65. 2013-12-13 22:24:03 +01:00
jonnosan
401effa912 restructure source tree to get better split between client (ca65) and server (ruby) files
git-svn-id: http://svn.code.sf.net/p/netboot65/code@13 93682198-c243-4bdb-bd91-e943c89aac3b
2009-01-22 01:15:28 +00:00
jonnosan
b035d8a091 git-svn-id: http://svn.code.sf.net/p/netboot65/code@4 93682198-c243-4bdb-bd91-e943c89aac3b 2009-01-10 12:04:57 +00:00
jonnosan
b2d1f1875f add credits for IP65 files, clean up Makefiles
git-svn-id: http://svn.code.sf.net/p/netboot65/code@2 93682198-c243-4bdb-bd91-e943c89aac3b
2009-01-10 10:18:51 +00:00
jonnosan
5456aff2a8 git-svn-id: http://svn.code.sf.net/p/netboot65/code@1 93682198-c243-4bdb-bd91-e943c89aac3b 2009-01-10 08:41:35 +00:00