[ prog / sol / mona ]

prog


how to write direct to memory under protected mode?

1 2024-06-05 13:21

hello I am trying to do graphics on windows and I would very much like to do it by writing to the video buffer directly rather than with the gdi or by learning how to use openGL or what have you, ken silverman's build 2 engine is a win32 application and he says it uses self-modifying code so surely it must be accessing memory directly right?? he also says it triggers antiviruses a lot so maybe it does it with crazy hacks I wouldn't want to deal with but if there's a relatively simple way of doing it please tell me! taskete onegaishimasu!

2 2024-06-06 02:36

INSTALL DOS
LIVE FREE

3 2024-06-06 04:58

>>2
but I want to sell my graphics program for money so people need to be able to use it

4 2024-06-06 08:06

It sounds like the safest way to draw to the screen is through the GDI, OpenGL, and DirectX. You will be fighting the anti-virus and malware protection systems when trying to do it your way.

5 2024-06-07 03:45

>>4
but I already have to deal with win32 I don't wanna have to learn another shitty pseudo-language like GLSL, and the GDI is so sloooooooowww

6 2024-06-07 08:09

windows

sell my graphics program for money

That smells like Microshit.
Embrace free and open source software!

7 2024-06-07 08:24

>>6
Money.

8 2024-06-07 09:31

>>5
Enjoy your anti-virus shutdown

9 2024-06-08 16:30

>>1,5

Device Manager lists the physical address of the framebuffer under
Display Adapters > Resources, which you can pass to MmMapIoSpace to get
the nonpaged virtual address. You can draw directly on the framebuffer
using that address like /dev/fb0

If you want to create a window-relative framebuffer then you necessarily
have to go through the Window's API to request it before drawing, the
simplest way seems to be using BitBlt to draw a bitmap after requesting
a device context handle: https://solhsa.com/wintut/ch3.html

10 2024-06-09 10:35

>>1

For self modifying code you need mmap or its windows analog.
Both support remapping memory as executable.
Only iOS doesn't allow self modifying code.
Because Apple wants to completely control what is allowed to execute.
They even ban virtual machines, including Lisp systems.

11 2024-06-17 21:58

>>10

They even ban virtual machines, including Lisp systems.

I hate crapple now

12 2024-06-18 20:41

>>11
They're the gayest OS vendor out there.

13 2024-06-20 16:34

>>9
pls gib more info about this method

14 2024-06-23 17:41

>>9
pls

15 2024-06-24 01:38 *

OP wants highly technical information that needs a high level of precision. Yet, he can't even use proper English grammar. How ironic.

16 2024-06-25 09:45

>>9
pls
>>15
pls

17 2024-06-27 08:43

>>9
pls

18 2024-06-30 10:37

>>9
pls

19 2024-07-01 17:28

memory leprechauns

20 2024-07-02 18:32

INSTALL FREEDOS
LIVE FREE 2 TIMES

21 2024-07-04 12:58

>>20
NO! Money!

22 2024-07-08 11:46

>>9
pls

23 2024-07-09 08:21

Install TempleOS. It let's you do that and more.

24 2024-07-10 11:05

Stop telling me to install other operating systems!

25 2024-07-10 18:19

>>24 Install other operating systems!

26 2024-07-11 10:38

Install Gentoo

27 2024-07-15 17:47

>>9
pls

28 2024-07-17 07:50

>>9
please sir there is famine in my village sir if I do not write the fast enough graphics program my family will starve sir please to tell me more of the information sir

29 2024-07-17 12:48

If you're going to write to the video buffer directly, you're going to be fighting with whatever else writes to the video buffer. This is why you're supposed to use something like openGL, which integrates itself into existing video buffer writes.

30 2024-07-17 20:35

>>29
then I will write to the video buffer faster than it can

31 2024-07-18 00:18 *

>>30
Totally doable, you just need the willpower to make your code run faster than all the other code on the same machine

32 2024-07-18 10:44

>>31
which I can do easily, since I write in assembler

33 2024-07-19 21:32 *

What is it with retards that refuse to take advice but also insist that they can also contradict the advice given.

34 2024-07-20 00:53

what is it with retards that refuse to give information they've been politely asked for eight times in a row

35 2024-07-20 04:43 *

>>34
There it is. Bravo work.

36 2024-07-20 06:41

>>35
tell me what I want to know or I'll find you and beat it out of you!

37 2024-07-23 09:00

>>35
tell me!

38 2024-07-23 23:46 *

This thread is beautiful & exemplary.
Now to study swordsmanship with a hammer.

39 2024-07-24 09:37

YOU'RE ALL JUST JEALOUS OF HOW AWESOME MY GRAPHICS PRORAM IS GOING TO BE WHICH YOU COULD NEVER MATCH BECAUSE YOU'RE ALL TOO SCARED OF DADDY BILL GATES TO CODE ANY OTHER WAY THAN THE WAY HE WANTS YOU TO I HATE YOU I HATE YOU I HATE YOU I HATE YOU

40 2024-07-26 13:26 *

Is this thread just an elaborate troll? I must admit, I have been trolled by this thread.

41 2024-07-28 10:05

oh my god why do they ALWAYS say that

hello could you help me with this problem I'm having?
fuck you
I feel that I'm being mistreated here
aha see he was just trying to troll us!

42 2024-07-28 23:03 *

The opposite would be

Did stackoverflow ban me?
Why can't I read answer 272949?
Let me go to liberal textboard.org and ask
Wait, why I am being to to go to step one?

43


VIP:

do not edit these