Results 1 to 5 of 5

Thread: moving blocks of memory

  1. #1

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963

    moving blocks of memory

    Advance programmers! Help me!
    Now I coded an SVGA graphics stuff, and I found out that byte by byte storing is too slow. Hope you guyz can tell me how to move a block of bits and bytes to another location of memory
    (No Interrupt calls, please!)
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  2. #2
    ChimpFace9000
    Guest
    If your using lodsb or movsb, use lodsd or movsd. Then you can do less loops.

  3. #3
    Junior Member
    Join Date
    Jun 2000
    Posts
    28
    Even using dwords seems to be too slow. On the equivalent of a 800*600*16 screen you would get a little under 60fps and that's just drawing the screen. This also raises a problem: since it takes a little over 1/60 sec to draw a frame, you can get tearing down the bottom of the picture.

    loop i used to see how many 64k pages could be filled per second:
    Code:
      ;mode=13h,es=0a000h
      mov ax,0ffffh  ;#iterations
    L1:
      mov cx,04000h  ;10000h/4
      xor di,di
      rep stosd
      dec ax
      jnz L1
    This takes 92 seconds = 712 pages/sec = 11.8 pages/refresh on both a 133w/1meg card and 400w/nividia 32meg card. 800*600*16 mode has 14.6 pages. Maybe it could be unrolled, but I think that the bottleneck is the bus speed.

  4. #4

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    Well, besides putting the bytes, since 800x600x16bit needs more than 64k, you need to change the bank after this 64k.***Please refer to my previous post***.I've wrote a complete program including 8,16,24,32 bit with any screen resolution and you just pass the x,y,r,g,b to it and it will do it for you. But it seems to be very slow. So I code another routine which uses 32 bit memory access and it's fast, but will plot two pixels at a time. Please tell me how can I do as perfect as Windows?
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  5. #5

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    Well, besides putting the bytes, since 800x600x16bit needs more than 64k, you need to change the bank after this 64k.***Please refer to my previous post***.I've wrote a complete program including 8,16,24,32 bit with any screen resolution and you just pass the x,y,r,g,b to it and it will do it for you. But it seems to be very slow. So I code another routine which uses 32 bit memory access and it's fast, but will plot two pixels at a time. Please tell me how can I do as fast as Windows' DVA?
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width