32768 color dual Shifter ST mod - schematics lost?

General discussions or ideas about hardware.
Post Reply
User avatar
Smonson
Posts: 710
Joined: Sat Oct 28, 2017 10:21 am
Location: Canberra, Australia
Contact:

Re: 32768 color dual Shifter ST mod - schematics lost?

Post by Smonson »

Icky wrote: Sat Dec 18, 2021 12:49 pm One option is to make the Phoenix Shifter core do this. I'll see if I can modify it to replicate your circuit @sporniket. Unfortunately I am not able to test as all my Atari stuff is in storage still.
Yeah. As mentioned earlier, this is very straightforward.

Increase the number of bits in r, g, and b from four to five:

Code: Select all

	output [3:0] r;
	output [3:0] g; 
	output [3:0] b;
Increase the number of bits in each palette entry from twelve to fifteen:

Code: Select all

	reg [11:0] palette [15:0];
Add the extra bits from the palette to the r, g, b calculation here:

Code: Select all

	assign r = resolution == 2 ? mono_intensity : 
		    {palette[palette_index][10:8], palette[palette_index][11]};
	assign g = resolution == 2 ? mono_intensity :
		    {palette[palette_index][6:4], palette[palette_index][7]};
	assign b = resolution == 2 ? mono_intensity :
		    {palette[palette_index][2:0], palette[palette_index][3]};
Connect the extra bits in the palette to the data bus when reading from the shifter:

Code: Select all

	assign data_out = addr[4] == 1 ? {6'b0, resolution, 8'b0} : {4'b0, palette[addr[3:0]]};


... and similarly when writing:

Code: Select all

	// register writes
	always @(posedge CLOCK_32) begin
		if (reset) begin
			resolution <= 2'b0;
		end else if (!cs && !rw) begin
			if (addr == 16) begin
				resolution <= data[1:0];
			end else begin
				palette[addr[3:0]] <= data[11:0];
			end
		end
	end
And then connect physical wires to those IO ports in the FPGA compiler software.

If you wanted to go up to 8 bits per colour, just use eight bits instead of five, and then use address $ff8262 bit 4 as a flag to indicate that future writes to the palette will be for the higher bits of each palette entry (this is to remain compatible with 256-colour mode that is already implemented).

E.g.

Code: Select all

$ff8262 = $0    == Writes to palette entry 0 to 15 are for lower bits of palette 0 to 15
$ff8262 = $1    == Writes to palette entry 0 to 15 are for lower bits of palette 16 to 31
   ...
$ff8262 = $f    == Writes to palette entry 0 to 15 are for lower bits of palette 240 to 255

$ff8262 = $10   == Writes to palette entry 0 to 15 are for higher bits of palette 0 to 15
$ff8262 = $11   == Writes to palette entry 0 to 15 are for higher bits of palette 16 to 31
   ...
$ff8262 = $1f   == Writes to palette entry 0 to 15 are for higher bits of palette 240 to 255
I hope that makes sense.
User avatar
sporniket
Posts: 969
Joined: Sat Sep 26, 2020 9:12 pm
Location: France
Contact:

Re: 32768 color dual Shifter ST mod - schematics lost?

Post by sporniket »

my belly is not the only thing that need a little bit of diet...

2021-12-22--a-little-bit-wide.jpg
2021-12-22--a-little-bit-wide.jpg (210.08 KiB) Viewed 2898 times
User avatar
DoG
Posts: 1130
Joined: Sat Apr 07, 2018 12:26 pm

Re: 32768 color dual Shifter ST mod - schematics lost?

Post by DoG »

sporniket wrote: Wed Dec 22, 2021 6:07 pm my belly is not the only thing that need a little bit of diet...
:lol:
User avatar
sporniket
Posts: 969
Joined: Sat Sep 26, 2020 9:12 pm
Location: France
Contact:

Re: 32768 color dual Shifter ST mod - schematics lost?

Post by sporniket »

Much better... but because of some resistors, one will need long pins for the connector to the socket.

2021-12-23--fitting-01.jpg
2021-12-23--fitting-01.jpg (180.59 KiB) Viewed 2833 times
2021-12-23--fitting-02.jpg
2021-12-23--fitting-02.jpg (239.78 KiB) Viewed 2833 times
2021-12-23--fitting-03.jpg
2021-12-23--fitting-03.jpg (170.13 KiB) Viewed 2833 times
User avatar
Icky
Site Admin
Site Admin
Posts: 3993
Joined: Sun Sep 03, 2017 10:57 am
Location: UK

Re: 32768 color dual Shifter ST mod - schematics lost?

Post by Icky »

sporniket wrote: Thu Dec 23, 2021 6:57 pm Much better... but because of some resistors, one will need long pins for the connector to the socket.
Or use a turned pin DIL socket to stack the board higher :) Nice work BTW @sporniket
User avatar
sporniket
Posts: 969
Joined: Sat Sep 26, 2020 9:12 pm
Location: France
Contact:

Re: 32768 color dual Shifter ST mod - schematics lost?

Post by sporniket »

Icky wrote: Thu Dec 23, 2021 7:40 pm Or use a turned pin DIL socket to stack the board higher :)
Good suggestion, thanks :)
Icky wrote: Thu Dec 23, 2021 7:40 pm Nice work BTW @sporniket
Thanks, I will shave a little bit of the length as I can do it on the side of the Shifter socket, to get a wider margin, and it will be good to me.
User avatar
mrbombermillzy
Posts: 1468
Joined: Sun Jun 03, 2018 7:37 pm

Re: 32768 color dual Shifter ST mod - schematics lost?

Post by mrbombermillzy »

Any updates @sporniket ? :)
User avatar
sporniket
Posts: 969
Joined: Sat Sep 26, 2020 9:12 pm
Location: France
Contact:

Re: 32768 color dual Shifter ST mod - schematics lost?

Post by sporniket »

@mrbombermillzy I have let some time pass after shortening a little bit the length on the pcb, in case someone make a feedback. By next week I will make a gerber and order a small batch to check that in effect, it fits inside the shield of the shifter.

The latest commit is tagged as v1.0.0-xprc2 (a.k.a eXPerimental Release Candidate 2).

I also started to make a project on mouser, to make a bom.
User avatar
mrbombermillzy
Posts: 1468
Joined: Sun Jun 03, 2018 7:37 pm

Re: 32768 color dual Shifter ST mod - schematics lost?

Post by mrbombermillzy »

Great!

So is the palette access still going to be:

GRGBRRRRGGGGBBBB (5444032103210321)?
User avatar
sporniket
Posts: 969
Joined: Sat Sep 26, 2020 9:12 pm
Location: France
Contact:

Re: 32768 color dual Shifter ST mod - schematics lost?

Post by sporniket »

Yes, that's the spirit, with legacy STe bits being the Most Significant Bits though, meaning the final mix that I devised would be, with your notations :

Code: Select all

R_analog = 321043
G_analog = 321045
B_analog = 321043
Meaning that between green levels 0..32767 (0b000000 .. 0b011111), greys are obtained with the LSB at '0', and for green levels 32768..65535, greys are obtained with the LSB at '1'.

I hope I am clear enough, however here are how I expect the 32 shades of greys (provided I did no errors with all those out of order bits...) :

Code: Select all

0000.0000.0000.0000 -- Black
0111.0000.0000.0000 -- Grey 1/31
0000.1000.1000.1000 -- ...
0111.1000.1000.1000
0000.0001.0001.0001
0111.0001.0001.0001
0000.1001.1001.1001
0111.1001.1001.1001
0000.0010.0010.0010
0111.0010.0010.0010
0000.1010.1010.1010
0111.1010.1010.1010
0000.0011.0011.0011
0111.0011.0011.0011
0000.1011.1011.1011 -- ...
0111.1011.1011.1011 -- Grey 15/31 -- Lower half 
1000.0100.0100.0100 -- Grey 16/31 -- Higher half
1111.0100.0100.0100 -- ...
1000.1100.1100.1100
1111.1100.1100.1100
1000.0101.0101.0101
1111.0101.0101.0101
1000.1101.1101.1101
1111.1101.1101.1101
1000.0110.0110.0110
1111.0110.0110.0110
1000.1110.1110.1110
1111.1110.1110.1110
1000.0111.0111.0111
1111.0111.0111.0111 -- ...
1000.1111.1111.1111 -- Grey 30/31
1111.1111.1111.1111 -- White
Post Reply

Return to “HARDWARE DISCUSSIONS”