New shifter implementation 'THOUGHTS'

Progress on our FPGA cores.
User avatar
mrbombermillzy
Moderator
Moderator
Posts: 2284
Joined: 03 Jun 2018 19:37

New shifter implementation 'THOUGHTS'

Post by mrbombermillzy »

Ok. This is a new topic on possible changes/improvements that can be made to the original STFM range of Shifters for improving screen resolution, colourdepth, diplay object (sprite) movement speed, extra functionality or all of the above.

To start you all off, I will present my own thoughts on what could possibly improve the shifter dramatically, with literally no incompatibility with existing software, avoiding high colour mode sluggishness and very little in the way of achitechtural changes to the chip.

This was originally a conversation I was planning to have with @Icky , so it saves me repeating myself, I suppose! ;)

I'm thinking of an 'on-shifter' version of a DCTV (or the similar HAM-E) based device.

1.JPG

**** Now, before I get too far, I have to admit, I do not know much about PAL/NTSC video standard encoding, so will be referring to an article (*1) that explains how the below featured concepts work, for anyone who DOES actually know enough about these video standards to understand what is being done. I am also describing the device methods of operation as far as I am able to. I may have overlooked or mistaken some details. ****

Moving on then...

The unit is an external video device which lays dormant and basically acts as a 'Video thru' device until a 'magic cookie' type output signal sequence is intercepted in the top raster. When present, this then activates the unit to start its processing and decode the screen image (which has now been replaced with the magic cookie and a specially encoded bitpattern type image).

This then takes data from the image bit patterns (think of something similar to how a C64 screen processes the bit positions when switched to multicolour mode, if that helps visualise) and a separate RGBI input of the same image (output on the Amiga's Video output pins) and decompresses it into the external HW for display.

P1030934.JPG

The above image showing the integration of 'ordinary' 4bpp screen with the enhanced image higher in the frame with the extra colour content.

P1030935.JPG
P1030937.JPG
P1030946.JPG
s-l1601.jpg

The above image goes some way to explain things.

Unfortunately, that's as far as I can explain, as I don't have in-depth knowledge about how they decompress and encode the PAL/NTSC data from the input. But I've linked to an explanation by one of the guys who created it. (*1) I'm hoping you guys, who create video HW will have more of a clue! :)

The missing ingredient to this, that you WILL have to provide, is the lack of concurrent RGB+RGBI output from different pins on the ST monitor port (the Amiga seems to have a few extra bits like this; e.g. another one is the mysterious/undocumented UHRES registers which may have been a preliminary building block Video signal for the Ranger chipset which never materialised).

Personally, I would think something like this is a free upgrade, with no arch. upgrades whatsoever needed, other than another video output signal. (I imagine it doesn't even have to be RGBI and possibly using a better video signal type would improve matters?)

24-bit quality games are now within reach, with the same speed as regular 16 colour ones and all previous SW (games OR Apps) are fully compatible still.

There's the possibility of using 2-3 bitplanes for either a much faster display (and not too shabby colour wise either) or for higher resolution displays where a higher colour count is needed in productivity software.

All this, without having to learn any HW specific system device (i.e. much like an Amiga, where the games oriented HW is quite handy, but you have to fall in line as to keeping to its limitations, as opposed to a more open frame buffer based system, which is far more portable I believe; well, it's what's done on an ST anyway, along with loads of other systems.)

Finally, while being inherently lower resolution with its output, the actual output looks crisp enough (the units above have CVID>RGB converters) and IMHO is a far easier option than a bus saturating 24-bit card solution AND the complexity/cost of an 030+/faster wider bus to handle it adequately.

(*1) https://retrocomputing.stackexchange.co ... -dctv-work

Above is the link to the site discussing the workings of the unit, but as I know the management here prefer real data (as opposed to 'tenuous links that could disappear any day'), I have included the engineer's explanation below: ;)

**********************************************************************************************************************************************************
After some research, I found the hardware engineer that built the DCTV and we exchanged some messages where he explained the system.

This is the unedited text:

Wow, it has been a long time... I didn't really remember! Luckily I still have all the lab books and design notes from those days filed away. We used a technique that encoded the data on two consecutive lines in the Amiga frame buffer in a way that we could reconstruct a composite video signal when run through some processing and combined with data from the previous line (delayed through a line memory). I know that is pretty ambiguous, but it is a general description. I will describe in more detail below, but it assumes some familiarity with NTSC composite video signals.

In more detail: Amiga had a frame buffer mode that displayed 736x483 pixels, but only 4-bits per pixel (16 colors). We used that mode, but re-interpreted the data. We combined alternate pixels so that we had 8-bits per pixel at half the rate. Even (I think) lines stored data as Y + (R-Y), Y - (R-Y), etc. [Luma +/- red color difference value, alternating] at a 7.159MHz sample rate. Odd lines stored data as Y + (B-Y), Y - (B-Y), etc. [Luma +/- blue color difference value, alternating], logically shifted by half a 7.159MHz sample. So every line would contain every other raw sample for an NTSC composite video signal. In order to reconstruct the missing data, it would generate the Y component by averaging the values left and right of the missing sample, and the chroma component by subtracting the two adjacent samples from the previous line. The final value was created by adding these values together. The resultant data stream was at 14.318MHz and contained Y+(B-Y), Y+(R-Y), Y-(B-Y), Y-(R-Y), etc. When converted to analog and added sync and so on the resulting signal was a full color composite signal that looked surprisingly good.

So it was really a way to get full color out of the Amiga frame buffer by applying some signal processing techniques to trade off spatial resolution for increased colors. Instead of a frame of 736x483 pixels of 16 colors, we got an effective resolution of about 368x483 pixels of full NTSC type color. Chroma resolution was less (as with any composite NTSC type signal), including somewhat less resolution vertically. But it looked pretty good by 1990 standards! We found that we could even stream data off a fast (for the time) hard drive in real time, and used to demo by playing back scenes from "Back to the Future" at trade shows. Fun times.

Actually we may have used the 704x483 graphics mode... I got he 736 number from Wikipedia, but I am not sure it is correct. 704 sounds more right.

Then me asking a bit more:

You have cleared a mystery that was popping back in my mind now and then! It is true that for the time, the output was very good! so you could probably fit the decoding logic in a cpld?

And he replied:

The decoding logic fit in a 3000 series Xilinx FPGA. The line memory was external, along with the D to A converter and a few other things like a PLL for the pixel clock. I think the final product had an A to D converter for grabbing images from an external video source as well...
You do not have the required permissions to view the files attached to this post.
User avatar
Icky
Site Admin
Site Admin
Posts: 4374
Joined: 03 Sep 2017 10:57
Location: UK

Re: New shifter implementation 'THOUGHTS'

Post by Icky »

Interesting thread @mrbombermillzy. There is so much that can be done with the shifter being in FPGA.

So here is an example of a Phoenix logo sprite that is drawn on a separate plane in the FPGA. It's fixed at the moment but I have played with fading during boot up of the ST.

IMG_5415.jpeg

You do not have the required permissions to view the files attached to this post.
User avatar
mrbombermillzy
Moderator
Moderator
Posts: 2284
Joined: 03 Jun 2018 19:37

Re: New shifter implementation 'THOUGHTS'

Post by mrbombermillzy »

Cool stuff @Icky ;)

In the above thread, I'm tying to show my best 'bang for buck' idea if it would save you guys the time of implementing anything too time consuming as it should cover a lot of bases itself.

However, if you have plenty of good ideas already and are going to be adding some great shiny new features, then that is great news!

I can roll off further 'piecemeal' tweaks that will help coders (e.g. fast write response video position registers (ff8201/3/d), changeable palette bitfield pattern, TT style Sample & Hold register, more palette indexes, etc) or ramp it right up to including an onboard re-implementation of a Yamaha V9958 Video processor for hardcore gaming (and FPGA dev slave labour! :lol: :hide: ).

All of these traditional 'good move' requests can be made obsolete by changing other facets of the Shifter, of course.

I guess we have to gauge what is possible, easy, hard and what you are happy to be working on.

And just for the record, I'm fine just scratching away, doing this sort of stuff in SW myself, not expecting anything at all...I'm just putting out ideas. :D
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7376
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: New shifter implementation 'THOUGHTS'

Post by stephen_usher »

I guess the “best” lowest end enhancement would be to add STE compatible enhancements and possibly the TT enhancements too. Basically adding what software out there already know how to manage.

It’s a pity that the replacement shifter won’t be able to access memory as 64-bit width to allow better bandwidth.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
ijor
Posts: 825
Joined: 30 Nov 2018 20:45

Re: New shifter implementation 'THOUGHTS'

Post by ijor »

mrbombermillzy wrote: 27 Dec 2022 20:39 I'm thinking of an 'on-shifter' version of a DCTV (or the similar HAM-E) based device.
...
(From DCTV developer):
So it was really a way to get full color out of the Amiga frame buffer by applying some signal processing techniques to trade off spatial resolution for increased colors. Instead of a frame of 736x483 pixels of 16 colors, we got an effective resolution of about 368x483 pixels of full NTSC type color.
Hi mrbombermillzy.

I might be wrong, but if I understand this correctly, what the device basically performs, is to sacrifice half the resolution to gain color depth. The resulting image was good because it started with a very high resolution (736x483) that allows to encode lots of information. If you would attempt to implement the same trick on the ST, then I doubt you will get a reasonable result from a 320x200 display.

Very interesting piece of hardware, nevertheless.
http://github.com/ijor/fx68k 68000 cycle exact FPGA core
FX CAST Cycle Accurate Atari ST core
http://pasti.fxatari.com
User avatar
mrbombermillzy
Moderator
Moderator
Posts: 2284
Joined: 03 Jun 2018 19:37

Re: New shifter implementation 'THOUGHTS'

Post by mrbombermillzy »

ijor wrote: 28 Dec 2022 03:30 I might be wrong, but if I understand this correctly, what the device basically performs, is to sacrifice half the resolution to gain color depth. The resulting image was good because it started with a very high resolution (736x483) that allows to encode lots of information. If you would attempt to implement the same trick on the ST, then I doubt you will get a reasonable result from a 320x200 display.
You are quite correct. Apologies if this was not made clearer in the earlier post.

However, I'm sort of 'anticipating', - what with the talk about increasing speeds and bus widths in the blitter thread -, that something over the norm might be possible for the remade shifter too.

I was thinking a 'productivity mode' screen resolution of 640x480x4bpp (like the Falcon has), if not HW based overscan availability itself. (About time the Atari line had this.)

Saying that though, even at the lower res, the image is also surprisingly clear for the resolution...well, on a 1084 RGB monitor. I guess a modern flatpanel may be a different story. (Although it does look nice on my Dell 27" flat panel).

Also...one thing I failed to mention earlier; If you really are interested, I'm happy to loan either yourself or @Icky a fully working PAL DCTV or HAM-E unit for evaluation/testing/reverse engineering. ;)
stephen_usher wrote: 27 Dec 2022 22:17 I guess the “best” lowest end enhancement would be to add STE compatible enhancements and possibly the TT enhancements too. Basically adding what software out there already know how to manage.

It’s a pity that the replacement shifter won’t be able to access memory as 64-bit width to allow better bandwidth.
I'd say that's a fair bit of work for not much gain that isn't already out there, but it is a sensible option, otherwise the ST line will become a bit more fragmented, if proceeding with a 'STFM chipset HW fork v2.0'.

Upping the bit width is an old graphic card trick to circumvent slower bus speeds and would actually be a nice idea. However, not sure how much work that would be for team Ijor/Icky.

.
User avatar
Smonson
Posts: 717
Joined: 28 Oct 2017 10:21
Location: Canberra, Australia

Re: New shifter implementation 'THOUGHTS'

Post by Smonson »

stephen_usher wrote: 27 Dec 2022 22:17 It’s a pity that the replacement shifter won’t be able to access memory as 64-bit width to allow better bandwidth.
There's no technical reason why the RAM --> SHIFTER bus couldn't be wider than 16 bits. Is that how they do it on the TT to get the higher resolutions? I guess it would be possible to replace the entire ST memory with a new one that supported both the extra-wide and the 16-bit 68000 bus accesses.

I didn't really "get" how this DCTV device works, but if the idea is to halve the resolution to get twice the colour depth, the shifter core in the Phoenix already contains a hacky 256-colour mode that does this (anticipating a 16MHz bus speed). The only problem is it's only 160x200 on a standard ST, nobody with a 16MHz machine has been able to get the Phoenix running yet as far as I know.
User avatar
Cyprian
Posts: 542
Joined: 22 Dec 2017 09:16
Location: Warszawa, Poland

Re: New shifter implementation 'THOUGHTS'

Post by Cyprian »

Smonson wrote: 30 Dec 2022 13:35 There's no technical reason why the RAM --> SHIFTER bus couldn't be wider than 16 bits. Is that how they do it on the TT to get the higher resolutions? I guess it would be possible to replace the entire ST memory with a new one that supported both the extra-wide and the 16-bit 68000 bus accesses.
If I remember correctly TT SHIFTER has 64bit access to the ST-RAM in the TT
ATW800/2 / V4sa / Lynx I / Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
http://260ste.atari.org
User avatar
mrbombermillzy
Moderator
Moderator
Posts: 2284
Joined: 03 Jun 2018 19:37

Re: New shifter implementation 'THOUGHTS'

Post by mrbombermillzy »

Smonson wrote: 30 Dec 2022 13:35
stephen_usher wrote: 27 Dec 2022 22:17 It’s a pity that the replacement shifter won’t be able to access memory as 64-bit width to allow better bandwidth.
There's no technical reason why the RAM --> SHIFTER bus couldn't be wider than 16 bits. Is that how they do it on the TT to get the higher resolutions? I guess it would be possible to replace the entire ST memory with a new one that supported both the extra-wide and the 16-bit 68000 bus accesses.
Yep. That's what TT shifter does. There was a thread on here where we discuss the shifter interface to the TT bus:

viewtopic.php?p=85090#p85090
Smonson wrote: 30 Dec 2022 13:35 I didn't really "get" how this DCTV device works, but if the idea is to halve the resolution to get twice the colour depth, the shifter core in the Phoenix already contains a hacky 256-colour mode that does this (anticipating a 16MHz bus speed). The only problem is it's only 160x200 on a standard ST, nobody with a 16MHz machine has been able to get the Phoenix running yet as far as I know.
This device can be 'tacked on' to the output stage of the remade shifter (i.e. at the RGB outputs), hence me suggesting as an easy upgrade. Like I said before, I'm willing to let someone have a look at my unit to figure it out (reverse engineering HW isn't really my speciality).

It can work with less bitplanes (and hence could make use of e.g. ST MED res), but then the amount of data used to compress/decompress the PAL/NTSC colour signal is reduced and hence the colour amount.

For example, here is an image using 4 bitplanes:

P1030946.JPG

...and the same image with just 2 bitplanes (ST MED RES?):

P1030945.JPG

Of course, anyone is open to post ideas in this topic (thanks @stephen_usher for some other suggestions). However, most of the stuff I can think of is mainly democoder style hacks/tricks to pull more colours out of the machine.

The above HAM-E/DCTV is the only solution I can really think of that is 100% compatible with games and the OS. (Other than throwing extra speed/bus width at the problem and having a slower mode for e.g. 100% game compatibility).

In the mean time, if I can come up with any revelations/miracles on the twin shifter machine, I'll be sure to let you all know! ;)

.
You do not have the required permissions to view the files attached to this post.
User avatar
exxos
Site Admin
Site Admin
Posts: 28344
Joined: 16 Aug 2017 23:19
Location: UK

Re: New shifter implementation 'THOUGHTS'

Post by exxos »

So let me see if I "get it". There must be some software on the ST which takes a (presume) true colour image and compresses it? That data is output to the "magic box" ? Which then decompresses the data and displays the original image on the monitor ?

Return to “FPGA DEVELOPMENT”

Who is online

Users browsing this forum: ClaudeBot and 7 guests