Page 1 of 3

TS1000 ULA vs ZX81 ULA

Posted: Mon Feb 20, 2017 1:05 am
by msansom
Are the ULAs different between the TS1000 and the ZX81?

Re: TS1000 ULA vs ZX81 ULA

Posted: Mon Feb 20, 2017 2:21 am
by 1024MAK
msansom wrote:Are the ULAs different between the TS1000 and the ZX81?
No.

Mark

Re: TS1000 ULA vs ZX81 ULA

Posted: Mon Feb 20, 2017 3:12 am
by msansom
1024MAK wrote:
msansom wrote:Are the ULAs different between the TS1000 and the ZX81?
No.

Mark
That's what I thought.

The reason I asked is that I read someone (maybe here) claim that the ROMs were the same between the TS1000 and the ZX81. I think he was wrong unless the ROMs contain the code to do both NTSC and PAL video and there is some sort of pin strap on the PCB to tell it which to do. Seems unlikely given the space constraints.

So are the ROMs different?

I think I need to find a few spare ULAs.

Re: TS1000 ULA vs ZX81 ULA

Posted: Mon Feb 20, 2017 6:14 am
by Paul
msansom wrote: So are the ROMs different?
No. :mrgreen:

Re: TS1000 ULA vs ZX81 ULA

Posted: Mon Feb 20, 2017 6:17 am
by Paul
But you already answered you Question yourself in your last post.
The ROM contains both variants. US and EU(avoiding Color scheme names on a b/w machine)

Re: TS1000 ULA vs ZX81 ULA

Posted: Mon Feb 20, 2017 7:24 am
by msansom
Paul wrote:But you already answered you Question yourself in your last post.
The ROM contains both variants. US and EU(avoiding Color scheme names on a b/w machine)
So is there a resistor load or something similar to tell the Z80 which version of the video routine to run?

Re: TS1000 ULA vs ZX81 ULA

Posted: Mon Feb 20, 2017 7:30 am
by Paul
Indeed. It's R30. A ten ohm resistor. A jumper or a switch would do the same.
Switching can be done at any time with immediate result.
Have a look here:
viewtopic.php?f=7&t=2209&p=22712&hilit=R30#p22712

Re: TS1000 ULA vs ZX81 ULA

Posted: Mon Feb 20, 2017 7:36 am
by msansom
Thanks Paul.

I was thinking that the Sinclair ROM was so full that they wouldn't put both routines in at the same time. But, I was probably remembering stories of the difficulties they had getting everything in the ZX80 ROM which was only 4k. I guess at 8k they had the luxury of including both.

That really makes things easier. Is that only checked at boot up or can you flip back and forth while running?

Re: TS1000 ULA vs ZX81 ULA

Posted: Mon Feb 20, 2017 7:47 am
by Paul
The status is updated at every keyboard read. So switching is possible at any time. With immediate result.

Re: TS1000 ULA vs ZX81 ULA

Posted: Mon Feb 20, 2017 10:54 am
by RetroTechie
ULA pin 22. Has an internal pull-up. Optionally pulled low by (external) resistor R30. Pin readable as bit 6 of I/O port FEh.

The ZX81 ROM uses this bit to set system variable MARGIN (address 16424), which holds the number of blank lines in the top & bottom border.
With the ULA pin low (R30 present), it's set to 31 (for 60 Hz screen refresh).
With the ULA pin high (R30 absent), it's set to 55 (for 50 Hz screen refresh).

So there are no different versions of the ULA, ROM or even different video routines used. All that happens is @ 50 Hz, the ZX81 generates a few more screen lines before doing the keyboard read & starting a new frame. And like Paul said, this setting is updated continuously - change the ULA pin input, screen refresh rate changes with it immediately. 8-)