Atom user defined colours

discussion of games, software, hardware & emulators relating to the Acorn Atom
User avatar
oss003
Posts: 2629
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Atom user defined colours

Postby oss003 » Sun Dec 17, 2017 7:20 pm

Hi guys,

I was just wondering if it is possible to add user defined colours to the Godil.
The colour palette is a constant array now but is it possible to add some addresses to the Godil to change the array values?
The standard values must be restored after a BREAK.
This way you can finally write games with a black background ........ :wink:

Greetings
Kees

User avatar
hoglet
Posts: 6853
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Atom user defined colours

Postby hoglet » Sun Dec 17, 2017 7:24 pm

oss003 wrote:
I was just wondering if it is possible to add user defined colours to the Godil.

The difficulty is to get multiple levels of RGB, you need some kind of video DAC. This might just be a few resistors, but they are not there currently.

User avatar
oss003
Posts: 2629
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: Atom user defined colours

Postby oss003 » Sun Dec 17, 2017 7:30 pm

For the current hardware, you still can choose 1 out of 8 colours, right?
Is luminance also used?

Greetings
Kees

User avatar
hoglet
Posts: 6853
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Atom user defined colours

Postby hoglet » Sun Dec 17, 2017 7:37 pm

oss003 wrote:For the current hardware, you still can choose 1 out of 8 colours, right?

Yes.
oss003 wrote:Is luminance also used?

If I remember correctly, there is actually:
1 bit of Red
2 bits of Green
1 bit of Blue

So that's 16 possible colours.

I'm not sure how different the three levels of green are.

User avatar
oss003
Posts: 2629
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: Atom user defined colours

Postby oss003 » Sun Dec 17, 2017 7:40 pm

Sounds interesting ..... :)

I looked at the Godil code but how do you define extra addresses?

Greetings
Kees

User avatar
hoglet
Posts: 6853
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Atom user defined colours

Postby hoglet » Sun Dec 17, 2017 8:18 pm

oss003 wrote:I looked at the Godil code but how do you define extra addresses?

Not sure what you mean by extra addresses... Extra registers?

All the different GODIL screen modes are currently selected using the Mode Extension Register:
https://github.com/hoglet67/AtomGodilVi ... n-register

At the moment there are two separate display controllers:
- Bit 7 = 0 selects a 6847 compatible display controller (that has a few extra bells and whistles controlled by some of the other bits)
- Bit 7 = 1 selects the 80x40 character attribute based controller

I think if you want to have a mode with 16 colours, it might be possible to adapt one of the existing display controllers. For example, you could adapt the 80x40 mode character attribute byte to allow 16 foreground colours (by loosing the underline attribute bit, or by reducing the number of background colours).

Or you could invent a new display controller from scratch. The main constraint is a total 8KB of video RAM. Although, as we have double buffering a mode with 16KB might be possible.
- Using 8K and 4 bits/pixel would give a resolution of 128x128
- Using 16K and 4 bits/pixel would give resolution of 256x128

This is really just limited by your imagination....

Are you interested in a pure graphics mode? Or more colours in a text mode?

Dave

User avatar
oss003
Posts: 2629
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: Atom user defined colours

Postby oss003 » Sun Dec 17, 2017 8:37 pm

Yes , I mean extra registers to change the colourpalette values.

I am not interested in other modes but inspired by the VideoNula topic, I just wondered if something like that is possible with the Godil colourpalette.
All Atom games in colourmode, have a coloured background while most games in other computers have a black background.

Greetings
Kees

User avatar
hoglet
Posts: 6853
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Atom user defined colours

Postby hoglet » Sun Dec 17, 2017 8:59 pm

The register address is currently 5 bits, giving 32 register between #BDE0 and #BDFF.

At the moment, I think there are four spare registers:
- #BDFC
- #BDFD
- #BDFE
- #BDFF

One idea would be to use these for palette that would map the four logical Atom colours to 16 possible physical colours:
- #BDFC - palette register for logical colour 0
- #BDFD - palette register for logical colour 1
- #BDFE - palette register for logical colour 2
- #BDFF - palette register for logical colour 3

Each palette register would need just 4 bits (R0, G1, G0, B0).

However, the easiest place to add the palette is just before the video output:
https://github.com/hoglet67/AtomGodilVi ... o.vhd#L395

Here you really have a 4-bit colour (final_red, final_green1, final_green0, final_blue). So maybe 4 palette registers is not enough, and 16 would be better. Not sure what the memory map would look like, as we don't want to move the SID. Maybe we could use #BD80-#BD8F?

So what to do with the other 4 bits in each register? Maybe alternate colour (again R0, G1, G0, B0)? Then you could flip between then on successive frames and get the illusion of more colours? Or set them the same, to get a constant stable colour.

So again, lots of possibilities.

Dave


Who is online

Users browsing this forum: No registered users and 5 guests