On Mon, 29 Aug 2011, Chris Young wrote: > On Mon, 29 Aug 2011 00:45:59 +0100 (GMT Daylight Time), Jeffrey Lee wrote: > >> * Amiga video code is half-updated, with the aim to use 16bpp output. >> However I'm having trouble finding any decent documentation, so I might >> leave the rest to you Chris, if that's OK? There's plenty of todo notes >> in there for the bits that need filling in. > > The old code uses a palette-mapped mode for simplicity, as ArcEm's > emulated screen was only ever 8-bit maximum (is this still the case?). > It then can just change the palette and plot the pens exactly as the > emulated screen would be - which is quicker than converting the screen > to 16bpp. Is this still possible?
The Arc hardware is only capable of using palettised modes, but since some games use mid-frame palette swaps you can end up with over 256 colours on screen at once (the video hardware outputs 12 bit RGB). Since you can't guarantee that the host will support mid-frame palette swaps (and getting the timing right would be nigh-impossible), this is why the new code is designed to work with true colour displays. The current display code (the "standard display device" in arch/stddisplaydev.c) can be used on a palette-mapped display, but the only sensible way of using it would be to use a fixed palette. Partly because it doesn't notify the host-specific code when the palette changes (all it has is the one call it makes to map a 12 bit RGB colour to a host colour), and partly because of the mid-frame palette swap timing issue mentioned above. Using a fixed palette is the technique the X11 pseudocolour code now uses; it uses a palette containing the same colours as the standard RISC OS 256 colour one, so there shouldn't be much software that will look wrong when using it, and even software that uses unusual colours or mid-frame palette swaps should look approximately correct. If you're worried about performance (even with palette-mapped output the code would still be doing a per-pixel lookup to map from the current Arc palette to the host palette) then I can easily produce a version of the code that's designed to work with palettised host displays. I haven't profiled the new display code yet, but I'm sure that such a mode would give an appreciable performance boost on ARM hosts as well. Cheers, - Jeffrey ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev -- arcem-devel mailing list arcem-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/arcem-devel