Sprite blitting in Mode X

I'm trying to develop a Getimage, Putimage routine in

Mode X (320x240x256) but It's too complex, all those

bitplanes and port manipulations.


Does any one have a suggestion or codes regarding,

please show me. Thanks.


Comments

  • I have done complete sprite libraries in ModeX, which are available

    at my page below, under the Turbo Pascal section. However, here's the

    way I get decent (50 FPS) performance:


    You have to write an image to all four bitplanes. The OUT command

    one of the slowest commands in ASM, so you want to minimize the

    uses of it. Since we know the pixel order is:


    Plane 1:


    1st pixel, 5th pixel, 10th pixel


    Plane 2:


    2nd pixel, 6th pixel, 11th pixel


    Plane 3:


    3rd pixel, 7th pixel, 12th pixel


    Plane 4:


    4th pixel, 8th pixel, 13th pixel


    We'll just write the image in four passes, one per plane.

    First we adjust the registers to write the first bitplane,

    then we write every 4th pixel. We then change it to the

    2nd plane, move the start of the image forward a pixel, and

    write every 4th pixel again.


    If you plan to do a C lib, contart me, as I'm looking for

    someone to port it to C.


    Matthew Gross

    ACheron@Hotmail.com


    URL:http://acheronx.resnet.tamu.edu

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories