Parallel port MIDI interface
Re: Parallel port MIDI interface
Well, at least now I know that the interface works fine, I tested it on a retro PC with satisfactory results.
Did not even have to use the optional +9VDC connector, the parallel port power delivery was apparently sufficient.
Did not even have to use the optional +9VDC connector, the parallel port power delivery was apparently sufficient.
-
- Flight Lieutenant
- Posts: 322
- Joined: Thu Sep 21, 2006 7:45 pm
- Location: 26000 Valence, FRANCE
- Contact:
Re: Parallel port MIDI interface
The problem you'll have with these devices on the ORIC printer port is indeed missing signals like BUSY.
On PC the standard port (uni-directional) was only meant to use the 8 data bits for output, so devices had to use those other signals to send back data in nibbles. This won't work at all on ORIC.
Later on, other modes were added for faster bi-directional communication, to plug all things non-printers that should have used SCSI except that it would be too expensive, like zip drives.
I fear they all use all existing lines as much possible too, so are probably not directly usable either.
On PC the standard port (uni-directional) was only meant to use the 8 data bits for output, so devices had to use those other signals to send back data in nibbles. This won't work at all on ORIC.
Later on, other modes were added for faster bi-directional communication, to plug all things non-printers that should have used SCSI except that it would be too expensive, like zip drives.
I fear they all use all existing lines as much possible too, so are probably not directly usable either.
Re: Parallel port MIDI interface
Yeah, and the same issue on the Atari ST, they both use the YM chip as a 8bit interface, but with missing signals as well.mmu_man wrote: ↑Sun Jan 23, 2022 10:05 pm The problem you'll have with these devices on the ORIC printer port is indeed missing signals like BUSY.
On PC the standard port (uni-directional) was only meant to use the 8 data bits for output, so devices had to use those other signals to send back data in nibbles. This won't work at all on ORIC.
I wonder how difficult it would be to build a proper parallel port connector as a bus expansion, with say a few registers in page 3, to send and receive data and check status?
-
- Flight Lieutenant
- Posts: 322
- Joined: Thu Sep 21, 2006 7:45 pm
- Location: 26000 Valence, FRANCE
- Contact:
Re: Parallel port MIDI interface
Probably not much, some of the chips used in the old PCs could probably interface with the bus. Now how many interfaces would you want to plug on this that could be redone directly on the bus or over actual parallel port?
Re: Parallel port MIDI interface
Well, the MIDI interface would be easy to do directly as an Oric card, there were schematics for that.Now how many interfaces would you want to plug on this that could be redone directly on the bus or over actual parallel port?
I was more thinking of driving the scanner or possibly the black and white camera from the Oric, just for the fun.
I know that would work, because a guy did it on the Apple II
http://schmenk.is-a-geek.com/wordpress/?p=4
http://schmenk.is-a-geek.com/wordpress/?p=17
- ibisum
- Wing Commander
- Posts: 1652
- Joined: Fri Apr 03, 2009 8:56 am
- Location: Vienna, Austria
- Contact:
Re: Parallel port MIDI interface
Hey, guys ..
Why not add MIDI to the Oric by using an Arduino approach, and use the same technique that the 8-bit Hub uses, writing/reading the Oric's pins on an interrupt .. this way we get Read/Write from the Oric to a somewhere .. saner .. environment. MIDI on Arduino is a no-brainer, btw.
See for example the Arduino code here:
(From the 8-bit Hub repo here: https://github.com/8bit-Dude/8bit-Hub/b ... ga2560.ino)
EDIT: I realise this may be a project where you just want to see what you can do to get the PC/P working .. but even still, putting an Arduino between the two, to do the logic conversion, isn't cheating *that* much.
Why not add MIDI to the Oric by using an Arduino approach, and use the same technique that the 8-bit Hub uses, writing/reading the Oric's pins on an interrupt .. this way we get Read/Write from the Oric to a somewhere .. saner .. environment. MIDI on Arduino is a no-brainer, btw.
See for example the Arduino code here:
Code: Select all
////////////////////////////////
// ORIC Communication //
////////////////////////////////
void oricRead() {
// Setup pins for input
DDRG &= ~_BV(PG5); // Pin 4
DDRE &= ~_BV(PE3); // Pin 5
DDRH &= ~_BV(PH3); // Pin 6
DDRH &= ~_BV(PH4); // Pin 7
// Read 4 bits from computer
inByte |= ((PING & _BV(PG5))>0) << (interruptOffset++);
inByte |= ((PINE & _BV(PE3))>0) << (interruptOffset++);
inByte |= ((PINH & _BV(PH3))>0) << (interruptOffset++);
inByte |= ((PINH & _BV(PH4))>0) << (interruptOffset++);
}
void oricWrite() {
// Setup pins for output
DDRG |= _BV(PG5); // Pin 4
DDRE |= _BV(PE3); // Pin 5
DDRH |= _BV(PH3); // Pin 6
DDRH |= _BV(PH4); // Pin 7
// Write 4 bits to computer
if (outByte & (1 << interruptOffset++)) { PORTG |= _BV(PG5); } else { PORTG &= ~_BV(PG5); }
if (outByte & (1 << interruptOffset++)) { PORTE |= _BV(PE3); } else { PORTE &= ~_BV(PE3); }
if (outByte & (1 << interruptOffset++)) { PORTH |= _BV(PH3); } else { PORTH &= ~_BV(PH3); }
if (outByte & (1 << interruptOffset++)) { PORTH |= _BV(PH4); } else { PORTH &= ~_BV(PH4); }
}
void oricInterrupt() {
// Check ready pin (PC)
if (!(PINH & _BV(PH1))) {
// Setup pins for input
DDRG &= ~_BV(PG5); // Pin 4
DDRE &= ~_BV(PE3); // Pin 5
DDRH &= ~_BV(PH3); // Pin 6
DDRH &= ~_BV(PH4); // Pin 7
return;
}
// Check R/W pin
if (!(PINH & _BV(PH0))) {
oricRead();
interruptMode = 1;
} else {
oricWrite();
interruptMode = 0;
}
// Cycle ACKNOW pin (HUB)
PORTE &= ~_BV(PE4); // Pin 2 LOW
delayMicroseconds(10);
PORTE |= _BV(PE4); // Pin 2 HIGH
// If byte complete?
if (interruptOffset < 8) {
// Update timer
interruptTimer = millis();
} else {
// Reset offset/timer
interruptOffset = 0;
// Process data
if (interruptMode) {
processByte();
inByte = 0;
#ifdef __DEBUG_IO__
inRec++;
#endif
} else {
outByte = comOutBuffer[++comOutInd];
#ifdef __DEBUG_IO__
outRec++;
#endif
}
}
}
(From the 8-bit Hub repo here: https://github.com/8bit-Dude/8bit-Hub/b ... ga2560.ino)
EDIT: I realise this may be a project where you just want to see what you can do to get the PC/P working .. but even still, putting an Arduino between the two, to do the logic conversion, isn't cheating *that* much.
Re: Parallel port MIDI interface
Yeah for midi that would probably work, because there's not much data to send.
That being said, as your suspected, the idea was to try a bunch of different devices (like scanners and cameras), in which case doing it like on the 8bit hub through the Oric parallel port - implies going through the VIA - is not super efficient.
Would it work to have the Arduino connected on the expansion bus, doing the Oric<->Arduino through some mapped registers somewhere, and then have the Arduino somewhat drive a parallel port connector?
I've no idea how many pins these things have, are there enough i/o to drive both a DB25 on one side and talk to the Oric on the other side?
That being said, as your suspected, the idea was to try a bunch of different devices (like scanners and cameras), in which case doing it like on the 8bit hub through the Oric parallel port - implies going through the VIA - is not super efficient.
Would it work to have the Arduino connected on the expansion bus, doing the Oric<->Arduino through some mapped registers somewhere, and then have the Arduino somewhat drive a parallel port connector?
I've no idea how many pins these things have, are there enough i/o to drive both a DB25 on one side and talk to the Oric on the other side?
Re: Parallel port MIDI interface
I think Fabrice already made a midi interface for Atmos around 2005?
Not sure where to find information about it thought (maybe CEO-Mag if he wrote an article about it).
Not sure where to find information about it thought (maybe CEO-Mag if he wrote an article about it).
Last edited by Symoon on Wed Jan 26, 2022 11:33 am, edited 1 time in total.
Re: Parallel port MIDI interface
It could be easier to add an external VIA (6522), addressed at #3F00 to #3FF for example.
Re: Parallel port MIDI interface
Well, if you refer to this thing, I never managed to get it working, possibly because of dead solder or something:
https://forum.defence-force.org/viewtop ... f=9&t=1793
Re: Parallel port MIDI interface
Mmmmh I don't think that's it.
I think it was demoed during a CEO meeting, but it was a full-day one and I missed the morning demos, thinking it was only the afternoon!
See there:
https://www.oric.org/magazine/ceomag-183.html#
I think it was demoed during a CEO meeting, but it was a full-day one and I missed the morning demos, thinking it was only the afternoon!
See there:
https://www.oric.org/magazine/ceomag-183.html#
Re: Parallel port MIDI interface
Maybe that was based on André's card, as indicated page 8 of issue 177?Symoon wrote: ↑Wed Jan 26, 2022 11:45 am Mmmmh I don't think that's it.
I think it was demoed during a CEO meeting, but it was a full-day one and I missed the morning demos, thinking it was only the afternoon!
See there:
https://www.oric.org/magazine/ceomag-183.html#
Logiciel Midi/Karaoke pour Oric
par Fabrice Francès
The Karaoke software for Oric is available at <http://oric.free.fr/DISKS/karaoke.zip>. So, if you want to prepare
the upcoming winter evenings, you must build a midi interface, or modify your Telestrat!
IMPORTANT NOTICE:
This program requires a hardware MIDI interface on your Atmos or Telestrat. Oric emulators don’t currently
emulate MIDI interfaces, so this program is only intended for real Oric. If you do a small modification of your
Telestrat (see CEO-MAG #176, Dec 2004), or build a MIDI interface for your Atmos (see for example <http:/
/www.teaser.fr/~amajorel/oricmidi>), and have a MIDI device (synthesizer or expander) connected to your
interface, then you have all what is required to have fun and impress your friends with Oric Karaoke evenings!