Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:51 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : World’s first COLOUR Maximite!!

     Page 2 of 3    
Author Message
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 08:38am 18 Jul 2011
Copy link to clipboard 
Print this post

Nick, the main reason to convert to logic levels is you can then use any logic devices to come up with any colour method you want. As is is, we have a logic level pixel signal coming from the PIC32. Its then reduced with a resistor and the horizontal sync signal is used to pull it down to below black to make sure there are no retrace lines.
If you take the existing pixel signal from the vga connector and bring the on pixel level to 3.3 volts, it will now interface with digital logic rather than using the analog bidirectional switches. after generating the mixing the 3 or 6 bits of colour data to generate video levels again, you can remix the horizontal sync signal back in.
The beauty of the way they did it in the Excalibur was that you had 4 bits of colour data and I seem to remember another bit that was selected from a page register. Those 4 bits gave you 16 colours. The 16 addresses in the fuse rom could be programed with any colours that you wished out of a pallete of 64 as the Excalibur had 6 bit analog video. The second half of the fuse ROM could be selected with the page bit and allowed you to select a different 16 colour pallette.

I'm not sure how easy it is to get fuse ROMs any more, but its a simple method. There are other ways to achive the same thing.

There are other pins that are unused. From what I have seen from other topics in the forum there may be issues with using them as they are part of other peripherals in the PIC that the Maximite is using. I'm not sure what the answer is about whether the pins are available.

As to providing an intensity signal to go to 16 colours, you could try something like this.

colour line in --------\/\/\/--------|
|
|
intensity line in --------\/\/\/--------|
|------------- video out
|
/
\
/
\
|
|
Graphics courtesy of HP Crayon (C) GND

You'll have to play with the resitor values but it will allow you to mix the 2 signals to provide what you want.


StuartEdited by stuarts 2011-07-19
Time is nature's way of keeping everything from happening all at once.
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 08:50am 18 Jul 2011
Copy link to clipboard 
Print this post

But the MM only generates a single '1 bit' level of VGA (on and off, white and black). This single output is equally fed into all Red, Green, Blue outputs, hense the Black and white only video.

I take that 1 signal and split it to 3 inputs of the switch. Then, by controlling the switch, we determine how to channel that single signal into the 3 RGB outputs.

8 combinations gives 8 colours. If I add a 4th control, I can set the single VGA to half strength which in turn makes the final RGB combination half level and therefore another 8 'colors'...actually still only 8 colours but 2 intensities.

Correct me if my thinking falls short.
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 10:41am 18 Jul 2011
Copy link to clipboard 
Print this post

Nick, forget my circuit, the forum removed my spaces. With the ROM, you can 16 completely different colours using 4 pins. not just 8 and 8 bright ones.

Stuart
Time is nature's way of keeping everything from happening all at once.
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 07:15pm 18 Jul 2011
Copy link to clipboard 
Print this post

  stuarts said   Nick, forget my circuit, the forum removed my spaces. With the ROM, you can 16 completely different colours using 4 pins. not just 8 and 8 bright ones.


Regarding your circuit diagram: When you have it on screen, snapshot the display with a SHIFT PRTSCR. Then PASTE it into a graphics editor and crop the image to just the part you want to show. SAVE it as a JPG and attach it to your message.

I understand the ROM technique for colour, I just don't understand how you get enough data from a single 2 level VGA line. Or how the added circuitry adds much more to the single switch approach I have. Edited by Nick 2011-07-20
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 02:06am 19 Jul 2011
Copy link to clipboard 
Print this post

Nick, I was intending to use the i/o pins just like you have for addressing. What it would achieve is removing the need to find low resistance switches as well as giving any choice of colours that you may wish for.

Stuart
Time is nature's way of keeping everything from happening all at once.
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 03:11am 19 Jul 2011
Copy link to clipboard 
Print this post

Ok. I think I understand what you're suggesting.

Use 4 of the I/O lines to set an address in the ROM which will provide a prechosen bit pattern. The VGA in, convert it to digital level and use this to trigger the output from the ROM.

It may need a bit more logic than this but has the potential of 256 colours if we assign 8 I/O lines for the ROM addressing.

The problem I see is that it still suffers the limitation of only 1 colour per scanline (+black). This to me is the biggest limitation of my design and having a larger palette doesn't really make up for this fact. 8/16 colour (RGBI) I feel is adequate for what the Maximite is aimed at. My original design is simpler and more cost effective and the 16 colour spec (coming soon) is adequate.

I can't think of any easy way around getting more colours per scanline without going in to the maximite itself to obtain extra signals such as a pixel clock.

Where there's a will there's a way, right? Edited by Nick 2011-07-20
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 03:17am 19 Jul 2011
Copy link to clipboard 
Print this post

Nick, you could with a bit of work use the pixel on and off levels to set foreground and background colours if you wanted. You would need to gate that logic using the horizontal sync signal though so that you didn't get retrace lines.

Stuart




Time is nature's way of keeping everything from happening all at once.
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 09:07am 19 Jul 2011
Copy link to clipboard 
Print this post

Nick, have a look at the 74157. its a quad 2 input multiplexor. You could use 3 pins from the expansion connector for the foreground and 3 for the background. use the video signal to select foreground or background. you then have 8 foreground colours and 8 background. Still only 1 colour set per line, but potentially better than always having a black background.
Now that I think about it you could do the same with 2 seperate analog switches, one for the foreground, one for the background.
you might have to play a little with the pixel signal and the horizontal sync to turn off the colour during retrace.

Stuart
Edited by stuarts 2011-07-20
Time is nature's way of keeping everything from happening all at once.
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 12:49pm 19 Jul 2011
Copy link to clipboard 
Print this post

  stuarts said   Nick, forget my circuit, the forum removed my spaces. With the ROM, you can 16 completely different colours using 4 pins. not just 8 and 8 bright ones.

Stuart


Hi Stuart

Try the "code" button. The {CODE}{/CODE} tags, replacing the { with [ brackets, will format anything between then with a monospaced font, meaning spaces etc are preserved. Its handy for tabulated data or code or formatted text etc.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 12:55pm 19 Jul 2011
Copy link to clipboard 
Print this post

Many thanks Glenn, didn't even think of that.

Stuart
Time is nature's way of keeping everything from happening all at once.
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 07:31pm 19 Jul 2011
Copy link to clipboard 
Print this post

  stuarts said   Nick, have a look at the 74157. its a quad 2 input multiplexor. You could use 3 pins from the expansion connector for the foreground and 3 for the background.


VERY good suggestion Stuart! I didn't even think of that.

I am waiting on a MAX312 chip from Farna to come in the mail to fixup the current setup (brightness & default on). Next is to add 16 colour palette then I'll look into the extra MAX for setting background.

Yes, the 1 colour per scanline may be a permanent limitation of this design unless we brought the mod internal to the MM.

Still will need a 'volunteer' to patch the video driver firmware to make it support the multiple scanlines colours option. I don't see it being too hard but I am unfamiliar with MPLAB and C.

UPDATE: Just giving your idea some thought Stuart. It may not work properly. Manipulating the video signal as you suggest may add distortion to the video signal due to delays in switching. I would need to change to very fast video grade components to 'regenerate' the video signal as you suggest. What I am doing at the moment doesn't change the video signal from what it is coming out of the Maximite. I am merely controlling the *channeling* of the signal to the VGA inputs of the monitor. Hence, the signal is not degraded.Edited by Nick 2011-07-21
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 11:55pm 19 Jul 2011
Copy link to clipboard 
Print this post

Nick, the Excalibur generated all its video using LS TTL chips. If you had a good monitor, generated nice clean video. I figure that any of the monitors that we have today leave what I had in 1985 for dead. The 6331-1 PROM that was used was switching at the pixel rate for foreground and back ground colours. Its address lines were fed from a 74LS157 that swtiched the output from the colour RAM. It used 4 bits for foreground and the other 4 bits for background. Even if you dont use the PROM, there should be a suitable 74 series chip that would be plenty fast enough. I suppose there is only one way to find out. I was thinking of having a look at it at the weekend if only I could find my breadboard. Just lately I just design, etch and build a board, but I suspect this might need a little tweeking to get it working properly.

Stuart
Time is nature's way of keeping everything from happening all at once.
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 10:02pm 20 Jul 2011
Copy link to clipboard 
Print this post

Recieved my MAX312L chip yesterday and swapped out the 4066 for it.

FIXED: The brightness levels of the image are back to normal.

SEMI FIXED: The MAX312L is normally closed by default (0 = switches closed). I chose this so that on powerup, VGA is sent to all RGB signal inputs of the monitor so as the MM boots up as normal.

For some reason, the display is blank. I found that I have to set the pins for a digital output, example - SETPIN 1,8. Then the channel works. Sending a 1 to this pin via PIN(1)=1 disconnects the pin as expected and a 0 reconnects it.

Do I add a pull down resistor on the inputs to the MAX312L to ensue it gets a 0 signal and only swing high when I actually output a 1? (Will try tonight)

Once this little hurdle is sorted out, I move on to setting RGBI (16 colours).

Here is the updated schematic utilising the MAX312L.




OBSERVATIONS:

(1) My MM doesn't show a dark enough black level. This is not a problem of the mod, I had a very 'lit up' background even before. Anything I can do to the MM to lower the black level? (Is this called 'the clamp'?)

(2) The MM firmware seems to reset the SETPIN to 0 (I think it's 0). It also resets it whenever I type in a new line of BASIC code or load a file. That makes it difficult to set your screen to be a 'green screen' since it keeps resetting it to B/W. I guess this can only be rectified in the firmware.

Edited by Nick 2011-07-22
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 03:14am 21 Jul 2011
Copy link to clipboard 
Print this post

hey nick its sparkey ..have not been round but has any body come up with a serios hadwhwe adaptor for the color..and i just got back i dropped link last week before logging out sorry guys .. now i wonder whats happing with this mod i do see your about up to 16 colors thats cool and also nek you have ernt your title ..regards sparkey
technicians do it with least resistance
 
Gadget
Regular Member

Joined: 22/06/2011
Location: Australia
Posts: 70
Posted: 04:47am 21 Jul 2011
Copy link to clipboard 
Print this post

here's an idea I've been playing with:
the screen is 80characters x 36 lines = 2880 displayable character locations,
assign some memory to map these and assign the 8 bits such that the lower 4 are r,g,b + intensity of the foreground and the upper four bits the same for the background, and map all 8 bits to output pins, then use switching/mixing circuit to provide the appropriate colour.
I have an idea on how to do this in firmware, and also a command to disable this to allow access back to the 8 i/o taken up by this.

doing this I think we could have multiple colours (foreground and background) per line, only disadvantage is that 12 consecutive scan lines will be the same colour (but that is how early computers did it).

will have to do some experimenting.

Terry
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 04:57am 21 Jul 2011
Copy link to clipboard 
Print this post

Nick, I'm not sure about the pins being reset. I've not seen that sort of behavior.
If you look at Geoff's website, he talks about the differences in the video quality depending on whether you configure it to be VGA only, composite only, or the compromise of having the jumper to set it. I've only built mine for VGA only and it comes up with beautiful blacks.

To guarantee that you get video on startup, I'd be looking at putting pullup resistors on the pins to default to having a 1 on the input to the switch. Once the pins are configured as outputs, you have full control over the colour. it might be worth running the pins in open collector mode as you've got pullups.


Time is nature's way of keeping everything from happening all at once.
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 05:20am 21 Jul 2011
Copy link to clipboard 
Print this post

  stuarts said   If you look at Geoff's website, he talks about the differences in the video quality depending on whether you configure it to be VGA only, composite only, or the compromise of having the jumper to set it. I've only built mine for VGA only and it comes up with beautiful blacks.


That's what I have donbe. Maybe it's my LCD that has a bright backlight?

Does anyone use the composite? If not, that pin of the PIC32 should be reprogrammed for something more useful maybe.

  stuarts said   To guarantee that you get video on startup, I'd be looking at putting pullup resistors on the pins to default to having a 1 on the input to the switch. Once the pins are configured as outputs, you have full control over the colour. it might be worth running the pins in open collector mode as you've got pullups.


Maybe that's the problem? They get setup as inputs initially.

No, I chose this chip specifically because a 0 closed the switch which passes the signal straight through.
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 05:33am 21 Jul 2011
Copy link to clipboard 
Print this post

  Gadget said   doing this I think we could have multiple colours (foreground and background) per line, only disadvantage is that 12 consecutive scan lines will be the same colour (but that is how early computers did it).Terry


Stuart suggested this.

I don't know how useful it would be. I've never found the checkerboard 'VIC-20' look to be all that useful. Hence, I thought a palette of 16 colours on a black canvas is more useful. Why add the uneccessary complexity?

We'd still be able to do solid colour graphs, just use LINE with the box option. The mod would provide the colour.

It always looks more professional on a black canvas, at least for something like the Maximite.

I'm not trying to compete with a game console although games still could be had.

Regardless, we still need someone to patch the firmware to provide the scanline level colour changes. If we allocate 432 bytes, that's a different colour for each scanline. We could utilize less memory if we change the palette for every 12 scanlines. It's all software doing this.

I just don't know MPLAB and C programming to do this myself. :(
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 08:30am 21 Jul 2011
Copy link to clipboard 
Print this post

Nick, a pullup on each of your colour lines should do the trick. It will guarantee that you have all 3 switches turned on by default. Just make sure that they aren't too high that the PIC32 cant pull them down to gnd.

I'm still not sure if this can be done in the firmware as the video is run by DMA using the PSI hardware. I'm not sure how much, or whether there is any code running to generate the video. If its all done in hardware, I'm not sure how you set the colour bits as the video is output. Only Geoff can answer this I suspect, or someone that knows the code really well.

StuartEdited by stuarts 2011-07-22
Time is nature's way of keeping everything from happening all at once.
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 10:59am 21 Jul 2011
Copy link to clipboard 
Print this post

Added some 2.7K pull down resistors to the control lines and they seem to have fixed the blank screen on power up.

I have set an AUTORUN.BAS program to execute...

SETPIN 1,8
SETPIN 2,8
SETPIN 3,8

...to set the 3 control pins to digital outputs.

Each pin is outputting 0 on powerup which sets the MM's VGA output to all RGB monitor connections on (white). The MM boots and looks as if normal.

Executing a PIN(1)=1 opens the red connection and only Green and Blue pass to the monitor creating Cyan text on a black background.

The same happens for PINS 2 and 3 to combine 8 combinations of text color. As it stands, the colour change effects the whole screen as in the top left figure below.

These images are mockups that represent the results that are and will be capable when the project is complete.

The image top right shows the full 16 colour palette (8 colours, 2 intensities).

The bottom left shows how multiple lines of coloured text can be had once the firmware is modified to support a scanline palette table.

And bottom right is a mockup of what a game of Space Invaders would look like with this colour mod.



 
     Page 2 of 3    
Print this page
© JAQ Software 2024