|
-
Jun 20th, 2001, 08:52 PM
#1
Thread Starter
Fanatic Member
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
-
Jun 21st, 2001, 01:12 AM
#2
If your using lodsb or movsb, use lodsd or movsd. Then you can do less loops.
-
Jun 21st, 2001, 11:53 PM
#3
Junior Member
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.
-
Jun 25th, 2001, 06:48 PM
#4
Thread Starter
Fanatic Member
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
-
Jun 25th, 2001, 06:48 PM
#5
Thread Starter
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|