nueva tabla high nibble 2bpp

This commit is contained in:
sejo 2022-02-09 17:08:49 -06:00
parent 05e302a7d5
commit 5fb42f51de
2 changed files with 44 additions and 38 deletions

View File

@ -859,31 +859,34 @@ el dispositivo de pantalla tratará esta dirección como un sprite 2bpp cuando u
¡veamos cómo utilizar el sprite byte para dibujar tiles de 2bpp! ¡veamos cómo utilizar el sprite byte para dibujar tiles de 2bpp!
### sprite de nibble alto para 2bpp ### nibble alto de sprite para 2bpp
el nibble alto para los sprites de 2bpp nos permitirá elegir la capa que queremos que se dibuje y la dirección de rotación. el nibble alto para los sprites de 2bpp nos permitirá elegir la capa que queremos que se dibuje y la dirección de rotación.
los ocho valores posibles para este nibble son: los ocho valores posibles para este nibble son:
+ <table> + <table>
+ <tr><th>nibble alto</th><th>capa</th><th>inv-y</th><th>inv-x</th></tr> + <tr><th>sprite alto</th><th>capa</th><th>inv-y</th><th>inv-x</th></tr>
+ <tr><td>8</td><td>plano de fondo</td><td>no</td><td>no</td></tr> + <tr><td class="num">8</td><td>fn</td><td>no</td><td>no</td></tr>
+ <tr><td>9</td><td>plano de fondo</td><td>no</td><td>sí</td></tr> + <tr><td class="num">9</td><td></td><td></td><td>sí</td></tr>
+ <tr><td>a</td><td>plano de fondo</td><td>sí</td><td>no</td></tr> + <tr><td class="num">a</td><td></td><td>sí</td><td>no</td></tr>
+ <tr><td>b</td><td>plano de fondo</td><td></td><td>sí</td></tr> + <tr><td class="num">b</td><td></td><td></td><td>sí</td></tr>
+ <tr><td>c</td><td>primer plano</td><td>no</td><td>no</td></tr> + <tr><td class="num">c</td><td>pp</td><td>no</td><td>no</td></tr>
+ <tr><td>d</td><td>primer plano</td><td>no</td><td>sí</td></tr> + <tr><td class="num">d</td><td></td><td></td><td>sí</td></tr>
+ <tr><td>e</td><td>primer plano</td><td>sí</td><td>no</td></tr> + <tr><td class="num">e</td><td></td><td>sí</td><td>no</td></tr>
+ <tr><td>f</td><td>primer plano</td><td></td><td>sí</td></tr> + <tr><td class="num">f</td><td></td><td></td><td>sí</td></tr>
+ </table> + </table>
& * 8: dibujar un sprite de 2bpp en el fondo, con la orientación original & fondo:
& * 9: dibujar un sprite de 2bpp en el fondo, invertido horizontalmente & * 8: dibujar un sprite de 2bpp, con la orientación original
& * a: dibujar un sprite 2bpp en el fondo, invertido verticalmente & * 9: dibujar un sprite de 2bpp, invertido horizontalmente
& * b: dibujar un sprite de 2bpp en el fondo, invertido horizontal y verticalmente & * a: dibujar un sprite 2bpp, invertido verticalmente
& * c: dibujar un sprite de 2bpp en primer plano, con la orientación original & * b: dibujar un sprite de 2bpp, invertido horizontal y verticalmente
& * d: dibujar un sprite de 2bpp en primer plano, invertido horizontalmente &
& * e: dibujar un sprite de 2bpp en primer plano, invertido verticalmente & primer plano:
& * f: dibujar un sprite de 2bpp en primer plano, invertido horizontal y verticalmente & * c: dibujar un sprite de 2bpp, con la orientación original
& * d: dibujar un sprite de 2bpp, invertido horizontalmente
& * e: dibujar un sprite de 2bpp, invertido verticalmente
& * f: dibujar un sprite de 2bpp, invertido horizontal y verticalmente
notemos que estos ocho valores tienen todos un bit más a la izquierda en 1: este bit señala que vamos a dibujar un sprite de 2bpp. los otros tres bits del nibble se comportan como se ha descrito anteriormente en el caso de 1bpp. notemos que estos ocho valores tienen todos un bit más a la izquierda en 1: este bit señala que vamos a dibujar un sprite de 2bpp. los otros tres bits del nibble se comportan como se ha descrito anteriormente en el caso de 1bpp.

View File

@ -573,11 +573,11 @@ the eight possible values of the sprite high nibble, used for drawing a 1bpp spr
+ <table> + <table>
+ <tr><th>sprite high</th><th>layer</th><th>flip-y</th><th>flip-x</th></tr> + <tr><th>sprite high</th><th>layer</th><th>flip-y</th><th>flip-x</th></tr>
+ <tr><td class="num">0</td><td>bg</td><td>no</td><td>no</td></tr> + <tr><td class="num">0</td><td>background</td><td>no</td><td>no</td></tr>
+ <tr><td class="num">1</td><td></td><td></td><td>yes</td></tr> + <tr><td class="num">1</td><td></td><td></td><td>yes</td></tr>
+ <tr><td class="num">2</td><td></td><td>yes</td><td>no</td></tr> + <tr><td class="num">2</td><td></td><td>yes</td><td>no</td></tr>
+ <tr><td class="num">3</td><td></td><td></td><td>yes</td></tr> + <tr><td class="num">3</td><td></td><td></td><td>yes</td></tr>
+ <tr><td class="num">4</td><td>fg</td><td>no</td><td>no</td></tr> + <tr><td class="num">4</td><td>foreground</td><td>no</td><td>no</td></tr>
+ <tr><td class="num">5</td><td></td><td></td><td>yes</td></tr> + <tr><td class="num">5</td><td></td><td></td><td>yes</td></tr>
+ <tr><td class="num">6</td><td></td><td>yes</td><td>no</td></tr> + <tr><td class="num">6</td><td></td><td>yes</td><td>no</td></tr>
+ <tr><td class="num">7</td><td></td><td></td><td>yes</td></tr> + <tr><td class="num">7</td><td></td><td></td><td>yes</td></tr>
@ -866,24 +866,27 @@ the high nibble for 2bpp sprites will allow us to choose the layer we want it to
the eight possible values for this nibble are: the eight possible values for this nibble are:
+ <table> + <table>
+ <tr><th>high nibble</th><th>layer</th><th>flip-y</th><th>flip-x</th></tr> + <tr><th>sprite high</th><th>layer</th><th>flip-y</th><th>flip-x</th></tr>
+ <tr><td>8</td><td>background</td><td>no</td><td>no</td></tr> + <tr><td class="num">8</td><td>background</td><td>no</td><td>no</td></tr>
+ <tr><td>9</td><td>background</td><td>no</td><td>yes</td></tr> + <tr><td class="num">9</td><td></td><td></td><td>yes</td></tr>
+ <tr><td>a</td><td>background</td><td>yes</td><td>no</td></tr> + <tr><td class="num">a</td><td></td><td>yes</td><td>no</td></tr>
+ <tr><td>b</td><td>background</td><td>yes</td><td>yes</td></tr> + <tr><td class="num">b</td><td></td><td></td><td>yes</td></tr>
+ <tr><td>c</td><td>foreground</td><td>no</td><td>no</td></tr> + <tr><td class="num">c</td><td>foreground</td><td>no</td><td>no</td></tr>
+ <tr><td>d</td><td>foreground</td><td>no</td><td>yes</td></tr> + <tr><td class="num">d</td><td></td><td></td><td>yes</td></tr>
+ <tr><td>e</td><td>foreground</td><td>yes</td><td>no</td></tr> + <tr><td class="num">e</td><td></td><td>yes</td><td>no</td></tr>
+ <tr><td>f</td><td>foreground</td><td>yes</td><td>yes</td></tr> + <tr><td class="num">f</td><td></td><td></td><td>yes</td></tr>
+ </table> + </table>
& * 8: draw a 2bpp sprite in the background, original orientation & background:
& * 9: draw a 2bpp sprite in the background, flipped horizontally & * 8: draw a 2bpp sprite, original orientation
& * a: draw a 2bpp sprite in the background, flipped vertically & * 9: draw a 2bpp sprite, flipped horizontally
& * b: draw a 2bpp sprite in the background, flipped horizontally and vertically & * a: draw a 2bpp sprite, flipped vertically
& * c: draw a 2bpp sprite in the foreground, original orientation & * b: draw a 2bpp sprite, flipped horizontally and vertically
& * d: draw a 2bpp sprite in the foreground, flipped horizontally &
& * e: draw a 2bpp sprite in the foreground, flipped vertically & foreground:
& * f: draw a 2bpp sprite in the foreground, flipped horizontally and vertically & * c: draw a 2bpp sprite, original orientation
& * d: draw a 2bpp sprite, flipped horizontally
& * e: draw a 2bpp sprite, flipped vertically
& * f: draw a 2bpp sprite, flipped horizontally and vertically
note that these eight values all have a leftmost bit in 1: this bit signals that we will be drawing a 2bpp sprite. the other three bits of the nibble behave as described above in the 1bpp case. note that these eight values all have a leftmost bit in 1: this bit signals that we will be drawing a 2bpp sprite. the other three bits of the nibble behave as described above in the 1bpp case.