Palettemate / enhanced video ULA with 4096 colours

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
jgharston
Posts: 3209
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by jgharston » Fri Mar 09, 2018 9:37 am

No, strike that, I misremembered.

The code says "PALLETTE DEMONSTRATION PROGRAM" and I managed to mis-read that as PALETTEMATE #-o

The Clywd Technics Palette Extender is a pre-Mike Cook Chameleon, is controlled through the user port.

The WildVision PaletteMate does seem to be a Video ULA replacement/supplement.

The Focus Electronics thing also appears to be a Video ULA replacement/supplement.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
danielj
Posts: 6582
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by danielj » Fri Mar 09, 2018 9:50 am

Pete Wild is on the facebook group - you could try nobbling him on there?

d.

User avatar
sydney
Posts: 2228
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by sydney » Fri Mar 09, 2018 10:48 am

Is there an echo in here? Or have you taken to repeating other people as well as yourself?
:lol: :lol: :lol:
You're spending too much time in that Facebook group I think!

User avatar
danielj
Posts: 6582
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by danielj » Fri Mar 09, 2018 10:56 am

Hahaha. I just read Jonathan's post, and no further back :D

Oops.

RobC
Posts: 2298
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by RobC » Fri Mar 09, 2018 12:53 pm

I'm not on the Facebook group but I think Pete Wild was involved with Castle at some point so it's probably him. I did try e-mailing him years ago but didn't get a reply.

I still have Phil's Clywd Technics Palette Extender here and it is similar to the Chameleon although much earlier and more professional - it plugs into the user port whereas the Wild Vision PaletteMate replaced the ULA.

I'd not heard of the Focus thing before but there was another board from Saturn Electronics(?) that was reviewed in the Micro User.
alexandersmith wrote:Please can I register my interest in buying a NuLA, assuming there will be another production run?
Certainly. I have a few on eBay at the moment but they are more expensive to cover the charges and listing fees. I do still have a small number of bare boards left so will order some more CPLDs and make up another small batch.

alexandersmith
Posts: 17
Joined: Wed Feb 06, 2013 10:21 am
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by alexandersmith » Fri Mar 09, 2018 8:43 pm

RobC wrote:
alexandersmith wrote:Please can I register my interest in buying a NuLA, assuming there will be another production run?
Certainly. I have a few on eBay at the moment but they are more expensive to cover the charges and listing fees. I do still have a small number of bare boards left so will order some more CPLDs and make up another small batch.
RobC: Just bought one via ebay moments ago, thanks.

RobC
Posts: 2298
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by RobC » Fri Mar 09, 2018 9:20 pm

alexandersmith wrote:RobC: Just bought one via ebay moments ago, thanks.
Thanks - will post it out in the morning.

SteveF
Posts: 510
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by SteveF » Sat Mar 10, 2018 10:46 pm

Hi,

I'm getting confused with controlling VideoNuLA directly. If I run this program (also provided on the attached zipped SSD for convenience):

Code: Select all

REM Start off in a known state
*VNRESET
MODE 0
?&FE22=&61:REM attribute mode
?&FE22=&71:REM extended attribute mode
REM display a block using colour pair 7 - i.e. foreground is logical colour 15,
REM background is logical colour 14
FOR I%=0 TO 127
I%?&3000=255
NEXT
?&FE21=(15*16)+(8 EOR 7):REM set logical colour 15 to physical colour 8
?&FE21=(14*16)+(0 EOR 7):REM set logical colour 14 to physical colour 0
?&FE23=&88:?&FE23=&88:REM set physical colour 8 to mid-grey
REM ?&FE23=&F8:?&FE23=&00:REM set physical colour 15 to mid-red
PRINTTAB(0,5);
REPEAT UNTIL FALSE
I get some blocks of flashing white/mid-grey shown on the screen. I don't understand this - what I think should happen is:
  • Screen memory holds 255, and 255 AND 7=7 so we're displaying colour pair 7.
  • Colour pair 7 shows logical colour 15 as the foreground colour.
  • I've programmed logical colour 15 to display physical colour 8.
  • Physical colour 8 has been programmed to mid-grey.
  • Programming physical colour 8 implicitly stops colour 8 being a flashing colour (documented under section "Control code 8: Set flashing flags..." in the VideoNuLA manual)
So I'd expect to see mid-grey blocks which don't flash, but I don't. Can someone tell me what I've done wrong here?

If I uncomment out the REM line which says 'set physical colour 15 to mid-red', I get mid-grey blocks which don't flash- but I don't see why physical colour 15 is at all relevant here, which surprises me even more. I originally tried this because I wondered if it would give me flashing mid-red/mid-grey blocks instead of flashing white/mid-grey blocks.

Cheers.

Steve

Edited to add: I'm using b-em, not actual hardware, but I'm assuming it's an error on my part at this stage rather than an emulator bug.
Attachments
test.zip
(542 Bytes) Downloaded 16 times
Last edited by SteveF on Sun Mar 11, 2018 1:06 am, edited 2 times in total.

dominicbeesley
Posts: 639
Joined: Tue Apr 30, 2013 11:16 am
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by dominicbeesley » Sun Mar 11, 2018 12:21 am

Should the two EOR's not be EOR &F instead of EOR &7

D

SteveF
Posts: 510
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by SteveF » Sun Mar 11, 2018 12:43 am

You might be right, but the VideoNuLA manual says (appendix D):
Programming the original palette for the mode 1 equivalent (4 sets of 4 colours) or for the
3-bit attribute text mode works in the same way. The palette entry for each logical colour is
programmed once with the value of the desired physical colour exclusive-OR’d with 7.
and the AUG says (section 19.2.3):
Note however that the actual number sent to the Palette is the above number EOR &07
I may be misinterpreting this.

If I change the program to use EOR &F instead of EOR 7 I get black blocks with the one-pixel-wide strip of background colour between them in flashing red/grey, so it still doesn't behave as I'd expect.

RobC
Posts: 2298
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by RobC » Sun Mar 11, 2018 10:37 am

SteveF wrote:So I'd expect to see mid-grey blocks which don't flash, but I don't. Can someone tell me what I've done wrong here?
Don't think you are doing anything wrong. On real hardware I see 16 non-flashing, mid-grey blocks separated by black lines (as expected given you're using the extended attribute mode).
SteveF wrote:Edited to add: I'm using b-em, not actual hardware, but I'm assuming it's an error on my part at this stage rather than an emulator bug.
Does look like an emulator issue.

User avatar
kieranhj
Posts: 724
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by kieranhj » Sun Mar 11, 2018 1:05 pm

RobC wrote:
SteveF wrote:So I'd expect to see mid-grey blocks which don't flash, but I don't. Can someone tell me what I've done wrong here?
Don't think you are doing anything wrong. On real hardware I see 16 non-flashing, mid-grey blocks separated by black lines (as expected given you're using the extended attribute mode).
SteveF wrote:Edited to add: I'm using b-em, not actual hardware, but I'm assuming it's an error on my part at this stage rather than an emulator bug.
Does look like an emulator issue.
Sounds like it. The attribute modes are the least well tested as I had no examples to work from and note the whole thing was implemented without access to actual hardware at the time!

I suggest filing a bug in GitHub with the repro code above and one of us will get round to fixing it at some point.
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

SteveF
Posts: 510
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by SteveF » Sun Mar 11, 2018 1:54 pm

Thanks guys, I've raised https://github.com/stardot/b-em/issues/50 for this.

SteveF
Posts: 510
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by SteveF » Tue Mar 13, 2018 9:03 pm

We've been discussing that b-em bug over on github. Could someone with real VideoNuLA hardware please run the attached test program (listed below for reference) and let us know whether the text on the screen agrees with what's actually happening? After the first couple of screens which just show static colours, every time you press SPACE *one* new line of text should start flashing, and it should change to describe the colours which it is flashing between.

Thanks!

Steve

ETA: This isn't tube compatible. And the P%=&900 bit at the start was me setting up a breakpoint so I could examine the NuLA registers in the b-em debugger which I forgot to take outleft in to show my working. :-)

Code: Select all

P%=&900
[OPT 2
RTS
]
*VNRESET
*VNVDU ON
MODE 101
REM Define physical colours 8-15 to use distinct colours so they can be
REM visually distinguished. For 9-15 we just use half-bright versions of
REM the standard colours. Physical colour 8 is normally black and we can't
REM use a half-bright version of that, so we use a purpley colour.
PROCphys(8,&5,&4,&C)
FOR I%=9 TO 15
C%=I%-8
R%=0
G%=0
B%=0
IF C% AND 1 THEN R%=&8
IF C% AND 2 THEN G%=&8
IF C% AND 4 THEN B%=&8
PROCphys(I%,R%,G%,B%)
NEXT
DIM name$(15)
RESTORE
FOR I%=0 TO 15
READ name$(I%)
NEXT

CLS
FOR I%=0 TO 7
PROCl2p(I%*2,0):PROCl2p(I%*2+1,I%+1):REM set pair I% to physical I%+1 on black
PROCpair(I%)
PRINT "Pair ";I%;" - ";name$(I%+1);" on black"
NEXT
PROCspace(7)

CLS
FOR I%=0 TO 7
PROCl2p(I%*2,0):PROCl2p(I%*2+1,I%+8):REM set pair I% to physical I%+8 on black
PROCpair(I%)
PRINT "Pair ";I%;" - ";name$(I%+8);" on black"
NEXT
PROCspace(7)
PRINTTAB(0,8);"Press SPACE repeatedly to enable flashing for each colour";
V%=0
FOR I%=0 TO 7
V%=(V% DIV 2)+8
REM PRINTTAB(0,I%+10),I%,~V%
IF I%<=3 THEN ?&FE22=&80+V% ELSE ?&FE22=&90+V%
IF I%=3 THEN V%=0
A%=I%+8
B%=A% EOR 7
PROCpair(I%)
PRINTTAB(0,I%);"Pair ";I%;" - flashing ";name$(A%);"/";name$(B%);" on black"
PROCspace(-1)
NEXT

END

DEF PROCl2p(logical%,physical%)
?&FE21=(logical%*16)+(physical% EOR 7)
ENDPROC

DEF PROCphys(physical%,red%,green%,blue%)
?&FE23=(physical%*16)+red%:?&FE23=(green%*16)+blue%
ENDPROC

DEF PROCpair(pair%)
COLOUR pair%+1
ENDPROC

DEF PROCspace(pair%)
CALL &900
IF pair%>=0 THEN PROCpair(pair%):PRINT "Press SPACE..."
*FX21
REPEAT UNTIL GET=32
ENDPROC

DATA black,red,green,yellow,blue,magenta,cyan,white,purple,half-red,half-green,half-yellow,half-blue,half-magenta,half-cyan,half-white
Attachments
test2.zip
(1.15 KiB) Downloaded 17 times
Last edited by SteveF on Tue Mar 13, 2018 9:32 pm, edited 2 times in total.

SteveF
Posts: 510
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by SteveF » Tue Mar 13, 2018 9:09 pm

I think there's a small error in the VideoNuLA user guide (maybe I don't have the latest version; it says "Version 1.2, July 2017" on the front page). The section on control code 8 (page 38) says:
This sets (or clears) flags that indicate which of logical colours 8 to 11 should flash.
Should that say physical colour? Or am I losing the plot? :-)
The section on control code 9 (page 39) is the same.

ETA: Allowing control of which individual physical colours flash is a very nice touch, considering how little love the flashing colours get in general and especially considering a key feature of VideoNuLA is allowing 16 different non-flashing colours on screen at once.

RobC
Posts: 2298
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by RobC » Wed Mar 14, 2018 9:37 am

SteveF wrote:Could someone with real VideoNuLA hardware please run the attached test program (listed below for reference) and let us know whether the text on the screen agrees with what's actually happening?
Missed this yesterday as it was the wife's birthday! Will run it later today and report back unless someone beats me to it.
SteveF wrote:I think there's a small error in the VideoNuLA user guide (maybe I don't have the latest version; it says "Version 1.2, July 2017" on the front page). The section on control code 8 (page 38) says:
This sets (or clears) flags that indicate which of logical colours 8 to 11 should flash.
Should that say physical colour? Or am I losing the plot? :-)
The section on control code 9 (page 39) is the same.
Yes - the manual is in error as the flashing flags affect the physical colours. Not sure how I didn't pick that up during proof reading :oops: . Thanks for spotting it.

The latest manual/user guide is version 1.3 (updated to cover the new Spectrum & Thomson modes and correct a few things) but still contains these errors. I'll put out a new version some time this week.
SteveF wrote:ETA: Allowing control of which individual physical colours flash is a very nice touch, considering how little love the flashing colours get in general and especially considering a key feature of VideoNuLA is allowing 16 different non-flashing colours on screen at once.
Thanks. I'd like to have given the ability to freely define both physical colours in each pair but there wasn't enough room left. There was enough room for this and it seemed like a sensible extension.

SteveF
Posts: 510
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by SteveF » Thu Mar 15, 2018 12:43 am

Thanks Rob, I appreciate your help with this!

User avatar
jgharston
Posts: 3209
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by jgharston » Thu Mar 15, 2018 5:22 am

Talking of which, nobody responded to my post on the Spectrum thread:
The post on Spectrum attirbute mode reminds me of a discussion I was having with RobC earlier.

The VideoNuLA support ROM allows to select the extended display features with MODE/VDU 22. It currently uses MODEs &60-&68 as a straight sequence of numbers. I mentioned that it would match the native MODE numbering sequence to have the mode numbers logically numbered based the mode number they were based on, giving the sequence:

Code: Select all

MODE text clrs mem     MODE text clrs mem              MODE text clrs mem
 0  80x32   2  20K     &60 80x32   5  20K MODE 0+4     &68  80x32  9  20K MODE 0+8
 1  40x32   4  20K     &61 40x32  13  20K MODE 1+4 
 2  20x32  16  20K
 3  80x25   2  16K     &62 80x25   5  16K MODE 3+4     &6B  80x25  9  16K MODE 3+8
 4  40x32   2  10K     &63 40x32   5  10K MODE 4+4     &6C  40x32  9  10K MODE 4+8
 5  20x32   4  10K
 6  40x25   2   8K     &64 40x25   5   8K MODE 6+4     &6E  40x25  9   8K MODE 6+8
 7  40x25   8   1K
That is, MODE &60+n is MODE n with 4 extra colours, MODE &68+n is MODE n with 8 extra colours, in the same way that MODE 8+n is MODE n with twice the colours.

MODE &60 and MODE &61 are the same as the straight &60-&68 numbering.

So, the question is, has anybody used the VideoNuLA Support ROM to produce code that they have released using MODE or VDU 22 with mode numbers other than &60 and &61? Of the demos I've seen they all seem to be done with direct hardware manipulation, without using the VideoNuLA support ROM, and the code I've seen using the Support ROM have only used MODE &60, I think the multi-colour text terminal (can't remember the name at the mo). I think the shuffling would also allow the Spectrum screen mode to have a number that slots in logically as well.
Can I take the lack of response to confirm that Rob should update the support ROM to use the logical numbering scheme? This is a patched version of the v1.02 ROM that uses the logical numbering scheme. Also, the logical numbering scheme would result in the Spectrum screen mode being MODE &70 being "MODE 0 (1bpp) with more colours". (Edit: or MODE &71 being MODE 1 (40x32) with more colours and 32x24 content.)

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

RobC
Posts: 2298
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by RobC » Thu Mar 15, 2018 9:43 am

SteveF wrote:Thanks Rob, I appreciate your help with this!
Sorry I didn't get a chance to test it last night but I was struggling with a kitchen issue!

Anyway, I've tested it now and it all seems to work - the effects match the descriptions on screen :D
Last edited by RobC on Thu Mar 15, 2018 9:51 am, edited 1 time in total.

RobC
Posts: 2298
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by RobC » Thu Mar 15, 2018 9:51 am

I'm happy to adopt the new numbering scheme (and update the manual accordingly) but it would mean that those with older versions of the ROM are out of step. As Jonathan has said previously, it would be good to get other people's thoughts on this.
jgharston wrote:Also, the logical numbering scheme would result in the Spectrum screen mode being MODE &70 being "MODE 0 (1bpp) with more colours". (Edit: or MODE &71 being MODE 1 (40x32) with more colours and 32x24 content.)
Again, I'm happy to look at implementing support for a Spectrum mode in the ROM but it would mean taking a break from other things I'm doing (mostly emulator development). I'd welcome suggestions on whether there's a demand for this - I haven't exactly been rushed off my feet with requests for the free CPLD upgrade to support the Spectrum display!

dominicbeesley
Posts: 639
Joined: Tue Apr 30, 2013 11:16 am
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by dominicbeesley » Thu Mar 15, 2018 10:46 am

I'd be happy to swap ROMs. I presume I need to flash my older Nula (from the first batch) to get the attribute modes working anyway?

D

User avatar
KenLowe
Posts: 365
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by KenLowe » Thu Mar 15, 2018 10:53 am

I could update my ROM no problem. In fact I'm not actually using the supplied EPROM. I've got it loaded into flash, so it would be easy for me to update. Support for Spectrum mode in the ROM would be nice, but not at the expense of anything else you're working on (like kitchen issues!).

RobC
Posts: 2298
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by RobC » Thu Mar 15, 2018 11:30 am

dominicbeesley wrote:I presume I need to flash my older Nula (from the first batch) to get the attribute modes working anyway?
Only to get the Spectrum/Thomson modes. The original 12MHz attribute modes are available on every board.

User avatar
marcusjambler
Posts: 423
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by marcusjambler » Thu Mar 15, 2018 11:33 am

Hi Rob

Will it be possible to spectrumize my 2 VideoNULAs at the Wakefield bash?
Also, I'll need a ROM image for the support code.

Marcus

RobC
Posts: 2298
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by RobC » Thu Mar 15, 2018 1:54 pm

marcusjambler wrote:Will it be possible to spectrumize my 2 VideoNULAs at the Wakefield bash?
Also, I'll need a ROM image for the support code.
Certainly - I'll make sure I pack my JTAG programmer.

Is it the SpectROM rom image that you need burning to an EPROM? Just let me know how many you need and I'll burn them for you.

User avatar
marcusjambler
Posts: 423
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by marcusjambler » Thu Mar 15, 2018 2:05 pm

Certainly - I'll make sure I pack my JTAG programmer.
Thanks Rob
Is it the SpectROM rom image that you need burning to an EPROM? Just let me know how many you need and I'll burn them for you.
Yes... However I have some 2764 and 27128 EPROMS so I can program my own as long as it will fit 8 or 16k

RobC
Posts: 2298
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by RobC » Thu Mar 15, 2018 3:57 pm

The current SpectROM image is less than 8KB so will fit in a 2764 or 27128.

SteveF
Posts: 510
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by SteveF » Thu Mar 15, 2018 5:23 pm

RobC wrote:Anyway, I've tested it now and it all seems to work - the effects match the descriptions on screen :D
Great, thanks - we can now use this test to validate b-em's behaviour.

SteveF
Posts: 510
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by SteveF » Thu Mar 15, 2018 5:27 pm

jgharston wrote:So, the question is, has anybody used the VideoNuLA Support ROM to produce code that they have released using MODE or VDU 22 with mode numbers other than &60 and &61? Of the demos I've seen they all seem to be done with direct hardware manipulation, without using the VideoNuLA support ROM, and the code I've seen using the Support ROM have only used MODE &60, I think the multi-colour text terminal (can't remember the name at the mo).
Sorry, I missed this before. I think you're thinking of the experimental VideoNuLA support in STEM. Although originally I expected to use the support ROM's new modes, in the end it turned out to be more convenient for STEM to manipulate the hardware directly, so no problems will be created if the mode numbers for the support ROM change.

User avatar
jgharston
Posts: 3209
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Palettemate / enhanced video ULA with 4096 colours

Post by jgharston » Fri Mar 23, 2018 11:36 am

Rather than unsoldering my Master, I've got around to putting the repaired PSU in my original Beeb. The nULA happily co-exists with an Aries B32 board. I had to pick up A1 from the CPU on pin 10 instead of the 6522 as that's buried. ;)
Image

It also confirms that the LDPIC extension to support the nULA palette works in hardware. :)
Really weird being in an 8-colour "MODE 0" :D

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

Post Reply