Welcome, Guest. Please login or register.

Author Topic: PTDS (formerly PED81C) - pseudo-native, no C2P chunky screens for AGA  (Read 19782 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline saimoTopic starter

PTDS (Pixel Tetrads Dots / Speed) is a video system for AGA Amigas that provides pseudo-native chunky screens, i.e. screens where each byte in CHIP RAM corresponds to a dot on the display - in other words, it offers chunky screens without chunky-to-planar conversion.

Download: https://www.retream.com/PTDS

Some examples:
 * https://www.youtube.com/watch?v=0xunQ6ldVKU
 * https://www.youtube.com/watch?v=4eikEo45v1I
 * https://www.youtube.com/watch?v=eVzTIyg_MeE
 * https://www.youtube.com/watch?v=ebxwKm9K4Os
 * https://www.youtube.com/watch?v=tLtLhJXInOY
(Due to technical limitations, the video quality is lower than the actual one.)

For the details, please refer to the documentation included in the archive.
« Last Edit: March 19, 2025, 04:20:37 PM by saimo »
RETREAM - retro dreams for Amiga, Commodore 64 and PC
 
The following users thanked this post: klx300r

Offline saimoTopic starter

Re: PED81C - pseudo-native, no C2P chunky screens for AGA
« Reply #1 on: June 21, 2023, 04:05:16 PM »
Uploaded an archive with updated documentation.
While at it, given that I was asked for a source code example, I whipped up an AMOS Professional program that shows how to set up a PTDS screen and to perform some basic operations on it - hopefully, this will be easy to understand and also open the door to AMOS programmers. The program source is included in the archive.
« Last Edit: March 19, 2025, 04:34:37 PM by saimo »
RETREAM - retro dreams for Amiga, Commodore 64 and PC
 

Offline saimoTopic starter

Re: PED81C - pseudo-native, no C2P chunky screens for AGA
« Reply #2 on: July 18, 2023, 08:44:30 PM »
@Coolrasta

Thank you for the nice comments. I'm glad you appreciate the documentation.
RETREAM - retro dreams for Amiga, Commodore 64 and PC
 

Offline saimoTopic starter

Re: PED81C - pseudo-native, no C2P chunky screens for AGA
« Reply #3 on: November 28, 2023, 10:59:48 PM »
I have just released a little update, accompanied by the PTDS Voxel Engine (PVE), i.e. a new demo. If you can't be bothered trying it yourself, you can see it in this video - but beware: YouTube's video compression degraded the visual quality (especially the colors saturation and brightness).

https://www.youtube.com/watch?v=0xunQ6ldVKU

About the update, I fixed some palette values in a table in the documentation, added the formulas for calculating DIWSTRT, DIWSTOP, DIWHIGH, DDFSTRT and DDFSTOP to the documentation and implemented them in the AMOS Professional source code example.
« Last Edit: March 19, 2025, 04:37:02 PM by saimo »
RETREAM - retro dreams for Amiga, Commodore 64 and PC
 

Offline saimoTopic starter

Re: PED81C - pseudo-native, no C2P chunky screens for AGA
« Reply #4 on: December 22, 2023, 10:10:26 AM »
Just released a new version of PVE. Full changelog below. In short: it's faster and it's got a few little additions.

https://retream.itch.io/ptds

v1.1 (22.12.2023)
* Reworked screen buffering, so that the raster data is more efficiently written to CHIP RAM when bitplanes DMA is inactive.
* Improved 68030 caches handling.
* Added 68040 and 68060 caches handling.
* Added MMU handling to avoid that the MMU affects the speed negatively.
* Optimized rendering core by making it write the dots sequentially.
* Made a little 68060-specific code optimization.
* Ensured 68060 susperscalar dispatch is enabled.
* Added live-toggable staggered lines video filter, which helps see better colors on devices that do not support SHRES and reduces the jailbars effect on devices that support SHRES (to enable/disable: [F1]).
* Made fps indicator live-togglable (to enable/disable: [F2]).
* Made quitting from the voxel screen return to the splash screen.
* Replaced mouse controls with keyboard controls.
* Added benchmark function.
* Added command line switches to control the CPU caches.
* Fixed bug that caused a longword to be written to a random location when the fps indicator was on.
* Fixed an innocuous initialization bug.
* Made cleanup code more robust.
* Updated, extended and fixed documentation.
« Last Edit: March 19, 2025, 04:40:57 PM by saimo »
RETREAM - retro dreams for Amiga, Commodore 64 and PC
 

Offline saimoTopic starter

Re: PED81C - pseudo-native, no C2P chunky screens for AGA
« Reply #5 on: March 27, 2024, 10:42:02 PM »
It was ages that I intended to dig up some 20+ years old code and use it to play with PTDS a little more. Finally I got around to do it and came up with a new test program called Zoomaniac.
Details in the video and in the manual excerpt below. Download available at https://retream.itch.io/ptds.

https://www.youtube.com/watch?v=eehqapb20fE

CHANGELOG

March 27, 2024
* Added the Zoomaniac demo.
* [PTDS Voxel Engine] Made a couple of minor changes.
* [PTDS Voxel Engine] Updated documentation.

January 1, 2024
* Rebuilt demos against latest custom framework.
* [PTDS Voxel Engine] Optimized slightly background rendering.
* [PTDS Voxel Engine] Corrected benchmark fps calculation (312 rasterlines were considered instead of 313).
* [PTDS Voxel Engine] Built against latest custom framework.
* [PTDS Voxel Engine] Updated, extended and fixed documentation.
« Last Edit: March 19, 2025, 04:37:44 PM by saimo »
RETREAM - retro dreams for Amiga, Commodore 64 and PC
 

Offline saimoTopic starter

Re: PED81C - pseudo-native, no C2P chunky screens for AGA
« Reply #6 on: March 29, 2024, 01:49:25 PM »
In response to the feedback received, I have uploaded a new version of Zoomaniac that allows to enable/disable the fps limit by means of [F3].

Code: [Select]
* The number shown in the top-left corner of the effects screen is the fps
  indicator, which reports the number of frames rendered in the last second.
  It is limited to 999.
* When the fps limit is on, the maximum number of frames rendered per second
  is 50 also on the most powerful machines, as the display refresh rate is 50
  Hz. When the fps limit is off, frames are rendered without pausing when the
  previously rendered frame/frames has/have not (completely) displayed yet. On
  machines which cannot run the program at 50 fps or more, turning off the
  limit has no effect whasoever; on the other machines, the only visible effect
  is that the fps indicator goes beyond 50, thus giving a measure of the maximum
  speed that the machine can reach.

Also, this new version runs 1-2 fps faster on 68030 thanks to the data cache burst:

Code: [Select]
* on 68030 tests proved that: it is advantageous to turn the data cache burst
   on when scaling a 128 dots wide rectangle to a rectangle wider than 8 dots
   (i.e. with an X scaling factor greater than 1/16); with a scaling factor of
   1/16 or less the difference proved to be minimal when both the source and
   destination rectangles were 256 dots tall; considering that turning the data
   cache burst off would therefore be advantageous only with very narrow and
   tall rectangles (which are uncommon and intrinsically rather inexpensive),
   it is not worth it to implement a data cache burst management inside the
   scaling routine;

CHANGELOG

v1.1 (28.3.2024)
* Turned the 68030 data cache burst on for slightly faster performance.
* Made a couple of minor optimizations.
* Added frames rendering limit toggle ([F3]).
* Worked on fps indicator: added hundreds digit; made digits smaller; made digits auto-clearing, so that they read correctly also when they are not cleared before drawing.
* Made staggered lines toggle as soon as [F1] is pressed (instead of when it is released).
* Updated splash screen.
* Redesigned the 'M' in the logo.
* Updated and extended manual.
RETREAM - retro dreams for Amiga, Commodore 64 and PC
 

Offline saimoTopic starter

Re: PED81C - pseudo-native, no C2P chunky screens for AGA
« Reply #7 on: April 02, 2024, 09:01:44 PM »
To have a complete set of scaling routines (which hopefully I'll use for something someday), I added support for color-keying, zero-keying (color-keying with color 0), and horizontal and vertical flipping.
Morever, given that initially the focus was on the stock A1200, the performance on expanded machines was not optimal (as the rendering was done directly in CHIP RAM), so I added also an alternative buffering method that, when 2 rasters can be allocated in FAST RAM, allows rendering in FAST RAM and then copies the rendered raster to the raster in CHIP RAM as quickly as possible, starting when the beam reaches the bottom of the screen. This, relatively to the first effect in the test program (which is the only one whose performance was measured until now), produced a gain of 8-9 fps on my 68030-equipped Amiga 1200.

The updated test program (available at https://retream.itch.io/ptds), to demostrate the new features, streches and shrinks a color/zero-keyed texture covering almost the entire screen over a full-screen zooming background, with all the possible flipping combinations. That is of course a bit taxing for a stock A1200, whose performance drops between 12 and 16 fps in the busiest cases.

https://www.youtube.com/watch?v=ebxwKm9K4Os

(Side note: the video was recorded before finalizing the test program, so it shows an outdated splash screen and zooming jumps relatively to the background when passing from/to the color/zero-keying effects.)
« Last Edit: March 19, 2025, 04:40:05 PM by saimo »
RETREAM - retro dreams for Amiga, Commodore 64 and PC
 

Offline saimoTopic starter

Re: PED81C - pseudo-native, no C2P chunky screens for AGA
« Reply #8 on: December 06, 2024, 12:38:46 PM »
By chance I discovered that Zoomaniac might crash on my real A1200. After some investigation it turned out that it was due to a stack issue that happened when the execution dropped below 50 fps on 68020, 68030 and 68040 (an instruction was executed before instead of after a branch). That's fixed now.
While searching for the problem, I realized a way to make the solid scaling routine a bit faster - so the bug, although finding it required some effort, was actually a good thing!

The new download is available on the PTDS page: https://www.retream.com/PTDS
« Last Edit: March 19, 2025, 04:40:28 PM by saimo »
RETREAM - retro dreams for Amiga, Commodore 64 and PC
 

Offline saimoTopic starter

Re: PTDS (formerly PED81C) - pseudo-native, no C2P chunky screens for AGA
« Reply #9 on: March 19, 2025, 04:41:50 PM »
More experimenting with PTDS. This is a proof of concept. It is just the core of a graphics engine for various vague game ideas (that are not going to materialize). It was useful to evaluate the visual quality and the speed (around 20 fps on a stock Amiga 1200, constantly much above 50 fps on an Amiga 1200 with Blizzard 1230 IV, 68030 @ 50 MHz and 60 ns RAM).

https://www.youtube.com/watch?v=eVzTIyg_MeE

https://www.retream.com/PTDS

Notes:
 * the video quality is affected by the fact that: the scandoubler did not support SHRES (so a real-time software trick was used to somehow produce the colors, although it is only a visual illusion and causes a sort of rasterline effect); the monitor did not support progressive PAL; the video was shot with an ancient phone at just 24.917 Hz; YouTube's compression degraded the video quality further;
 * graphics are just placeholders;
 * the city skyline has been derived from the picture at https://www.pinterest.com/pin/some-other-skyline--327988785356024774/
RETREAM - retro dreams for Amiga, Commodore 64 and PC