News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Recent posts

#1
Game Development / Re: The Spectrum
Last post by fearless - November 25, 2024, 09:40:29 PM
Seen that the other day, and for a tiny moment I thought about getting it, then I shook the nostalgia off. Considering I have a 128K +3 in the shed or attic (cant recall which) in the original box with the manual, but would need an old crt to use. Plus I downloaded some zx emulators a few years ago and played some of those old favorites: Rex, Chuckie Egg, Firelord, Uridium, Jet Set Willie, Operation Wolf, Cybernoid, Knight Lore, Dizzy games etc.
#2
Game Development / The Spectrum
Last post by stoo23 - November 25, 2024, 03:16:35 PM
I know, I know,.. this post could or perhaps should be elsewhere ... but saying that ... and considering the Gaming focus,.. I just figured Here would be more noticeable than somewhere like The Orphanage

https://retrogames.biz/products/thespectrum/


#3
The Workshop / Re: A useful tool: BMP data vi...
Last post by sinsi - November 25, 2024, 10:51:11 AM
Good ol' Windows, just crashes instead of popping up any sort of error :rolleyes:
(fd4.4230): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** WARNING: Unable to verify checksum for e:\Desktop\BMPinfo2.exe
eax=0000001c ebx=0019f960 ecx=0000001c edx=0000001c esi=0019f440 edi=00000000
eip=00401fa9 esp=0019f434 ebp=0019f878 iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00210246
BMPinfo2+0x1fa9:
00401fa9 f3a4            rep movs byte ptr es:[edi],byte ptr [esi]

Quote from: NoCforMe on November 25, 2024, 10:38:17 AMWhere the bloody hell did you get a BMP file like that?
Start Paint, change the image properties, save as BMP

Quote from: NoCforMe on November 25, 2024, 10:38:17 AMMaybe I should look at the file size, and if it's above some reasonable limit issue an error message like "What, are you nuts?".
Some images from Hubble that you can download are pretty massive. Granted they are compressed PNGs but still can be 90MB or so...
#4
The Workshop / Re: A useful tool: BMP data vi...
Last post by NoCforMe - November 25, 2024, 10:38:17 AM
Quote from: sinsi on November 25, 2024, 10:19:45 AMThe new program is certainly faster for a 2002x1505x24bpp bmp (9,042,040 bytes).
Couldn't handle a 10000x10000x24bpp (300,000,054 bytes) bmp file though  :badgrin:
So what happened, pray tell? Crash? Hang? Something else?

Where the bloody hell did you get a BMP file like that?

Maybe I should look at the file size, and if it's above some reasonable limit issue an error message like "What, are you nuts?".
#5
The Workshop / Re: A useful tool: BMP data vi...
Last post by zedd151 - November 25, 2024, 10:20:38 AM
Quote from: NoCforMe on November 25, 2024, 10:15:50 AMI'm using RichEdit20A. Am I safe in assuming that most users will have that DLL installed on their systems?
I am not jj of couse, but I can answer that...

Yes, it should be fine to use. It has been around since the Windows xp days. It has its own issues though, as do the later versions of RichEdit.


I just tested a 23.7 MB bmp file with your program. Fast enough indeed now.

    BMP width:        3840
    BMP height:        2160
    no. planes:        1
    bits/pixel:        24
    bitmap size:        24883200 bytes
    compression:        0
    horiz. res:        3780
    vert. res:        3780
    # colors used:    0
    Bitmap stride:    11520 bytes
    Bitmap padding:    0 byte(s)
    BMP header size:    40 bytes

later: this one took several seconds to load. But fast enough for the bmp's size (155MB).  :thumbsup:
BMP width: 9600
BMP height: 5400
no. planes: 1
bits/pixel: 24
bitmap size: 155520000 bytes
compression: 0
horiz. res: 3780
vert. res: 3780
# colors used: 0
Bitmap stride: 28800 bytes
Bitmap padding: 0 byte(s)
BMP header size: 40 bytes
#6
The Workshop / Re: A useful tool: BMP data vi...
Last post by sinsi - November 25, 2024, 10:19:45 AM
Just as a matter of interest I got rid of the buffer and wrote directly to the edit control and the window was responsive.

The new program is certainly faster for a 2002x1505x24bpp bmp (9,042,040 bytes).
Couldn't handle a 10000x10000x24bpp (300,000,054 bytes) bmp file though  :badgrin:
#7
The Workshop / Re: A useful tool: BMP data vi...
Last post by NoCforMe - November 25, 2024, 10:15:50 AM
Another question, @JJ, since you've spent so much time wrestling with the RichEdit version problem:

I'm using RichEdit20A. Am I safe in assuming that most users will have that DLL installed on their systems?
#8
The Workshop / Re: A useful tool: BMP data vi...
Last post by zedd151 - November 25, 2024, 10:13:17 AM
Quote from: NoCforMe on November 25, 2024, 10:07:30 AMRichEdit is waaaaaay faster!.
:azn:
We all knew that your code itself was not the issue. Glad you have it all sorted.  :thumbsup:
#9
The Workshop / Re: A useful tool: BMP data vi...
Last post by NoCforMe - November 25, 2024, 10:07:30 AM
Well, that's all moot now because guess what?
RichEdit is waaaaaay faster!
(I'm using SetWindowText(), same difference as WM_SETTEXT.)
Check out attached .exe (I'm cleaning up code and will post that later).
So much faster! So JJ, now we know. (No timings, but I could do that if anyone's interested.)

Now it's a real usable tool.
#10
The Workshop / Re: A useful tool: BMP data vi...
Last post by zedd151 - November 25, 2024, 09:57:39 AM
Quote from: NoCforMe on November 25, 2024, 09:32:19 AMQuestion: is it really faster, with a RichEdit control, to use EM_STREAMIN vs. just setting the text all at once from a buffer, using SetWindowText()? I don't see the advantage of sending the text in pieces if it's all

No, you dont use EM_STREAMIN to set the text in rich edit control (I have never seen it used that way, or know if that is even possible), WM_SETTEXT works fine. That suggestion was for if you were to write to file first.