GideonZ / 1541ultimate

Official GIT archive of 1541 ultimate II sources
GNU General Public License v3.0
181 stars 47 forks source link

Feature proposal: Swiftlink cartridge emulation #117

Open rhalkyard opened 5 years ago

rhalkyard commented 5 years ago

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:

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:

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 commented 4 years ago

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 commented 2 years ago

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