Commit Graph

15 Commits

Author SHA1 Message Date
Oliver Schmidt
a5d7a06027 Enhanced Ethernet drivers.
Made Ethernet drivers easier to consume by assembly programs.
* Replaced function pointers with JMP instructions.
* Provide return values additionally via Carry flag.

Reset Ethernet chips on initialization.
Both for the CS8900A and the W5100 the data sheets just say that
the RESET bit is automatically cleared after the RESET. This may
be interpreted in two ways:
1) There's no need to be afraid of reading the RESET bit as 1 and
unintentionally trigger a RESET by writing it back after ORing in
some other bit.
2) The RESET process isn't complete before the RESET bit hasn't
become 0 again.
It's impossible for me to empirically falsify the latter option
as the drivers are supposed to work on faster machines than the
ones I have access to. And if the RESET process includes things
like oscillators then the time to complete the RESET could differ
even between multiple exemplars of the same chip. Therefore I
opted to presume the latter option.
However that means a non-exsistent chip may cause an infinite
loop while waiting for the RESET bit to be cleared so I finally
added code to detect the presence of the Ethernet chips. There's
a risk of a chip being locked up in a way that makes the detection
fail - and therefore the RESET not being performed. This catch-22
needs to be solved by the user doing a hard RESET.
2014-06-12 22:56:35 +02:00
Oliver Schmidt
f124425ee1 Build static Ethernet drivers directly from source. 2014-06-09 23:14:11 +02:00
Oliver Schmidt
5829bc5159 Adjustment to cc65 change. 2014-05-01 21:32:32 +02:00
Oliver Schmidt
1bf5b4380d Saved six more bytes ;-) 2013-11-13 23:32:49 +01:00
Oliver Schmidt
2d7d1b123d Added 6502 driver for WIZnet W5100 in MACRAW mode. 2013-11-09 23:15:20 +01:00
Oliver Schmidt
7c2f3b3911 Saved another byte ;-) 2013-10-03 22:32:12 +02:00
Oliver Schmidt
ea08635ca4 Optimized CS8900A driver for speed and size.
- Speed: The primary byte copy loops are reduzed to the bare minimum by adjusting the base pointer 'ptr' and loop register 'y' in such a way that the 'y' overflow matches the low byte of the loop size.

- Size: Factored out all repeated code into subroutines. Introduced a loop for setting the MAC address.

Additional minor changes:

- Activate frame reception as last step of initialization after CS8900A configuration.

- Properly set internal address bits used by the CS8900A.
2013-09-12 23:32:25 +02:00
Oliver Schmidt
fb1de74dc4 The current cc65 build doesn't require this workaround anymore. 2013-06-28 00:36:33 +02:00
Oliver Schmidt
79bb5ea73f Removed some more old RCS tags from the Contiki source tree. 2013-06-13 15:54:26 +02:00
Oliver Schmidt
74dfff972f Do not reject frames with a length exactly equal to the uIP bufer size. 2013-01-30 23:39:01 +01:00
oliverschmidt
69a16d89c5 Fixed typo. 2007-12-08 21:19:06 +00:00
oliverschmidt
a980f40bf6 Take in account that the C64 Retro Replay clockport needs to be activated in order to work with the RR-Net Ethernet card. 2007-12-08 21:05:48 +00:00
oliverschmidt
b51a680a02 Minor optimization. 2007-11-29 21:56:55 +00:00
oliverschmidt
7fc383e100 Minor change in comment. 2007-11-24 12:57:09 +00:00
oliverschmidt
e6e6ea415c Generic Cirrus Logic CS8900A driver for cc65 targets. The driver is intended to be loaded dynamically as relocatable module. It modifies itself to accomodate different Ethernet IO address locations:
- C64 TFE ($DE00)
- C64 RRNet ($DE08)
- Apple2 Uther ($C0x0)
2007-11-19 23:14:14 +00:00