<p>In your 31 bit solution, the thing most likely to happen there is that you'd give an extra bit to green and make a 32 bit solution.  In 16 bit color for instance, r and b get 5 bits while g gets 6 bits, because your eye can distinguish more greens.</p>

<p>Or maybe you'd use that extra bit to have 1 bit alpha? Not sure if that'd be very useful though...</p>

<p>As far as the rest, whether you have a gpu or not, writing to single pixels at a time is bad form.</p>

<p>Instead, you ideally want to do block operations that either fill or copy large strips of memory.</p>

<p>For some things, like alpha blending, that isn't able to be done as a block operation very easily so is a more expensive operation in general.</p>

<p>As a solution to this, modern computers have a processor that is closer to the video memory, so there isn't too much latency when pushing pixels back and forth across the main bus to do things like calculate alpha blended values involving the source and destination pixel.</p>

<p>Also, instead of fewer more powerful cores, there are many less powerful cores, which helps address the situation of needing "one off" pixel operations.</p>

<p>That processor I'm referring to is the gpu and the programs you write for it are called shaders (;</p>

<p>What you are asking about doesn't exist to my knowledge and seems like a bad usage pattern, so seems unlikely to exist IMO.</p>

CC BY-SA 3.0
2015-10-23T17:26:14.500Z
2015-10-23T17:33:02.260Z
2015-10-23T17:33:02.260Z
Alan Wolfe
<p>Most information about memory mapped displays on the net are about those in which there is essentially a location in main memory for each pixel on the display. A hypothetical 1024 x 512 display would therefore have 524,288 locations each mapped to a unique pixel. To set a pixel to a particular color, all you basically need to do is write an RGB value into the corresponding memory location for that pixel, eg: MOV 0xFF3C0A, 0x00BB75. The first argument in that instruction is the address holding the RGB value and the second is the address of the pixel you are copying it to.</p>

<p>However, this can use up a quite a lot of main memory, which might not be ideal for certain systems. In a machine with a 32 bit or higher word size, it could instead be possible to have a single "display output register" into which you would write a single word of data containing the X and Y coordinates as well as the RGB value for the pixel you want to set. For a 1024 x 512 display with a 12-bit color depth, 31 bits would suffice to specify all this. The data 'written' into that register would either be sent to a display adapter or sent directly to the display and decoded there. This would save over half a megabyte of memory while still retaining the memory-mapped model.</p>

<p>So is this actually a thing or not?</p>

CC BY-SA 3.0
2015-10-21T16:03:15.850Z
and what's wrong with a 1024x512 texture that gets blitted to the display buffer by the hardware?
ratchet freak
CC BY-SA 3.0
2015-10-21T16:16:38.943Z
Nothing is inherently wrong with that, but what about smaller operations like outputting a single character? Also some smaller systems might not have a GPU, etc.
Cyber99
CC BY-SA 3.0
2015-10-21T16:59:42.720Z
This used to be a thing in VGA days. 0xA0000 anyone?
Nathan Reed
<pixels><memory>
Does this type of memory-mapping for a display exist?
Cyber99
# Does this type of memory-mapping for a display exist?

(Asked by: username_0 on 2015-10-21)

Most information about memory mapped displays on the net are about those in which there is essentially a location in main memory for each pixel on the display. A hypothetical 1024 x 512 display would therefore have 524,288 locations each mapped to a unique pixel. To set a pixel to a particular color, all you basically need to do is write an RGB value into the corresponding memory location for that pixel, eg: MOV 0xFF3C0A, 0x00BB75. The first argument in that instruction is the address holding the RGB value and the second is the address of the pixel you are copying it to.

However, this can use up a quite a lot of main memory, which might not be ideal for certain systems. In a machine with a 32 bit or higher word size, it could instead be possible to have a single "display output register" into which you would write a single word of data containing the X and Y coordinates as well as the RGB value for the pixel you want to set. For a 1024 x 512 display with a 12-bit color depth, 31 bits would suffice to specify all this. The data 'written' into that register would either be sent to a display adapter or sent directly to the display and decoded there. This would save over half a megabyte of memory while still retaining the memory-mapped model.

So is this actually a thing or not?

**Tags:** pixels, memory

> **Comments:**
> **username_1**: and what's wrong with a 1024x512 texture that gets blitted to the display buffer by the hardware?  
> **username_0**: Nothing is inherently wrong with that, but what about smaller operations like outputting a single character? Also some smaller systems might not have a GPU, etc.  
> **username_2**: This used to be a thing in VGA days. 0xA0000 anyone?  

---

## 1 answers

### Answer by username_3 on 2015-10-23. Score: 2

In your 31 bit solution, the thing most likely to happen there is that you'd give an extra bit to green and make a 32 bit solution. In 16 bit color for instance, r and b get 5 bits while g gets 6 bits, because your eye can distinguish more greens.

Or maybe you'd use that extra bit to have 1 bit alpha? Not sure if that'd be very useful though...

As far as the rest, whether you have a gpu or not, writing to single pixels at a time is bad form.

Instead, you ideally want to do block operations that either fill or copy large strips of memory.

For some things, like alpha blending, that isn't able to be done as a block operation very easily so is a more expensive operation in general.

As a solution to this, modern computers have a processor that is closer to the video memory, so there isn't too much latency when pushing pixels back and forth across the main bus to do things like calculate alpha blended values involving the source and destination pixel.

Also, instead of fewer more powerful cores, there are many less powerful cores, which helps address the situation of needing "one off" pixel operations.

That processor I'm referring to is the gpu and the programs you write for it are called shaders (;

What you are asking about doesn't exist to my knowledge and seems like a bad usage pattern, so seems unlikely to exist IMO.


---

