BASIC support for the X16 serial port

All aspects of programming on the Commander X16.
danboid
Posts: 73
Joined: Sat Jan 28, 2023 2:47 am

BASIC support for the X16 serial port

Post by danboid »

I have looked at the list of X16 BASIC commands on github and I don't see any commands for using the serial port card.

Is support for accessing the serial port using BASIC a planned feature? Maybe its already possible using POKEs?
User avatar
ahenry3068
Posts: 1136
Joined: Tue Apr 04, 2023 9:57 pm

Re: BASIC support for the X16 serial port

Post by ahenry3068 »

danboid wrote: Sat Oct 05, 2024 10:18 am I have looked at the list of X16 BASIC commands on github and I don't see any commands for using the serial port card.

Is support for accessing the serial port using BASIC a planned feature? Maybe its already possible using POKEs?
I haven't looked at the project closely (Yet) but Voidstar has a fair little terminal program on here somewhere, entirely in BASIC so it is certainly possible.
danboid
Posts: 73
Joined: Sat Jan 28, 2023 2:47 am

Re: BASIC support for the X16 serial port

Post by danboid »

Ah yes! BASTERM

viewtopic.php?t=7794

It's only 140 LOC too. Nice!

Thanks ahenry!
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

Re: BASIC support for the X16 serial port

Post by funkheld »

but doesn't work in the x16 emulator.

greeting
kelli217
Posts: 531
Joined: Sun Jul 05, 2020 11:27 pm

Re: BASIC support for the X16 serial port

Post by kelli217 »

funkheld wrote: Wed Oct 09, 2024 5:43 am but doesn't work in the x16 emulator.

greeting
There is not yet any support for expansion cards in the emulator.

It is possible that this may change, because the serial/WiFi card is expected to be a common addition to the machine. But for now the only path to a connection from a Commander X16 to a different machine is with actual hardware: an X16 motherboard, and serial/WiFi expansion card.
User avatar
schristis
Posts: 65
Joined: Sat Apr 08, 2023 6:28 am

Re: BASIC support for the X16 serial port

Post by schristis »

Device 2 is RS232 on the C64...
putty.jpg
putty.jpg (51.73 KiB) Viewed 793 times
Just trying to use the OPEN statement... maybe I have the format wrong (I can only try)
or maybe it doesn't work on the X16....

I might have the wrong idea... I'm using information from page 360 of the "C64 Programmers Reference Guide"
Maybe someone else can get it working or give an explanation... ??? or where I stuffed up ?
I think it would be nice to send data too and from your PC to the X16 through a Null-Modem cable, in basic like this ?

Just thought I'd at least try lol.....
User avatar
ahenry3068
Posts: 1136
Joined: Tue Apr 04, 2023 9:57 pm

Re: BASIC support for the X16 serial port

Post by ahenry3068 »

schristis wrote: Thu Oct 10, 2024 9:32 am Device 2 is RS232 on the C64...
putty.jpg
Just trying to use the OPEN statement... maybe I have the format wrong (I can only try)
or maybe it doesn't work on the X16....

I might have the wrong idea... I'm using information from page 360 of the "C64 Programmers Reference Guide"
Maybe someone else can get it working or give an explanation... ??? or where I stuffed up ?
I think it would be nice to send data too and from your PC to the X16 through a Null-Modem cable, in basic like this ?

Just thought I'd at least try lol.....
Device 2 isn't implemented on the X16. I'm assuming you do have the serial card. ? voidstar has a
program in BASIC on here to access the serial card. I'm going to look for it now. If I find it I'll come
back and post a link.

FOUND IT:
viewtopic.php?p=33922#p33922
kelli217
Posts: 531
Joined: Sun Jul 05, 2020 11:27 pm

Re: BASIC support for the X16 serial port

Post by kelli217 »

There's a way to implement giving the device number 2 identifier to the serial card... but you'd have to write the driver to do that, yourself.
User avatar
ahenry3068
Posts: 1136
Joined: Tue Apr 04, 2023 9:57 pm

Re: BASIC support for the X16 serial port

Post by ahenry3068 »

kelli217 wrote: Thu Oct 10, 2024 6:11 pm There's a way to implement giving the device number 2 identifier to the serial card... but you'd have to write the driver to do that, yourself.
Tom posted on here on another thread with a brief outline on how to implement A "/dev/null" as a device number. I've been thinking I might go ahead and try that and post on "Libraries & Examples" if I'm successful. If I get that going I may try to do the serial driver as well.
User avatar
schristis
Posts: 65
Joined: Sat Apr 08, 2023 6:28 am

Re: BASIC support for the X16 serial port

Post by schristis »

Re-edited this reply.... as I deleted a post when it was being replied too... that said the same thing.. and can't delete this lol....
Last edited by schristis on Sat Oct 12, 2024 9:13 am, edited 2 times in total.
Post Reply