News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Recent posts

#61
The Campus / Re: High Resolution DC?
Last post by NoCforMe - May 20, 2024, 04:38:56 AM
Quote from: sudoku on May 20, 2024, 04:32:00 AMAs I was not yet implementing this, it was just a simple question. The Campus seemed appropriate.
It's not a question of implementation, it's a question of subject matter.
#62
The Campus / Re: High Resolution DC?
Last post by sudoku - May 20, 2024, 04:35:38 AM
Quote from: jj2007 on May 20, 2024, 04:11:33 AM
Quote from: daydreamer on May 20, 2024, 03:39:54 AM... stretch BLT ?
No, that won't work. StretchBlt just blows up the low resolution to a pixelated "high" resolution.
Yes, exactly. Hence my search for other methods than stretching or scaling a lower resolution.  :azn:
#63
The Campus / Re: High Resolution DC?
Last post by sudoku - May 20, 2024, 04:32:00 AM
Quote from: NoCforMe on May 20, 2024, 04:20:18 AMrather than using a printer DC, which might work but would be fairly clunky to implement, how 'bout
1. Creating a window of the desired size (doesn't have to be visible)
2. Getting a DC to that window, which should also be that same size
Thats another option that seems viable.
QuoteBTW, shouldn't this really be in the Windows API forum since it deals with device contexts, which after all are a Windows GUI thing?
As I was not yet implementing this, it was just a simple question. The Campus is appropriate.  :smiley:

Quote from: Campus DescriptionA protected forum where programmers learning assembler can ask questions in a sensible and safe atmosphere without being harassed or insulted.
We are all still learning, since no one knows everything. :tongue:
#64
The Campus / Re: High Resolution DC?
Last post by NoCforMe - May 20, 2024, 04:20:18 AM
Interesting question.
So how does one go about creating such a "high-resolution" (i.e., large memory buffer) DC?

One guess: rather than using a printer DC, which might work but would be fairly clunky to implement, how 'bout
1. Creating a window of the desired size (doesn't have to be visible)
2. Getting a DC to that window, which should also be that same size

Would that work? You could paint into that window's DC to your heart's content, then either save it to a file or transfer it (or parts of it) to a display window.

BTW, shouldn't this really be in the Windows API forum since it deals with device contexts, which after all are a Windows GUI thing?
#65
The Campus / Re: High Resolution DC?
Last post by jj2007 - May 20, 2024, 04:11:33 AM
Quote from: daydreamer on May 20, 2024, 03:39:54 AMuse really big backbuffer and stretch BLT ?

No, that won't work. StretchBlt just blows up the low resolution to a pixelated "high" resolution.
#66
The Campus / Re: High Resolution DC?
Last post by daydreamer - May 20, 2024, 03:39:54 AM
Literary thinking outside the box?
Code backbuffer
,but use really big backbuffer and stretch BLT ?
I only done bigger backbuffer than screen size in dos to "scroll" thru earlier
#67
16 bit DOS Programming / Re: Line Drawing
Last post by NoCforMe - May 20, 2024, 03:36:27 AM
BTW, I'm sure you've realized that you need to deal with the problem of coordinate systems here. If you ask your user for line coordinates they're going to expect them to be in Cartesian space, where y-values increase going up, whereas your actual coordinates in memory increase going down. (Fortunately x-values are the same in both cases.)
#68
16 bit DOS Programming / Re: Line Drawing
Last post by NoCforMe - May 20, 2024, 03:31:06 AM
Quote from: tda0626 on May 20, 2024, 12:56:11 AMAfter some studying up on the subject, I came across Bresenham's line drawing algorithm so my program uses that to draw the line.
Congrats; that's some pretty fancy stuff.

One tiny improvement: you might want to get into the habit of minimizing instructions when doing things like multiplication and division. Instead of your
        mov ax, y        ; Calculate offset in video memory
        mov bx, 320        ; Y * 320 + X
        mul bx
you can get rid of an instruction:
        mov ax, 320
        mul y
since mul multiplies whatever is in AX by the multiplier (y in this case).
#69
The Campus / Re: High Resolution DC?
Last post by jj2007 - May 20, 2024, 03:17:24 AM
Quote from: sudoku on May 20, 2024, 03:16:19 AMwrong thread for your attachment?

It seems I unvoluntarily added this attachment, which belongs to this post. Perhaps I was distracted for a moment. Weird.
#70
The Campus / Re: High Resolution DC?
Last post by sudoku - May 20, 2024, 03:16:19 AM
Quote from: jj2007 on May 20, 2024, 03:13:35 AM
Quote from: sudoku on May 20, 2024, 03:02:22 AMDoes that even sound plausible?

Yes. Just study anything printer DCs - same problem, as printers have a much higher resolution than a monitor.

Ah okay. I hadnt thought about printer DC's.  I had never done any printer related coding. Some more research needed before trying to code it up.  :biggrin:
btw wrong thread for your attachment? :tongue: