[ 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


VIP:

do not edit these