On the bbc-micro, a half-size mode 1 screen mode with 16 colours instead of 4 can fit in memory but can the…

Screen Mode 2 on the BBC micro is 160 x 256 with “16”* colours. This uses up 20Kb of memory. Horizontal-rectangular pixels ( 2 x squares each). 4 bits per pixel (0-15 values for 16 colours)

Screen Mode 1 on the BBC micro is 320 x 256 with 4 colours, again 20Kb.

A half height or half width Mode 1 can be programmed (I’ve done it) by VDU codes/pokes (?) (if I vaguely recall). 2 bits per pixel (0-3 values for 4 colours)

With the memory saving of that, (down to 10Kb)then it should be possible to set mode 1 to use more colours, i.e. 16 colours (4bpp instead of 2). This will double the memory required back to 20Kb but will still fit in the memory.

Any idea how to program to get 16 colours. E.g. VDU command sequences and/or poking memory with the ? command?

Or was it a limitation of bandwidth with the 6845 chip that couldn’t handle both 320 horizonal pixels and 4bpp?

The point of this would be to achieve the higher resolution graphics, afforded by the square pixels in mode 1 but with more colours. So that it looked similar to ZX Spectrum games but with the advantage of full programmable individual pixels.

*16 colours is actually only 8. With an additional 8 alternating between 2 colours. 8 colours are black white red yellow green cyan blue magenta

All topic

Does the Wowfixit screen protector harden phone screens?

The WOWFIXIT web-page offers a product where you wipe a liquid over your phone screen and polish it.

They claim the result will make your protect your phone screen from scratches:

One of the many advantages of WOWFIXIT is that after applying WOWFIXIT to your device it will create an invisible layer that will protect your device from scratches and scuffs for up to one year. This layer reaches the full hardness of 9H on the Mohs scale of mineral hardness, which is a scale that characterizes scratch resistance, and is similar to Sapphire, Ruby or Corundum. Its almost as hard as a Diamond.


Using WOWFIXIT invisible liquid screen protector makes your screen up to 40% stronger in less than 5 minutes.

One retailer claims it is “consists of nanoparticles of titanium dioxide” but they stopped sounding convincing when they said “protective layer reduces the electromagnetic radiation by 92.7%”

Does this product protect screens against scratches?

All topic

HDMI screen receiving interference from old wall heater

I have a very old gas wall heater (probably about 40 years old). When the motor for the fan turns on, there is an audible “click” and the HDMI signal is interrupted for a couple of seconds (i.e. the screen goes black), then the picture comes back. When the fan turns off, there is a slight flicker on the screen, but not all the time.

  • The heater and screen are in the same room. I’m not going to move the screen to a different room and freeze to solve this problem!
  • The heater and screen are plugged into different power points
  • They are 3 metres away from each other, and I don’t have any other convenient location for the screen
  • I am using a single HDMI switch for different devices
  • My DVD player uses a three wire RCA cable (red-white-yellow) and doesn’t receive (noticeable) interference, being a less sensitive analogue format
  • This only happens when I’m using HDMI, not any other type of connection

How can I either or both:

  1. shield the wall heater to prevent it “broadcasting” interference
  2. shield the HDMI cables and switch to prevent them receiving interference

All topic

How to backup Lumia 930 without screen?

I have a Nokia Lumia 930 which has a broken screen.

I want to perform backup but my computer doesn’t recognize the phone over USB.

How can I backup my phone?

Thank you

All topic

Lumia 640 screen brightness

Can the screen brightness be increased somehow on the Lumia 640 to be more visible in sunlight. The screen setting is already set to bright.

All topic

Kindle app takes up entire screen on windows 10 and I don’t know how to get out of it

I just downloaded the Kindle app for my Windows 10 PC. When I open a book, the app takes up the entire screen. I can’t see any of my other apps, and I can’t figure out how to close Kindle or switch to another app. If I hit ESC, it does nothing. The only way I can get out of the book is to hit the Windows key on my keyboard, but this doesn’t seem like a useful solution.

All topic

I’m trying to get a 2D screen position so I unproject a point from 3D into 2D screen coordinates by that…

I’m trying to get a 2D screen position so I unproject a point from 3D into 2D screen coordinates by that following function:

Ogre::Vector2 SpaceTransformHelper::convertWorldToScreenPosition( const Ogre::Vector3& worldPosition )
    Stages::AStage* currStage = Stages::StageManager::getSingleton()->getActiveStage();
    Core::Resolution screenRes = Core::EnvironmentInformation::getSingleton()->getScreenResolution();

    // Get worldviewprojection from camera.
    Ogre::Matrix4 worldViewProjection = currStage->getActiveCamera()->getCameraViewProjectionMatrix();

    // Transform world coordinates.
    Ogre::Vector3 transformedWorldPosition = worldViewProjection * worldPosition;

    // Calculate screen coordinates from world coordinates.
    Ogre::Vector2 screenPosition;
    screenPosition.x = (int) ( ( ( transformedWorldPosition.x + 1 ) / 2.0 ) * screenRes.width + 0.5 );
    screenPosition.y = (int) ( ( ( 1 - transformedWorldPosition.y ) / 2.0 ) * screenRes.height + 0.5 );

    return screenPosition;

Now I want to convert that screenPosition into Image space to crop an image:

Core::Resolution screenRes = Core::EnvironmentInformation::getSingleton()->getScreenResolution();
float screenPositionX = (screenPosition.x / screenRes.width) * (pixelBuffer->getWidth());
float screenPositionY =  (screenPosition.y / screenRes.height) * (pixelBuffer->getHeight());

enter image description here

When I click on the mobile screen on the Green LED I get that cropped image.. but what I want is to only crop that green led.. Is there a problem with the transformation ?

  const Core::Resolution cameraRes = Core::EnvironmentInformation::getSingleton()->getCameraResolutionUpLoad( plane );
    Ogre::HardwarePixelBufferSharedPtr pixelBuffer = mTexture[plane]->getBuffer( 0, 0 );

    viewarassert( screenPosition.x < cameraRes.width || screenPosition.x >= 0 || screenPosition.y < cameraRes.height || screenPosition.y >= 0 );

   Core::Resolution screenRes = Core::EnvironmentInformation::getSingleton()->getScreenResolution();
   std::pair< Ogre::Vector2, Ogre::Vector2 > uvBounds = calculateSingleViewTextureCoordinates();

    float screenPositionX = cameraRes.height - (screenPosition.x / screenRes.width) * ((int)pixelBuffer->getHeight());
    float screenPositionY=  cameraRes.width -  (screenPosition.y / screenRes.height) * ((int)pixelBuffer->getWidth());

    int  min_x = std::max( 0,(int)screenPositionX - radius);
    int  min_y = std::max( 0,(int)screenPositionY - radius);
    int  max_x = std::min( (int)cameraRes.width, (int) screenPositionX + radius );
    int  max_y = std::min( (int)cameraRes.height, (int) screenPositionY+ radius );

    // Get the pixelbox within the radius.
    const Ogre::PixelBox &readrefpb = pixelBuffer->getCurrentLock();

    unsigned char *readrefdata = static_cast(readrefpb.data);

    Ogre::Image img;
    img = img.loadDynamicImage (readrefdata, pixelBuffer->getWidth(),
                                pixelBuffer->getHeight(), pixelBuffer->getFormat());
    img = img.flipAroundY();

    Ogre::Image *out = cropImage(img,  min_x, min_y,  max_x,  max_y);

All topic

Canonical Space to Screen Space: Why do we have the strange -0.5?

When we convert from canonical space to screen space,

To map x from -1 to 1 to 0 to width,

-1 < x < 1
0 < x+1 < 2
0 < x+1/2 < 1
0 < (x+1)w/2 < w
0 < xw/2 + w/2 < w

Similarly for y,

-1 < y < 1
0 < y+1 < 2
0 < y+1/2 < 1
0 < (y+1)h/2 < h
0 < yh/2 + h/2 < h

enter image description here

What is the reason behind choosing a screen that has (xmin, ymin) = (0.5, 0.5) and (xmax, ymax) = (1920 - 0.5, 1080 - 0.5) where (nx, ny) = (1920, 1080)?

enter image description here

All topic

Pipe stderr to file and screen without redirecting stderr to stdout

In a bash script I’d like to execute a command while piping the stderr to both a file and to the terminal. However, I want stderr to stay on the ‘2’ file descriptor so that I can parse it from an external process that is calling this bash script.

All the solutions I’ve seen so far involve swapping stdout with stderr and then tee’ing to another file, for example:

find /var/log 3>&1 1>&2 2>&3 | foo.file

If I am to call this script from another one, the stderr will go to stdout and stdout will go to stderr, which is no good for me. I’ve tried to swap them again like so:

find /var/log 3>&1 1>&2 2>&3 | foo.file 4>&1 1>&2 2>&4

but this doesn’t work.

All topic

How to remove “Setup completed successfully” from Windows 10 logon screen?

Having installed (and removed) a provisioning package in Windows 10, I now see “Setup completed successfully” on the logon screen EVERY boot, even after removing the package.

How can the message be removed? Where’s it even coming from??

All topic