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!
Interface 1 - Noisy Serial Communications
- Ast A. Moore
- Rick Dangerous
- Posts: 2644
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Interface 1 - Noisy Serial Communications
Yup. That’s because input/output routines simply take the entire byte and write it to port $FE.
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.
Code: Select all
LD A,($5CC6)
OUT ($FE),A
It’s part of the standard tape loading/saving routine.
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
- jpnz
- Manic Miner
- Posts: 335
- Joined: Tue Nov 14, 2017 4:07 pm
- Location: Hamilt[r]on - City Of The Future - NZ
Re: Interface 1 - Noisy Serial Communications
Thanks for the explanation - that's great!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.
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.”Code: Select all
LD A,($5CC6) OUT ($FE),A
It’s part of the standard tape loading/saving routine.
Would the same thing happen with the network channel?
- Ast A. Moore
- Rick Dangerous
- Posts: 2644
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Interface 1 - Noisy Serial Communications
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.
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.