Spectrum Progress #02
19 января 1997 |
|
piece of iron - "SPRINTER-97": graphic accelerator.
(C) Ivan Makarchenko, 1997. ACCELERATOR operation screen. The main idea of the accelerator in the possibility of using the maximum possible speed data transfers to video RAM. At a frequency of 3.5 MHz of video RAM can be information at a rate of 3,500,000 bytes per second. When the volume of Spectrum-ovsky screen 6.3K This speed allows, for example, to clear the entire Screen time: 2 milliseconds (1 / 10 part of the screen cycle). Scrolling the entire screen is carried out 4 milliseconds (you need to read information from screen and move it). If we use such speed and in other operations, this will give a huge increase in the dynamics of the screen images. How does the processor Z80. He chooses his command, decodes it, and then executes. That would send a single byte on a normal frequency of 4 microseconds is required (together with command transfer). One byte, the second, on the third .. It turns out, to forward the entire screen is required 25 milliseconds. What should I do? Turbirovanie processor is not omnipotent. You can increase the frequency to twice a three ... four is a big question. Let we increased the frequency of four times and speed Shipping has increased in much the same. Obtain time: 1 microsecond per byte, 6.3 milliseconds to the entire screen. And this is the limit above which turbirovanie processor does not jump. But the screen RAM allows you to work with more greater speed. At a minimum frequency of 3.5 MHz maximum baud rate in half exceeds the limit of the processor. And what if the RAM runs at a higher frequency? At 7, 14, 28 ... For RAM, these frequencies are real at Installation of the chip. Here and gives the effect of accelerator on-screen operations. Accelerator layout is quite simple and the whole meaning that at the time of applying the processor to the video RAM is not one, but several sample data as fast as possible for the RAM. The processor is just waiting. Information block is rewritten into the cache of the accelerator, and then Similarly, it can be transferred to another place the video RAM. And in the same block. The rate of exchange of information on the screen rises sharply! In addition to these operations, cleaning and scrolling screen accelerator provides a few functions, but they are at other times. A pilot scheme of the accelerator has already been implemented and tested. And here it must be said that's what. To achieve maximum acceleration, corresponding limit on the frequency of video RAM impossible due to the consistent performance of the processor and the accelerator. At the time of the accelerator processor waits for its end, and vice versa. But in a similar mode of operation achieved acceleration work with the video several times. Time to full image Spectrum-ovsky screen when it has previously been loaded into the RAM accelerator is 3 milliseconds. This time is virtually independent of mode processor TURBO / no-TURBO, because that most of the time running the accelerator. For new modes this time will be longer, but it is in any case is less than the time at which the transfer was made images on the screen in the old Spectrum-e. For a graphic image to 320x256 pixels 16 colors, this time is approximately 15 milliseconds. (For a conventional ZX-Spectrum while filling the usual screen of about 25 milliseconds). Increase speed of RAM will be manifested as, when necessary transfer blocks of information and when you need a conclusion similar or common blocks. For static images accelerator required only to increase the convenience of the output for conversions, to display character information. For dynamic images accelerator will the ability to quickly change the contents of the screen when the screen contains a set of identical blocks. How else to increase the dynamics of the image, if accelerator is not enough? The simplest solution - switch to more low level of graphics. In some places the picture may not have full raznotsvetiya. In this case, you can transcode mode display for these places. For example, replace the usual high graphics Spectrum-ovsky. Output mode can be changed at runtime. For example, if you move a handsome colored sprite can be customized under his regime in the right places the screen. If this sprite is displayed by using the accelerator, the high dynamics you will be provided. From the Editor. Currently, the scheme of graphics accelerators amended and therefore this article does not given its parameters. But osnavnaya idea how seems to us, expressed clearly enough - the new Spectrum-compatible computer would have fast graphics.
Other articles:
Similar articles:
В этот день... 21 November