Commit Graph

10 Commits

Author SHA1 Message Date
Oliver Schmidt
023c87fc03 Added support for the C128.
Those two drivers are used by Contiki for the C128 - and we want to keep the driver sources identical.
2019-05-08 17:16:39 +02:00
Oliver Schmidt
8122d7d0d4 With per-target Ethernet drivers we can have per-target MAC addresses. 2019-05-05 10:41:57 +02:00
Oliver Schmidt
4577c2ab19 Removed Ethernet driver I/O base.
So far the base address of the Ethernet chip was a general property of all Ethernet drivers. It served two purposes:
1. Allowing to use a single Ethernet driver for a certain Ethernet chip, no matter what machine was connected to the chip.
2. Allowing use an Ethernet card in all Apple II slots.

However, we now use customized Ethernet drivers for the individual machines so 1.) isn't relevant anymore. In fact one wants to omit the overhead of a runtime-adjustable base address where it isn't needed.

So only the Apple II slots are left. But this should rather be a driver-internal approach then. We should just hand the driver the slot number the user wants to use and have the driver do its thing.

Independently from the aspect if the driver parameter is a base address or a slot number the parameter handling was changed too. For asm programs there was so far a specific init function to be called prior to the main init function if it was desired to chnage the parameter default. This was done to keep the main init function backward compatible. But now that the parameter (now the slot number) is only used on the Apple II anyhow it seems reasonable to drop the specific init function again and just provide the parameter to the main init function. All C64-only user code can stay as-is. Only Apple II user code needs to by adjusted. Please note that this change only affects asm programs, C programs always used a single init function with the Apple II slot number as parameter.
2019-05-02 14:44:24 +02:00
Oliver Schmidt
6f0e4a97b1 Now that we have per-target Ethernet drivers we can omit initialization code necessary only for a certain card/cart from all the other drivers for the same Ethernet chip. This is especially true for the code self-modification only necessary on the Apple II to accommodate to the multiple slots.
Note: The whole chip base address handling will be overhauled in subsequent changes.
2019-04-30 18:54:21 +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
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
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
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
e54bb71bcc 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
ecdaac2ff8 Distilled IP65 out of NETBOOT65. 2013-12-13 22:24:03 +01:00