Soft Config of vLA81

Discussions about Sinclair ZX80 and ZX81 Hardware
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Soft Config of vLA81

Post by xubuntu »

And why we cannot do that on the original ula ? What component is missing and forbids us from such action ?
User avatar
Paul
Posts: 1517
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Soft Config of vLA81

Post by Paul »

The vla81 is the component missing :mrgreen:
Well, the original ULA has no soft config.
That was introduced by VLA81
Or in other words, you can try on any ULA, but none but vLA81 will respond
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Soft Config of vLA81

Post by 1024MAK »

Soft Config is a feature that was implemented by the designer of the vLA81.

The vLA81 uses different (more modern) technology compared to the Ferranti ULA chips used by Sinclair.

Think of the vLA81 as an improved and expanded modern equivalent to the Ferranti ULA chips. Soft Config being one of the new features.

Whereas the Ferranti ULA chips only have the circuitry and functions specified by Sinclair.

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
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Soft Config of vLA81

Post by xubuntu »

So let's assume this code inverts the screen mode..

LD A,3
OUT (231),A
RET

Is that right ? Does this also require change of the switches on the chip ?

And then another question is, let's assume that we successfully manage to install the above code on an eprom and we DO get an inverted screen but then we take this eprom and we place it on a zx81 with an original ula that doesn't have soft config... WILL the code crash ?

In another words, if we manage to create an eprom that inverts the screen and then loads basic or aszmic or whatever, would that same eprom skip the "invert" and load basic, or whatever comes next on the eprom, on a machine with the original ula? Or will those 3 lines of code crash the machine when there is no soft config around?

Thank you
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Soft Config of vLA81

Post by 1024MAK »

A value of 3 sets:
Inverse video, black border, USA video timing UK/European video timing, memory mode 0 (16K - 32K).

Edited to add: please note that the instructions provided earlier in this topic have been superseded by a later revision. I give a link in my next post below 👇

The DIP switches need to be set to the soft configuration setting. If the DIP switches are not set correctly, the attempt at a soft configuration will fail. Running the code will not crash the machine.

The code you are taking about will run on a ZX81 with an original ULA. It won’t crash (see note). But as an original ULA does not have a soft configuration feature, it will ignore the value to the output port { the OUT (231),A will execute but will have no effect on the ULA}.

Note that the normal rules about register use apply, so unless register A is preserved before the code, and then restored afterwards, you can’t just insert the code anywhere. But if the code is run where it does not matter about preserving the value of the A register, then it will not crash the machine.

The only case where there may be a problem, is if there is an expansion that also happens to use output port 231.

Mark
Last edited by 1024MAK on Fri Oct 28, 2022 11:46 am, edited 1 time in total.
Reason: Edited due to a difference in the instructions for selecting the video mode.
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
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Soft Config of vLA81

Post by xubuntu »

Hi, thank you for your help!

By the term "USA video timing" you mean ntsc ?

I live in europe, so I use pal so what is the number that I need to use instead of "3" ?

Can't I reset the port 231 to its original state before continuing to other contents of eprom? Or perhaps the moment I reset the output port 231 there will no longer be an inverted screen?

I am asking that question in case I use port 231 for another purpose, which is unlikely.

So all I have to do is turn both usr0 and usr1 switches ON and then load those 3 lines of code and my screen will get black ?

I don't require any other lines of code? I can just flash those 5 commands "3E 03 D3 E7 C9" in an eprom and I will get a black screen?

Why do I feel that things are not as easy as they sound...........

And most importantly... why do I keep prooving myself correct when I have that feeling...
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Soft Config of vLA81

Post by 1024MAK »

xubuntu wrote: Fri Oct 28, 2022 8:33 am By the term "USA video timing" you mean ntsc ?

I live in europe, so I use pal so what is the number that I need to use instead of "3" ?
Sorry my mistake, the instructions posted above in this topic are different to the latest version. According to the latest version of the vLA81 instructions, 3 is the correct value for use with 625 line 50Hz European video (PAL).

The latest version of the instructions are available from this web page.
xubuntu wrote: Fri Oct 28, 2022 8:33 am Can't I reset the port 231 to its original state before continuing to other contents of eprom? Or perhaps the moment I reset the output port 231 there will no longer be an inverted screen?

I am asking that question in case I use port 231 for another purpose, which is unlikely.
I’m not sure what you are asking here.

If there is no hardware that responds to port 231, any values sent are irrelevant to the system. After the Z80 has completed the machine code instruction for OUT, with no hardware that responds to this port, the number gets immediately forgotten as the Z80 fetches the next machine code instruction and continues executing the program.

If there is hardware that responds to port 231, the effect of the value output (written) depends on that hardware. In the case of the vLA81, that device remembers the value output and responds appropriately. While power is applied, it will continue to remember, until/unless a new valve is output. See the instructions for full details.

A new value can be output to port 231 at any time. Each time a different value is output, the vLA81 will respond appropriately.

You can put the short machine code program in RAM and run it from there, you don’t have to use a EPROM. See the example program earlier on in this topic. A much shorter program can be used if you already know the settings you want and hence know the value to be output to the vLA81 (port 231).

For example:

Code: Select all

10 LET A=16514
20 POKE A,62
25 POKE A+1,3
30 POKE A+2,211
35 POKE A+3,231
40 POKE A+4,201
50 PRINT USR A
Having an EPROM just to run this very short machine code program is possible. But is not something most users would do. Are you thinking about replacing the normal Sinclair ROM chip with a EPROM? There would be very little free space in a 8K bytes EPROM if it is programmed with the Sinclair ZX81 BASIC code, so you would need a 16K bytes EPROM, unless some functionality of the Sinclair ZX81 BASIC is removed to make some room for your code. Or are you thinking about some other arrangement?
xubuntu wrote: Fri Oct 28, 2022 8:33 am So all I have to do is turn both usr0 and usr1 switches ON and then load those 3 lines of code and my screen will get black ?
Yes, switch the DIP switches for USR0 and USR1 to ON, then run the machine code.
xubuntu wrote: Fri Oct 28, 2022 8:33 am I don't require any other lines of code? I can just flash those 5 commands "3E 03 D3 E7 C9" in an eprom and I will get a black screen?
Programming just the code for that short program in a EPROM on it’s own will not help you. Does your ZX81 already have either an internal expansion or an external expansion that can take an extra EPROM?

If yes, then from BASIC, you would need to tell BASIC to pass execution to the address where the machine code program is located in the EPROM.

I can answer your questions better if you say what you are aiming for.

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.
Moggy
Posts: 3266
Joined: Wed Jun 18, 2008 2:00 pm

Re: Soft Config of vLA81

Post by Moggy »

One of the easier ways to get inverse video c/w black border and get composite output at the same time is to buy and fit one of these.
Switchable either by jumper block or, as in my case, two wires from the board connected to a small flush fitted external switch.


https://www.ginger-electronic.com/en/re ... -zx81.html
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Soft Config of vLA81

Post by xubuntu »

Moggy wrote: Fri Oct 28, 2022 1:16 pm One of the easier ways to get inverse video c/w black border and get composite output at the same time is to buy and fit one of these.
Switchable either by jumper block or, as in my case, two wires from the board connected to a small flush fitted external switch.


https://www.ginger-electronic.com/en/re ... -zx81.html
Moggy that is the most amazing thing I saw recently... What do people mean by the term "border" ? The zx81 has white background and black letters. Where the hell is the "border" ? The border exists in commodore 64 not in zx81.
Last edited by xubuntu on Fri Oct 28, 2022 4:56 pm, edited 1 time in total.
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Soft Config of vLA81

Post by xubuntu »

xubuntu wrote: Fri Oct 28, 2022 8:33 am I can answer your questions better if you say what you are aiming for.
Mark you won't like the answer, but we are trying to build a clone computer.

Basic is out of the question by all means and under all circumstances.

But if the circuit by moggy gives us a black background without any code (apparently), then we will skip the vla81 and all the settings and just replicate the zx8 ccb circuit.
Post Reply