Commit Graph

97 Commits

Author SHA1 Message Date
Bobbi Webber-Manners
10eaf46a8d EDIT: change all sprintf()->snprintf(); Add prompting to save_all(). 2020-08-16 17:19:23 -04:00
Oliver Schmidt
0fb3869716 Added support for the upcoming 'Dracarys' ATARI PBI device.
See https://atariage.com/forums/topic/287376-preannouncement-dragon-cart-ii/
2019-05-08 17:23:00 +02:00
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
29cbd19c89 Removed obsolete base addr references. 2019-05-05 19:14:17 +02:00
Oliver Schmidt
6652ba8184 Added support for RR-Net MK3 unique MAC addresses.
The RR-Net MK3 can be operated in two modes:

- In cartrigde mode it has a startup-ROM that sets the CS8900A MAC address to the unique MAC address.
- In clockport mode the driver has to read the two lowest MAC address bytes from the EEPROM and combine them with 28:CD:4C:FF.

See http://wiki.icomp.de/wiki/RR-Net#Detecting_MK3 for details.

The driver first checks if the current CS8900A MAC address starts with 28:CD:4C:FF. If it does, it overwrites its built in default MAC address with the CS8900A MAC address.

If the CS8900A MAC address didn't start with 28:CD:4C:FF, it checks if there are two valid MAC address bytes in the EEPROM. If they are there, it overwrites its built in default MAC address with a combination of 28:CD:4C:FF and those two bytes.
2019-05-05 12:33:45 +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
57dd2b362d Added dependencies reflecting include files. 2019-05-05 10:36:13 +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
43d7d33c31 Removed support for W5100 on the C64.
Now that we have per-target combo driver wrappers we can remove the W5100 support from the C64. There isn't any actual (known) W5100-based solution for the C64.
2019-04-29 16:41:27 +02:00
Oliver Schmidt
7e6b77f41b Build combo driver wrapper individually for each target.
The set of relevant drivers is after all different for each target. Building the combo driver wrapper individually opens the option to use .ifdef's to only include the drivers relevant for a certain target.
2019-04-29 16:31:59 +02:00
Oliver Schmidt
9c43d29f27 Build Ethernet drivers individually for each target.
After all the Ethernet cards/carts are different enough to ask for customized drivers. Building the drivers individually opens the option to use .ifdef's to customize them.
2019-04-29 16:27:07 +02:00
Oliver Schmidt
ab63d8dcf9 Added library for Apple II C programs supporting only the Uthernet II.
The W5100 can be accessed pretty well from C without any library. A C program doing so is of course incompatible with the Uthernet and the LANceGS. So the program needs to make sure that that there' an Uthernet II. It can do so by comparing 'eth_driver_name' with "Uthernet II". However, when space it tight it doesn't seem reasonable to link all Ethernet drivers in the first place.
2018-08-01 19:00:40 +02:00
Oliver Schmidt
69e72e1114 Minimal comment fix. 2018-07-21 18:37:42 +02:00
Oliver Schmidt
c89a2ae1ba Adjusted include file extension to ca65 practice. 2018-02-23 16:36:05 +01:00
Christian Groessler
afada39f9a Use CC65 runtime for Atari and C64 timer functions
This is just for the "C" interface of IP65. clk_timer.s replaces
atr_timer.s (on Atari) and is new for the C64 (there wasn't an
implementation for the "C" interface before).
2018-02-02 20:34:59 +01:00
Oliver Schmidt
cbb93d96fa Add a C interface for atarixl target.
Just some Makefile tweaks were needed...
2017-11-27 23:22:47 +01:00
Oliver Schmidt
85b311ab27 Introduced atr_timer.s
The C library allows us manage de-initializations via atext() so we can avoid the explict timer_exit call necessary in atrtimer.s (used for assembler programs).
2017-11-15 20:13:52 +01:00
Oliver Schmidt
6680772b04 Introduced C interface to IP65.
The IP5 usage of ld65 segments and zeropage variables was made compatible with cc65 C programs already a while ago. This commit is the next logical step which is to introduce the actual C interface to IP65.

IP65 for C programs shares the the ip65.lib / ip65_tcp.lib with IP65 for assembler programs. However the various libraries from the 'drivers' are not reused. Instead there's exactly one library for every target named ip65_<target>.lib. Those libraries contain only functions used by ip65.lib / ip65_tcp.lib.

TODOs:

- Introduce c64_timer.s and atr_timer.s.
- Add a C interface to the rest of the IP65 functionality (especially TCP).
2017-11-05 14:28:49 +01:00
Christian Groessler
fc4a2aab96 c64input.s: fix latency when typing 2017-09-30 16:17:07 +02:00
Christian Groessler
6e82e722ad Revert "c64input.s: fix stray cursor image in host and port entry"
This reverts commit 03b2579e33.
2017-09-30 15:57:30 +02:00
Oliver Schmidt
8b3c53ee67 c64input.s: fix stray cursor image in host and port entry
This introduces some latency when typing in host name and port. But
I think that's acceptable. (reverted from commit 36369fb714)
2017-09-30 14:57:18 +02:00
Christian Groessler
7145c4e8a0 c64input.s: fix stray cursor image in host and port entry
This introduces some latency when typing in host name and port. But
I think that's acceptable.
2017-09-29 15:47:44 +02:00
Christian Groessler
78864d2c56 atrvt100.s: use ADRESS instead of xVector variable
This was probably an artifact from early stages of porting to the
Atari. Problem manifested itself e.g. when hitting DEL in the middle
of a 'bash' input line.
The change also includes some cleanups as suggested by Oliver.
2017-09-25 23:40:55 +02:00
Christian Groessler
0c0fd3f397 atrtimer.s: initialize the interrupt variables before enabling the interrupt 2017-09-25 17:07:25 +02:00
Christian Groessler
7652194703 atrtimer.s, vic20timer.s: use decimal mode in interrupt handler
Using decimal mode (SED/CLD) reduces the memory footprint and execution time
of the interrupt routine. Some comments were added or fixed, too.
2017-09-24 02:29:42 +02:00
Christian Groessler
2685d01fe5 Adapt Atari timer code to PAL systems.
The vertical blank interrupt (which is used by the timer) runs with
60Hz on NTSC systems and 50Hz on PAL systems.
This commit also clears 'vbichain' in 'timer_exit', so a subsequent
'timer_init' would do the right thing.
2017-09-12 14:14:14 +02:00
Christian Groessler
e87fbb6111 atrvt100.s: remove a superfluous test introduced in last commit
The same test is eventually done in PrnChr.
2017-09-12 13:41:59 +02:00
Christian Groessler
12d66a2bd0 Atari: add line-drawing chars in font.
Also adds a check for valid ASCII char (<= 0x7f) in ProcIn, and fixes
two typos in a2vt100.s.
2017-09-11 23:35:16 +02:00
Christian Groessler
9fce65d948 atrvt100.s: remove spurious "jsr SLV"s
They were an artifact of previous tests.
2017-09-04 22:23:49 +02:00
Christian Groessler
96cfc32511 Atari: fix stray cursor image when connecting to BSDs.
FreeBSD and NetBSD, at least, have a banner message when you telnet into them
which has an empty line as first line. On those systems, an old "cursor" char
was visible at the top of the login prompt message.
This is fixed by enabling and disabling the cursor in 'get_key' while waiting
for a key press.
2017-09-04 20:03:50 +02:00
Christian Groessler
0a546a7eef Add custom font for the Atari version, fix Atari keyboard input handling. 2017-09-01 22:36:35 +02:00
Oliver Schmidt
a4552b0e34 Improved cursor handling consistency.
So far most of the time the cursor drawing was handled with a 'jsr COff - jsr COn' bracket around the drawing code. However in the area of screen erasing a different approach was used - which caused subtile issues.

4d729ec839 already fixed (most ?) of those issues for the Apple II and the ATARI. However it broke the approach 'jsr COff - jsr COn' brackets.

This is now adjusted - for all machines.
2017-08-30 20:04:57 +02:00
Oliver Schmidt
26e57930a0 Some minor changes.
In order to manage upcoming changes relevant to all machine types it's important that the files are easy to diff. This change improves the similarity between a2<...>.s and atr<...>.s.
2017-08-28 20:50:44 +02:00
Oliver Schmidt
981e3bb5f7 Merge pull request #3 from groessler/something_to_pull
Add VT100 driver for Atari.
2017-08-28 15:46:55 +02:00
Oliver Schmidt
9f611c5c1e Allow Telnet65 to send ASCII code 0 - on the C64.
Lars informed me that $F142 by default produces ASCII code 0 via Ctrl-@. One just needs a way to distinguish it from the no-key-press.

This means that the further processing can be done in that same as on the Apple II - meaning to just replace in the VT100 keyboard translation table $00 with $FF as code for ignore-key.
2017-08-20 20:58:49 +02:00
Christian Groessler
c6aaa3566f use $ff, $fe, etc. for special keys in the Atari version 2017-08-18 02:06:58 +02:00
Christian Groessler
9e3642c589 resolve conflicts with 'master' 2017-08-18 01:03:02 +02:00
Oliver Schmidt
463904988b Use symbols instead of hard coded constants for screen dimensions MkII. 2017-08-09 21:50:23 +02:00
Oliver Schmidt
39f83b7709 Allow Telnet65 to send ASCII code 0 - on the Apple II.
Chris made me aware that ASCII code 0 actually is a valid character (usually entered as Ctrl-Space or Ctrl-@) and that it is actually used (i.e. by EMACS).

The Apple II allows to natively enter the ASCII code 0 via Ctrl-@. However so far get_key_if_available returned 0 in accumulator to signal that no key was pressed. In order to allow the Apple II get_key_if_available to return the ASCII code 0 in the accumulator I changed it to use the carry flag to signal that no key was pressed.

Because get_key_if_available needs of course to behave the same on all targets I changed the other implementations to use the carry flag too.

Unfortunately I don't know enough about input capabilities of the C64 to decide on how to best get Telnet65 to send ASCII code 0 there.
2017-08-09 21:27:28 +02:00
Christian Groessler
e2b58b0683 Add VT100 driver for Atari.
A special font will be needed for best user experience. This is not
included yet.
2017-08-02 23:25:00 +02:00
Oliver Schmidt
0ecc367b85 No need to split the help screen. 2017-08-02 20:45:34 +02:00
Oliver Schmidt
c731544dbf Minor sytle adjustment. 2017-08-02 14:29:27 +02:00
Oliver Schmidt
df239024ed Merge pull request #2 from groessler/something_to_pull
a2vt100.s: use symbols instead of hard coded constants for screen dimensions
2017-08-02 14:24:55 +02:00
Oliver Schmidt
eac9bfbec2 Resurrected help screen from CaTer. 2017-08-02 14:18:50 +02:00
Christian Groessler
2b858bf7df a2vt100.s: use symbols instead of hard coded constants for screen dimensions. 2017-08-02 14:09:38 +02:00
Oliver Schmidt
6717fb7bc0 Actively redraw cursor.
On the C64 the cursor is flashing (driven by a timer interrupt routine). So in order to have the cursor appear all it takes is to make sure that the interrupt routine:
- understands that it should actually work on the cursor
- has a correct understanding about what char is "under" the cursor

On the Apple II on the other hand the cursor has always to be actively drawn. Therefore all the places where the C64 code just updates the char under the cursor the Apple II code needs to actually draw the cursor.

We learned this the hard way with 'nvi'. When pressing <enter> in insert mode it sends the following data:

0d 00 1b 5b 31 42 1b 5b 4b

This means to return the cursor (to col 1), do nothing, then move it down 1 row and finally remove all chars from the cursor to the end of the line. The latter is one of the instances requiring to actively redraw the cursor (when set to be visible) as it was removed (when set to be visible).
2017-08-01 20:54:11 +02:00
Oliver Schmidt
a987c40490 Allow to influence the user abort check.
It's imho in general a pretty unfortunate design to have IP65 check the keyboard during blocking operations. Rather it should call back into the application and have that decide what type of user abort it wants to offer.

Anyhow I don't want to change all that - at least not now. Therefore I just added the option to influence which key is considered the abort key - and provide a key value that isn't actually used and as such disables the abort check.
2017-06-05 17:20:27 +02:00
Oliver Schmidt
9fb964c828 Generalized Apple II slot setting.
In order to allow setting the Apple II slot from host computer independent code the slot setting function was renamed and dummies were added for the other host computers.
2017-06-04 00:10:36 +02:00
Oliver Schmidt
22bac4665e Some minor comment fixes. 2017-06-03 13:36:50 +02:00