diff --git a/src/add-ons/accelerants/neomagic/engine/nm_acc.c b/src/add-ons/accelerants/neomagic/engine/nm_acc.c index ea7b934d39..daf62656fb 100644 --- a/src/add-ons/accelerants/neomagic/engine/nm_acc.c +++ b/src/add-ons/accelerants/neomagic/engine/nm_acc.c @@ -105,9 +105,19 @@ status_t nm_acc_init() * workaround: place cursor bitmap at _end_ of cardRAM instead of in _beginning_. */ /* setup clipping */ - si->engine.control |= (1 << 26); - ACCW(CLIPLT, 0); - ACCW(CLIPRB, ((si->dm.virtual_height << 16) | (si->dm.virtual_width & 0x0000ffff))); + /* note: + * on NM2160 the max acc engine width of 1600 pixels can be programmed, but + * the max. height is only 1023 pixels (height register holds just 10 bits)! + * note also: + * while the vertical clipping feature can do upto and including 1023 pixels, + * the engine itself can do upto and including 1024 pixels vertically. + * So: + * Don't use the engine's clipping feature as we want to get the max out of the + * engine. We won't export the acc hooks for modes beyond the acc engine's + * capabilities. */ +// si->engine.control |= (1 << 26); +// ACCW(CLIPLT, 0); +// ACCW(CLIPRB, ((si->dm.virtual_height << 16) | (si->dm.virtual_width & 0x0000ffff))); return B_OK; } diff --git a/src/add-ons/accelerants/neomagic/engine/nm_general.c b/src/add-ons/accelerants/neomagic/engine/nm_general.c index c85dfcc0d2..f751d6ce6b 100644 --- a/src/add-ons/accelerants/neomagic/engine/nm_general.c +++ b/src/add-ons/accelerants/neomagic/engine/nm_general.c @@ -47,7 +47,7 @@ status_t nm_general_powerup() { status_t status; - LOG(1,("POWERUP: Neomagic (open)BeOS Accelerant 0.06-5 running.\n")); + LOG(1,("POWERUP: Neomagic (open)BeOS Accelerant 0.06-6 running.\n")); /* detect card type and power it up */ switch(CFGR(DEVID)) @@ -415,7 +415,16 @@ status_t nm_general_validate_pic_size (display_mode *target, uint32 *bytes_per_r if (target->virtual_width > 1600) *acc_mode = false; /* virtual_height */ - if (target->virtual_height > 2048) *acc_mode = false; + if (si->ps.card_type < NM2200) + { + /* confirmed NM2097 and NM2160 */ + if (target->virtual_height > 1024) *acc_mode = false; + } + else + { + /* fixme: needs confirmation, assuming this height will still work.. */ + if (target->virtual_height > 2048) *acc_mode = false; + } /* now check virtual_size based on CRTC constraints and modify if needed */ //fixme: checkout cardspecs here!! (NM2160 can do 8192 _bytes_ at least (in theory))