Page 1 of 1

Serial.device selection under amigaos

Posted: Sun Aug 18, 2019 10:39 pm
by plouf
Recently i start investigating Serial under amigaOS

i found really "limiting" the hardcoded selection of "serial.device" since under morphos for example there is never serial.device but usb>serial devices where it is needed to select another device e.g serialpl2303.device

therefore selection under amigaos is needed :)

Re: Serial.device selection under amigaos

Posted: Mon Aug 19, 2019 3:08 am
by SamuraiCrow
What's wrong with a preprocessor macro for the different OS's serial devices?

Re: Serial.device selection under amigaos

Posted: Mon Aug 19, 2019 7:26 am
by plouf
sorry, but how can this help ?

Re: Serial.device selection under amigaos

Posted: Mon Aug 19, 2019 8:48 am
by jPV
Oh yeah, I haven't checked serial stuff in Hollywood yet, but if you really can't define the device driver to be used, it's quite limiting in many aspects.

Not only in MorphOS, but on real Amigas you also might want to use USB serial adapters (I have Spider USB on my main classic Amiga).

And not to talk that many use serial.device replacements on real Amigas. For example, in modem based BBS/Internet times people commonly used 8n1.device and other newer devices that were much quicker than the original Commodore's serial.device. I can't see why they wouldn't be using them still.

And then there are serial port hardware expansions. A1200 had many clockport adapters, bigbox Amigas have MultiFaceCards etc. And in my case, my main Amiga's internal serial port is broken, so I just can't use serial.device with it. I've been using MultiFaceCard III instead.. that works fine with communication programs and with games where you can select the device (like Napalm etc).

And preprocessor for this wouldn't be enough alone, there should be a way to make it user selectable. So, just add that option to OpenSerialPort?

Re: Serial.device selection under amigaos

Posted: Mon Aug 19, 2019 9:58 am
by plouf
as a temporary solution i found that replacing serial.device in morphos with a 68k one like 8n1.device_000
(thats renaming serial.device to mos_serial.device and 8n1.device_000 to serial.device)

step 1 renaming serial.device to mos_serial.device and 8n1.device_000 to serial.device (in sys:dev)
step 2 download setpat20 from aminet and patch "serial patch serialpl2303.device"
works with temr4.8 but with SerialThing i can incoming data but fails to send out (maybe its a bug in serialthing thought)

Re: Serial.device selection under amigaos

Posted: Mon Aug 19, 2019 8:54 pm
by airsoftsoftwair
Sure, it's possible to extend the Amiga API to allow a device name to be specified. I have no experience with the serial device on Amiga so I was just of the opinion that serial.device is all there is. But since that obviously isn't the case, I can add support for manually specifying the device to use. I guess they're all compatible with the serial.device API then.

Re: Serial.device selection under amigaos

Posted: Mon Aug 19, 2019 9:22 pm
by plouf
first thanx

i dont have API knowledge of devices but considering my test's
a) term4.8 a 20+ year old program that still using new "devices" under morphos
b) patchserial a 26+ year old patch that succefully patch moprhos serial with success

i believe they are the same :)

Re: Serial.device selection under amigaos

Posted: Wed Aug 21, 2019 10:15 pm
by airsoftsoftwair
plouf wrote:
Mon Aug 19, 2019 9:22 pm
i believe they are the same :)
I think so too. Wouldn't make much sense otherwise...

Re: Serial.device selection under amigaos

Posted: Sun Dec 08, 2019 3:20 pm
by airsoftsoftwair

Code: Select all

- New [Amiga]: OpenSerialPort() can also be passed a string in the format "<devicename>:<port>" now in
  case you want it to open an alternative serial device, e.g. "serialpl2303.device:0" will try to open
  serialpl2303.device port 0