08-19-2023, 04:56 AM
Hi!
The Commodore Amiga has a totally different architecture compared to consoles and arcade boards, the ones that inspired Tilengine design.
The Amiga doesn't have a hardware tilemap/tileset engine (character generator), but instead a planar framebuffer assisted by a hardware blitter -a unit that copies variable size chunks of graphics from RAM to the framebuffer-. It's also assisted by the copper, an additional coprocessor that can execute very simple programs in parallel to the main CPU. These basic programs are called "copper lists" and allow to write registes of the other units -blitter, color palettes, sprites, scroll, etc- in sync with the retrace beam of the monitor. In fact the copper can only execute two types of instructions: write registers and wait until the retrace beam is at a given x,y position. So the Amiga doesn't have a per-pixel interrupt, but a dedicated coprocessor that can block execution until the beam reaches a given position, wth a granularity of 4 pixels wide.
This is in contrast with console/arcade systems -and Tilengine too- where an horizontal interrupt is generated after each scanline has been completed, and a vertical one when the whole frame has been completed. These interrupts require the main CPU to attend them whenever they trigger, pausing whatever the CPU is doing at that moment. There's no such thing as "per-pixel interrupt".
The rendering loop in tilengine composites each scanline, from top to bottom, drawing sequentially whatever happens to be at that scanline, and then calls the raster callback. Real hardware composites from left to right synchronised with the retrace beam. For each pixel the hardware must take the layers, sprites, priorities, blending, etc, combine all and ouptut the pixel. This is done in dedicated hardware. On the other hand Tilengine doesn't work per-pixel but per-item. It does multiple passes per scanline, overdrawing layers and sprites as needed. This allows a much higher performance, but the end result is the same than traditional hardware. In actual console/arcade hardware you cannot tune video register in the middle of a scanline.
Hope to have clarified a bit these architectures!
The Commodore Amiga has a totally different architecture compared to consoles and arcade boards, the ones that inspired Tilengine design.
The Amiga doesn't have a hardware tilemap/tileset engine (character generator), but instead a planar framebuffer assisted by a hardware blitter -a unit that copies variable size chunks of graphics from RAM to the framebuffer-. It's also assisted by the copper, an additional coprocessor that can execute very simple programs in parallel to the main CPU. These basic programs are called "copper lists" and allow to write registes of the other units -blitter, color palettes, sprites, scroll, etc- in sync with the retrace beam of the monitor. In fact the copper can only execute two types of instructions: write registers and wait until the retrace beam is at a given x,y position. So the Amiga doesn't have a per-pixel interrupt, but a dedicated coprocessor that can block execution until the beam reaches a given position, wth a granularity of 4 pixels wide.
This is in contrast with console/arcade systems -and Tilengine too- where an horizontal interrupt is generated after each scanline has been completed, and a vertical one when the whole frame has been completed. These interrupts require the main CPU to attend them whenever they trigger, pausing whatever the CPU is doing at that moment. There's no such thing as "per-pixel interrupt".
The rendering loop in tilengine composites each scanline, from top to bottom, drawing sequentially whatever happens to be at that scanline, and then calls the raster callback. Real hardware composites from left to right synchronised with the retrace beam. For each pixel the hardware must take the layers, sprites, priorities, blending, etc, combine all and ouptut the pixel. This is done in dedicated hardware. On the other hand Tilengine doesn't work per-pixel but per-item. It does multiple passes per scanline, overdrawing layers and sprites as needed. This allows a much higher performance, but the end result is the same than traditional hardware. In actual console/arcade hardware you cannot tune video register in the middle of a scanline.
Hope to have clarified a bit these architectures!