(español abajo)
You probably have noticed that on Popeye when two sprites get close to each other, there are black boxes hiding the second sprite. This looks like a glitch, but it is a design limitation of the original hardware. Check out this video recorded directly from a real Popeye cabinet (located at Museo del arcade, Ibi).
But why? Well, rendering the video background or the foreground text layer is a linear task. You start from one corner and move from left to right up to the other edge of the screen. Then move on to the next row and start over. Sprites are not like that. Sprites can be any where on the screen. How to draw them, then?
This is how Popeye does it: first you need to know if there are sprites on the next horizontal (raster) line to draw. For each sprite to be drawn, a number identifying it is stored in a small RAM, at the horizontal position where it will show on screen. When the next line comes onto stage that RAM is scanned drawing the saved sprites. So far, so good. Right?
But that RAM can store only one sprite every 8 pixels. If two sprites are within 8 pixels of each other, only one will be drawn. And the one drawn is contained into a rectangle, whose limits in black will become visible if another sprite is nearby.
This is how Popeye works. It is a fundamental design limitation and comes out naturally when the circuits are reimplemented on an FPGA. However, look at how little this limitation affects gameplay and visual quality! Popeye really shows how much you can do with so little and it has triggered my interest in early arcades.
Español
Ya habrás visto que en el Popeye cuando hay dos objetos cerca uno solapa al otro con un efecto de caja negra. Esto puede parecer un fallo del core, pero no lo es. Mira el video. Está tomado de una máquina de Popeye real (en el Museo del arcade de Ibi).
¿Por qué? Pintar la imagen de fondo o los marcadores es una tarea lineal. Empiezas en una esquina y recorres la pantalla. De izquierda a derecha y luego la siguiente línea. Pero los objetos no son así, pueden aparecer en cualquier lugar. ¿Cómo dibujarlos entonces?
Así es como Popeye lo hace: miras qué objetos hay que pintar en la siguiente línea. Para cada uno de ellos, almacenas un número que lo identifica en una RAM pequeñita, en la posición horizontal donde aparecerá. Cuando la siguiente línea llega, recorres la RAM y pintas los objetos en orden. ¿Todo bien?
Bueno, resulta que la RAM sólo puede almacenar un objeto cada 8 píxeles. Si dos objetos están a menos de 8 píxeles uno del otro, sólo uno de ellos será visible. Y éste se pinta con su rectángulo contenedor, cuyos límites en negro se vuelve visibles si hay otro objeto cercano.
Así funciona Popeye. Esta es una limitación fundamental en el diseño y aparece de forma natural al pasar los circuitos a FPGA también. ¡Pero fíjate qué poco afecta esta limitación al juego y a la calidad gráfica! Popeye es una buena muestra de cuánto se puede hacer con tan poco y me ha despertado un interés por estos arcades primigenios.