Commit Graph

601 Commits

Author SHA1 Message Date
Oliver Schmidt
344d76829a 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
9dd014cded 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
fccc7e2dc2 Some minor changes. 2017-05-02 20:39:27 +02:00
Oliver Schmidt
09a98a6372 Adjusted test to recent change.
c9b309eff4 changed tftp_filename from zeropage to absolute.
2017-05-02 20:36:58 +02:00
Oliver Schmidt
8745021d7d 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
39975cab33 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
c4f196c71b 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
aea88482dd 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
f878fa8709 Adjusted to recent cc65 linker config changes. 2016-03-30 16:06:45 +02:00
Oliver Schmidt
ac653f55bd 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
51abda7b8d Fixed comment. 2015-11-23 20:42:43 +01:00
Oliver Schmidt
354aa76ef7 Fixed comment. 2015-11-23 15:57:54 +01:00
Oliver Schmidt
0c80160951 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
504a880d03 replace absolute values with defines from atari.inc 2015-09-09 14:04:07 +02:00
Oliver Schmidt
596a27720b Don't show dos.sys & dup.sys. 2015-08-28 20:29:43 +02:00
Oliver Schmidt
cd0506d862 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
8960e0bebb 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
da593744f4 Minor beautifications. 2015-08-28 14:38:50 +02:00
Oliver Schmidt
3abe99c7a2 Set server IP address to "usual" default. 2015-08-11 16:45:15 +02:00
Oliver Schmidt
ce033dab99 Just some minor cleanup. 2015-08-11 15:19:59 +02:00
Oliver Schmidt
2ec63af2e5 Added a C-only W5100 TCP driver. 2015-08-11 14:21:56 +02:00
Oliver Schmidt
9ac791e975 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
cf4d6b1fb8 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
24a5bcea85 Made W5100 UDP driver directly callable from C. 2015-08-02 17:08:12 +02:00
Oliver Schmidt
c9af38790a 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
ae98e5c01d 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
e451b74b07 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
a3305bb54d Added option to set ethernet slot on the Apple 2. 2015-07-08 15:46:28 +02:00
Oliver Schmidt
439e436f91 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
e5161061cc 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
8279ef4d63 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
190edaeba0 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
90dacb979e Added some linefeeds to clean up console output. 2015-04-13 22:38:55 +02:00
Oliver Schmidt
c1df88daa1 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
b3067aa499 Export dns_hostname_is_dotted_quad.
Of course one can just always call dns_resolve after dns_set_hostname. But an application might i.e. present a different user feedback depending on the fact if a name resolution is necessary at all. So given that DNS name resolution is already a two phase action it just seems natural to allow an application to read the already exsisting variable.
2015-04-13 21:01:59 +02:00
Oliver Schmidt
e83fb8b882 Removed superfluous AppleCommander parameters. 2015-02-21 17:18:14 +01:00
Oliver Schmidt
a7579f8e58 Adjusted inline doc to actual implementation. 2015-02-16 22:35:29 +01:00
Oliver Schmidt
5c7ccf0fca 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
7c3235b5bb 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
bc17aefbfe Improved random number generator on the Apple 2. 2015-02-16 17:48:48 +01:00
Oliver Schmidt
079e34939a Removed unused imports. 2015-02-16 17:47:26 +01:00
Oliver Schmidt
5aa1fab89f 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
2ae35b34d9 Replaced custom zeropage variables with cc65 default zeropage variables. 2014-07-07 20:56:21 +02:00
Oliver Schmidt
e06c02e4a3 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
5c95d03c48 Don't crash intentionally ;-)
I have no idea why this BRK was put there in the first place. At least nowadays it's pretty common to see IP packets that IP65 doesn't understand / need to understand. Just think of IGMP packets. We certainly don't want to crash on receiving those!
2014-06-12 21:31:05 +02:00
Oliver Schmidt
88758ce125 Updated contributors. 2014-04-28 18:57:13 +02:00
Oliver Schmidt
5e01331cf6 Removed libnet experiment. 2014-04-28 18:54:43 +02:00
Oliver Schmidt
8eca213d79 Improved file name consistency. 2014-04-28 18:50:02 +02:00
Oliver Schmidt
0f7542c654 Removed custom linker config files. 2014-04-28 18:41:54 +02:00
Oliver Schmidt
ce9a6076ad Fixed recently introduced addressing mode bugs. 2014-04-28 18:34:56 +02:00