Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature proposal: Swiftlink cartridge emulation #117

Open
rhalkyard opened this issue Oct 9, 2019 · 2 comments
Open

Feature proposal: Swiftlink cartridge emulation #117

rhalkyard opened this issue Oct 9, 2019 · 2 comments

Comments

@rhalkyard
Copy link

rhalkyard commented Oct 9, 2019

I came across issue #16 recently, discussing adding MIDI support, and this got me thinking. From the C64's perspective, there is very little difference between most MIDI cartridges, and SwiftLink-style serial cartridges - they are all ACIAs, they just differ in their baud rate clocks and address decoding.

A generic 'ACIA device' cartridge type could support either an RTP-MIDI software stack as I mentioned in #16, OR, various emulated serial devices, such as:

  • Redirect to a file

  • Outbound connection to a fixed IP address and port

  • Listening for incoming connections

  • IP232 connection to tcpser running on a PC (IP232 uses a simple escape sequence for signalling of DCD and DTR state in-band with the TCP data stream)

  • Full modem emulation (like tcpser but running on the Ultimate-II itself)

While I'm an enthusiastic proponent of the network command interface, there's a lot of existing communications software out there that will likely never be patched to support it. A lot of that software supports SwiftLink or similar devices, and building SwiftLink emulation into the Ultimate-II would increase its 'one cartridge that does everything' appeal.

From a logic perspective, the ACIA seems fairly straightforward (a handful of registers and the ability to generate an IRQ or NMI), and the software emulation of it could be significantly simplified from what the real thing does (no need to handle start/stop bits or parity). The 'baud rate' would just affect how frequently the software updates the transmit and receive registers.

As well as a new cartridge type, the settings UI would need a handful of new options:

  • Address decoding (Swiftlink-compatible RS232, Passport MIDI, Datel MIDI, Kerberos MIDI, etc.) - different models use different address decoding, and MIDI cartridges clock the ACIA differently to RS232)

  • Interrupt type (NMI, IRQ, disabled) - this is selectable on some cartridges, fixed on others

  • Emulation mode (file, outbound IP/port, inbound port, IP232 IP/port, modem, RTP-MIDI)

  • Filename/hostname:port/port/etc. parameter(s) for above

I'm new to the 1541 Ultimate codebase (and have never worked with VHDL) so I can't promise a work of great beauty, but I'm keen to try implementing this if there is interest (and if I find time over the next few months). I'll see if I can figure out the VHDL side of things myself, but if anyone more familiar with that side of things wants to pitch in, I'd welcome it.

@GideonZ
Copy link
Owner

GideonZ commented Mar 24, 2020

Version 3.7 will have the ACIA emulation, plus a light weight modem emulation layer, which routes the ACIA access to the LAN port. Also incoming connections are supported. Address decoding and IRQ/NMI options are there.

However, there is no option to route to a file. I am not sure how to support MIDI, as it would require 31250 bps, rather than the standard Swiftlink speeds. Maybe I should add an option to fully silence the RING sequence when an external connection is made, and directly go to relay mode, even before the "ATA" command is given. This makes it possible to bypass the modem emulation, although +++(delay)ATH would still work and disconnect the link.

I guess I would need to read into RTP-MIDI to see if I can use that.

@xlar54
Copy link
Contributor

xlar54 commented Feb 11, 2022

Can this ticket be closed? MIDI is a feature req in another ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants