Covox

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
nollkolltroll
Posts: 325
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Covox

Post by nollkolltroll »

First iteration of a Covox interface for the ZX81 is working now.
For those that missed it, it's a type of simple 8-bit DAC using resistors, so really cheap.
Next step will be to get my EPROM-programmer up and running again.

Lessons learned:
- I should NEVER solder anything when having a fever. I had to redo everything later.
- There is no IN/OUT in ZX81 basic, but PEEK/POKE is. Doing a memory-mapped device is easier to test.
- When doing a memory-mapped device, don't try to write to ROM-area and expect the data to be what you want.
- A 74x574 does NOT have an active low clock signal. I've used these quite a lot (a long time ago), but somehow I did not remember this...
- ULA:s can be slightly broken. Mine could not read 2 columns of the keyboard, and the keyboard was not faulty. The leads are even shorter now.
/Adam
User avatar
siggi
Posts: 990
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Covox

Post by siggi »

nollkolltroll wrote: - When doing a memory-mapped device, don't try to write to ROM-area and expect the data to be what you want.
Did you pull the /ROMCS line to HIGH during write access to your hardware located in the rom address area? That would avoid data bus conflicts during writing data to your hardware.
Typical circuit is:

Code: Select all

                |\  |
                |  \|  
CS-DAC ---------|   |-------------- /ROMCS
                |  /|
                |/  |

where CS-DAC is your acitive HIGH chip select of your DAC during write cycles at rom addresses. The diode could be a 1N4148

Caution! The BASIC writes to the first 5 rom addresses 0000-0004, so don't use them for your hardware address decoder.

HTH Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Covox

Post by PokeMon »

nollkolltroll wrote:- ULA:s can be slightly broken. Mine could not read 2 columns of the keyboard, and the keyboard was not faulty. The leads are even shorter now.
This could be an issue with the power supply when connecting something additional over the expansion bus.
If the voltage drops a little bit - OR - if the address bus get too much load, keys tend to not respond due to a cheap and simple but not perfect keyboard attachement via the simple diode logic. People always use drivers for the data bus but forget to use them for the address bus too, where the address logic is connected. Replacing the 1N4148 diodes with schottky of type BAT46 or similar at the keyboard connector could help also. By the way, they can be soldered in parallel helping to drop down the voltage at the kbd inputs at the ULA.
nollkolltroll
Posts: 325
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: Covox

Post by nollkolltroll »

Siggi: that explains a lot! Did not know that basic wrote to ROM. I tried to use those low addresses, now I know why the values kept changing.
I didn't try to pull /ROMCS high. I just wanted to get things working memory-mapped in basic before changing to port-mapped.

PokeMon: I really think the ULA is broken, tried it in 2 different ZX81:s with the same results. Plain unexpanded, 3 different expansion memories, nothing mattered.
/Adam
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Covox

Post by 1024MAK »

Also keep in mind that due to the minimum decoding used by Sinclair, the ROM (and the echoes of the ROM in the unused part of the memory map) may produce outputs when written to. This alone will mess up anything else connected to the data bus in the same memory range.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
olofsen
Posts: 189
Joined: Wed Jan 08, 2014 12:29 pm

Re: Covox

Post by olofsen »

By the way, why does the BASIC write to ROM?
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Covox

Post by 1024MAK »

olofsen wrote:By the way, why does the BASIC write to ROM?
Paul wrote:Because the first five bytes of the ROM are written to by the Basic as the result of an error in the maths.
See here

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Covox

Post by PokeMon »

olofsen wrote:By the way, why does the BASIC write to ROM?
This is a bug in the firmware or "BIOS". ;)
I think there are only a few candidates of BASIC instructions doing it. I found for example PRINT does try to write to the ROM. I found this during testing with an EEPROM instead of a ROM.
olofsen
Posts: 189
Joined: Wed Jan 08, 2014 12:29 pm

Re: Covox

Post by olofsen »

It is the "skip constants" subroutine at 0x1a2d!
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Covox

Post by sirmorris »

I have heard a more charitable explanation - that writing to somewhere 'non-changable' was another clever optimisation which saved a few bytes in the ROM. I can't remember where I heard this, though.
Post Reply