Login
Back to forumSee the full topicGo to last reply

Posted By

IstvanV
on 2008-01-12
16:49:49
 Re: So I want to do plus/4 gfx...

The fliconv.7z package has been updated again: this time, there are some speed improvements, fixed PRG size for non-overscan modes, and some color interlacing changes that may or may not look better. The next thing to do will be to start reorganizing the code for a GUI version.

The YAPE bug is most likely in the emulation of the internal DMA position counter, which is similar to $FF1A/1B, but cannot be accessed directly. However, it can be changed by writing to $FF1E. The problem could be that YAPE either does not increment, or does not latch this counter before the first DMA (these should be already enabled from line 0), or maybe the horizontal timing or the condition for latching is not correct. It did take some work for me a while ago to find out how these registers should be emulated accurately happy

I do not know why increasing the joystick threshold makes the problem worse, but if/when you do not need it, just disable it in the keyboard configuration window.

Here is a summary of the image converter command line options:

-ymin MIN
-ymax MAX

These basically adjust brightness and contrast by scaling RGB values from a 0 to 1 range to 'ymin' to 'ymax'. If the maximum is set lower than the minimum, the result will be a negative image.

-scale X Y
-offset X Y

Resize and shift the image. Scaling by 1.0 means using the default size. The offsets are in half TED pixel units, that is, the virtual screen resolution is assumed to be 768x576. Positive offsets mean shifting to the right and down, respectively.

-saturation M P

Multiply the color saturation by 'M', and then raise it to power 'P' relative to the TED saturation. This can be used to compress the saturation range before conversion.

-gamma G M

Apply a gamma correction of 'G' (> 1 is brighter) to the luminance (Y) component of the image, and assume a monitor gamma of 'M'. The difference between the two parameters is that the latter is applied both to the image and the internal luminance table as well.

-dither M L S

Set dither mode (0: ordered, 1: diffuse), limit, and error diffusion factor (0 to 1). Error diffusion dithering is more advanced, but is also more likely to have artifacts due to the palette being different for each 8x2 area of the image. The dither limit is useful to avoid too much added noise with ordered dithering.

-pal N

Optimize for the limited color resolution of PAL displays if N is 1, or disable this feature if N is 0. While slower to calculate, it is generally recommended, and looks better in most cases.

-xshift S0 S1

Set horizontal shift (0 to 7) for each interlaced field. There are two special settings: -1 automatically optimizes the X scrolling for the least amount of error, and -2 uses random values for every line. Optimal scrolling can only be used for both fields at once, and is the default. Only -xshift 0 0 allows a full 40 column display, in any other case the width is reduced to 38 columns.

-border N

Set the border color (0 to 127). This is also the assumed color of any pixels with out of range coordinates ("empty" areas are filled with border color by the resize operation), as well as the background color for RGBA images.

-nointerlace N

Use interlaced (1) or normal (0) vertical resolution. Even if -nointerlace 1 is used, "flickering" interlace is still enabled.

-size N

Set the vertical size of the FLI display. Supported values include 200, 228, 232, 248, 400, 456, 464, and 496. This option also implies setting '-nointerlace' depending on the selected resolution. 248 and 496 will only work on PAL machines, while the smaller sizes can also be displayed on NTSC. With 200 or 400 lines, BASIC memory is used up to $B400, however, using the higher resolutions will increase this to $E500.

-y1bit N

Quantize luminance to 1 bit (black and white) if 'N' is 1. This effect looks best with full diffuse dithering (use -dither 1 1 1).

-no_li N

By default, luminance attributes are set independently for each 8x2 pixel block. With N=1, this is reduced to 8x4 by not allowing the interlaced fields to have different attributes. While the reduced attribute resolution generally means worse quality, it may be useful to avoid comb-like artifacts sometimes in interlaced modes.

-ci N

Color interlace mode (0 to 2). 0 disables color interlacing, 1 interlaces colors with neighboring hue only, and 2 will also interlace any color with grey to display half saturation. Higher settings take longer time to calculate, and do not necessarily look better.

-searchmode M P

Select the algorithm that is used to assign the two luminance codes for each 8x2 block, as well as the error calculation formula. Mode 0 sums the square of differences, and tries to make the sum the smallest possible. In mode 1, the luminance levels nearest the darkest and brightest pixel are used. Mode 2 is like mode 0, but the error is multiplied by 'P' for every pixel that would be out of range. Mode 3 selects the luminance codes so that no pixels will be out of range. Mode 4 is similar to mode 0, but takes into account the possibility of dithering, and uses the 'P' parameter (0 to 0.5) to add extra error to the "dithered" levels. Mode 5 is another variation of summing the square of differences, but tries to move towards the levels nearest the darkest and brightest pixel (as in mode 1) as long as the increase in error does not exceed a threshold determined by the 'P' parameter (usually in the range 0.01 to 0.03).

-raw N

If 'N' is 1, only the raw FLI data is written to the PRG file, and the 1K display routine is not included.



Back to top


Copyright © Plus/4 World Team, 2001-2024