[ATARI] STE 16 Pixel Trick - Atari-Forum

Jesus Cea jcea at jcea.es
Thu Aug 2 10:45:26 UTC 2018


Pero el STe tiene modos de 304 y de 336 pixels horizontales muy facilitos :)


http://www.atari-forum.com/viewtopic.php?f=1&t=23461

STE 16 Pixel Trick
/*-----------------------------------------------------------------------*/
/**
* Handle horizontal scrolling to the left.
* On STE, there're 2 registers that can scroll the line :
* - $ff8264 : scroll without prefetch
* - $ff8265 : scroll with prefetch
* Both registers will scroll the line to the left by skipping the amount
* of pixels in $ff8264 or $ff8265 (from 0 to 15).
* As some pixels will be skipped, this means the shifter needs to read
* 16 other pixels in advance in some internal registers to have an uninterrupted flow of pixels.
*
* These 16 pixels can be prefetched before the display starts (on cycle 56 for example) when using
* $ff8265 to scroll the line. In that case 8 more bytes per line (low res) will be read. Most programs
* are using $ff8265 to scroll the line.
*
* When using $ff8264, the next 16 pixels will not be prefetched before the display
* starts, they will be read when the display normally starts (cycle 56). While
* reading these 16 pixels, the shifter won't be able to display anything, which will
* result in 16 pixels having the color 0. So, reading the 16 pixels will in fact delay
* the real start of the line, which will look as if it started 16 pixels later. As the
* shifter will stop the display at cycle 56+320 anyway, this means the last 16 pixels
* of each line won't be displayed and you get the equivalent of a shorter 304 pixels line.
* As a consequence, this register is rarely used to scroll the line.
*
* By writing a value > 0 in $ff8265 (to start prefetching) and immediatly after a value of 0
* in $ff8264 (no scroll and no prefetch), it's possible to fill the internal registers used
* for the scrolling even if scrolling is set to 0. In that case, the shifter will start displaying
* each line 16 pixels earlier (as the data are already available in the internal registers).
* This allows to have 336 pixels per line (instead of 320) for all the remaining lines on the screen.
*
* Although some programs are using this sequence :
*	move.w #1,$ffff8264	; Word access!
*	clr.b $ffff8264	; Byte access!
* It is also possible to add 16 pixels by doing :
*	move.b #X,$ff8265	; with X > 0
*	move.b	#0,$ff8264
* Some games (Obsession, Skulls) and demos (Pacemaker by Paradox) use this
* feature to increase the resolution, so we have to emulate this bug, too!
*
* So considering a low res line of 320 pixels (160 bytes) :
* - if both $ff8264/65 are 0, no scrolling happens, the shifter reads 160 bytes and displays 320 pixels (same as STF)
*	- if $ff8265 > 0, line is scrolled, the shifter reads 168 bytes and displays 320 pixels.
*	- if $ff8264 > 0, line is scrolled, the shifter reads 160 bytes and displays 304 pixels,
*	the display starts 16 pixels later.
*	- if $ff8265 > 0 and then $ff8264 = 0, there's no scrolling, the shifter reads 168 bytes and displays 336 pixels,
*	the display starts 16 pixels earlier.
*/


Enviado desde mi iPhone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/atari/attachments/20180802/b55f2296/attachment.html>


More information about the Atari mailing list