Page 1 of 1

Interface 1 - Noisy Serial Communications

Posted: Thu Apr 19, 2018 7:54 am
by jpnz
Normally the Interface 1 is silent when performing serial port communications.

Today I learnt that you can make a serial port transfer "noisy" by poking the system variable IOBORD (0x5cc6) [border colour during I/O] with a value outside of the usual 0-7 range.

Here's a quiet transfer at 9600 bps followed by a noisy one:

https://youtu.be/8o6uD5054JQ


Let's do that again at 19200 bps:

https://youtu.be/anBHb-hwtP0

You learn something new every day!

Re: Interface 1 - Noisy Serial Communications

Posted: Thu Apr 19, 2018 8:55 am
by Ast A. Moore
Yup. That’s because input/output routines simply take the entire byte and write it to port $FE.

Code: Select all

	LD A,($5CC6)
	OUT ($FE),A
Since this port is shared between the border and the beeper, if you also change Bit 4, it’ll toggle the speaker, and you’ll get your “noise.”

It’s part of the standard tape loading/saving routine. ;)

Re: Interface 1 - Noisy Serial Communications

Posted: Thu Apr 19, 2018 10:46 am
by jpnz
Ast A. Moore wrote: Thu Apr 19, 2018 8:55 am Yup. That’s because input/output routines simply take the entire byte and write it to port $FE.

Code: Select all

	LD A,($5CC6)
	OUT ($FE),A
Since this port is shared between the border and the beeper, if you also change Bit 4, it’ll toggle the speaker, and you’ll get your “noise.”

It’s part of the standard tape loading/saving routine. ;)
Thanks for the explanation - that's great!

Would the same thing happen with the network channel?

Re: Interface 1 - Noisy Serial Communications

Posted: Thu Apr 19, 2018 11:46 am
by Ast A. Moore
jpnz wrote: Thu Apr 19, 2018 10:46 am Would the same thing happen with the network channel?
Not a hundred percent sure, but there’s at least one instance where the border is being changed in the Get Packet from Network routine.