Stamps, Animations and Tunes

You can STAMP a wallpaper with up to 10 different graphics, display an animation and play a tune using E2B. Tip: Recent versions of the E2B_Editor will display valid STAMP bitmaps on the menu (but without transparency). Note: The E2B_Editor.exe menu editor does not display animations. QEMU\VBox does not support playing tunes. 

About transparent backgrounds

If you enable Transparency (bit 7 set, type byte = 0x80 instead of 0x00) then the bottom left pixel is used as the ‘transparent colour’.
 So, any pixel which has the same RGB value as the bottom left corner pixel will then not be written to the display, so the background wallpaper pixel will be seen instead. Tip: If some background pixels are not exactly the same RGB colour value, then those pixels will appear as ‘speckles’ on your wallpaper image. An easy way to get around this is to cheat and use a wallpaper which has a similar coloured background. For instance, if your animation shows white speckles in transparent mode, ensure that the background wallpaper is also white behind the stamp/animation’s location. Use .bmp bitmap files if you want to use transparency because .jpg files may not use exactly the same RGB colour value for all pixels in the background, and this can cause dots/artifacts/speckles to be visible in the background.  

Stamps

E2B supports up to 10 stamps.  A stamp is a 24-bit colour graphics bitmap or JPEG which will over-write the current wallpaper background at a specified x/y position.

Once the STAMP is applied, it will remain there – all subsequent menus will also display the same background and the same STAMP unless you load a different background or re-load the same background again. 

A stamp can be any size, up to the maximum resolution of the graphics mode chosen (e.g. 800×600 or 1024×768), however, they are normally intended to be smaller than the background wallpaper and they can be positioned anywhere on the screen (even behind the menu area). 

Note: Be careful not to exceed the screen area (e.g. do not write a 100 pixel wide stamp to an 800 wide pixel screen starting at  X=720 – because this can cause strange affects!). 

Try this in your \_ISO\MyE2B.cfg file to add an E2B boiler plate stamp to the top right of the screen (with a transparent background = 0x80 or opaque=0x00):

 set STAMP1=0x80=570=23 /_ISO/e2b/grub/E2BPlate.bmp 

The E2B menu wallpaper/background can be a large bitmap or JPEG file, or it can be a block of a single colour, but the display must be in graphics mode (not text mode). 

Stamps do not work when using a GFX Boot Menu. 

You can define up to 10 STAMPn variables in the \_ISO\MyE2B.cfg file like this:

# Ovewrite the wallpaper. Format: set STAMPn=type=x=y (filespec)   note: must be space before filespec
# Type: 0x00=opaque, 0x80=transparent background
set STAMP1=0x00=584=0 /_ISO/docs/Templates/Animate/easy2boot_stamp.bmp
set STAMP2=0x80=680=160 /_ISO/docs/Templates/Animate/E2B.bmp
set STAMP3=0x00=680=260 /_ISO/mystamp3.bmp
set STAMP4=0x00=680=360 /_ISO/mystamp4.jpg

The stamp graphics files can be compressed using GZip or Encode_LZMA.cmd and can have any name or file extension (but the contents must be in jpg or bmp format).

Tip: Use Microsoft Paint to re-save them as .jpg or .bmp if they do not appear to work in E2B.

If type=0x80  (transparent) is used instead of 0x00 (opaque), the bottom-left corner pixel will be used to determine the transparent colour rgb value – any pixel of that exact same colour value (anywhere in the stamp) will not be displayed. .jpg files do not work very well with transparency, so always try .bmp first if possible.

Tip: If you want to make text stamps (perhaps with a large, fancy font syle?) and with a transparent background, use Microsoft Paint to make a 2-colour (black&white) .bmp file containing your text. This will create a non-dithered image with just two colours. When you are happy with your text, re-load and re-save it as a 24-colour bmp and then change the colour of the letters to whatever colour you want. This will leave a plain background which is suitable for using with transparency. Make sure the corner pixel (bottom-left) contains the rgb value that you want to be transparent. Any pixels colours of this same rgb value will then not be written to the display.

Alternatively, design and download your own text logo using this site (transparent page here).

Use a different ‘stamp’ for each menu

If you use stamps of the same size and position, you can use a different stamp to ‘brand’ each submenu.

For instance, when we load the Antivirus submenu, we could display an antivirus logo stamp at the top-right of the menu but use a different stamp for the Main menu.

Make two new .mnu files as follows (0x00=opaque – do not use 0x80=transparent):

\_ISO\MAINMENU\!!CONFIG\MMStamp.mnu
splashimage –offset=0x00=680=10 /_ISO/MMStamp.bmp

\_ISO\ANTIVIRUS\!!CONFIG\AVStamp.mnu
splashimage –offset=0x00=680=10 /_ISO/AVStamp.bmp

The ‘stamps’ will need to be exactly the same size and written to exactly the same position on the background so they exactly overwrite each other – or instead, you could also use a splashimage command first to load a completely different background if you wish. (e.g. splashimage /_ISO/AVwall.bmp). 

We use a folder called !!CONFIG because it must be the first alphabetically-sorted folder or file to be enumerated by E2B. Note that if you had a file called \_ISO\MAINMENU\!!!special.ISO, then the !!CONFIG folder would not be the first file/folder and so the MMStamp.mnu file would not work! Instead of using a !!CONFIG folder, you could just use a \_ISO\MAINMENU\!!!MMStamp.mnu file – as long as it is enumerated first by E2B.

Tip: Instead of a .mnu file, you can use .g4b files which have the same name as the menu folder to load a different background and then STAMP it with different STAMPS (e.g. \_ISO\linux.g4b, \_ISO\mainmenu.g4b, \_ISO\dos.g4b, etc.) – see here for more details.  

Animations

This animation is playing in non-transparent mode (if it was in transparent mode, the black background would be transparent).   E2B cannot directly use Animated .GIF files, you must extract the frames and then make a floppy disk image containing all the individual frames. 

  • You can define only one animation sequence using the ANIMATE variable in the MyE2B.cfg file.
  • An animation consists of a sequence of .bmp or .jpg files written to the screen one after the other. Each ‘frame’ is a file.
  • The sequence will either play for 1-15 times during E2B start-up and before the E2B Main Menu is displayed, OR it can be continuously displayed on the background wallpaper when the menu is displayed.
  • An animated GIF file must be split into multiple 24-bit colour .bmp or .jpg files (frames).
  • E2B will load each frame one after the other with a delay between each one.

The easiest way to create an animation is to use Google to find an Animated GIF, then convert it using KickMyGraphics and then make it into an .IMA file using GIFtoIMA.cmd (see ‘How to make animated frames for E2B‘ below and see here for a blog ‘How to’ article).

Rules for E2B animation files

  1. Extracted .BMP frames must be in 24/32-bit colour depth (not 256 colour).
  2. Extracted .JPG frames can be used but they do not support transparent backgrounds well.
  3. The dimensions of each .bmp/.jpg frame (Width x Height) must be identical – otherwise you get jitter and remnants on the screen.
  4. Many animated GIFs only store differences and are in a special format and so must be converted using KickMyGraphics.
  5. When you play animations using a transparent setting, the bottom-left corner pixel RGB colour value is used as the transparent colour by E2B.
  6. Maximum of 255 frames supported.
  7. If the last frame is the same as the first frame, reduce ‘last’ number by one so there is no ‘pause’ in the animation when it loops
  8. You can either loop it 1-15 times or play it continuously in the menu.
  9. Each file frame name must be one or more characters and the file extension must end in nnn.eee where nnn is 01-99 or 001-255 and eee is any three letters (typically .bmp or .jpg) – e.g. fred01.bmp or a001.jpg (not 01.bmp or 001.bmp).
  10. Use the free app KickMyGraphics to convert a GIF into the correct format (loopback mode=off) then use GIFtoIMA.cmd to convert it to a .IMA file.
  11. When positioning the frame on the display, do not exceed the 800×600 or 1024×768 display area or screen corruption may be seen.

Tip: Try the DNA Animation .mnu file (in Alternate Downloads – Other Files area) for a 120-frame rotating transparent DNA model…

or maybe display a wavy flag  on your menu.

The F2 key will stop/start the animation (as long as the F2 key has not been already defined as a menu hotkey).

Avoid positioning an ‘infinite-play’ animation inside the E2B Menu area or where text may be located (e.g. avoid the menu area, menu help text area under the menu or the ‘footer’ help text area under the menu).

You can specify a transparent background (the bottom-left pixel is regarded as the transparent pixel RGB value).

If the ‘type’ includes %infinite% then it will play the sequence continuously on the wallpaper when the menu is displayed.

If you specify the number of cycles (1-15), then the background wallpaper will be displayed and the animation will play the specified number of cycles during E2B start-up and before the E2B menu is displayed.

Grub4dos only supports one animated sequence on the display at any one time.

Display animation times before menu is displayed

You can play an animation 1-15 times before the menu is shown to the user. The example below plays the thin red line ‘cubeln‘ animation twice before loading the menu.You could use this to display an animated important message or company logo.The user can press F2 to abort the animation and load the menu. 

!BAT
# ---- ADVANCED MENU SETTINGS ----- 
 
#prevent enumeration of files from scrolling the screen
set redir=1
 
# stamp E2B boilerplate
set STAMP1=0x80=570=23 /_ISO/e2b/grub/E2BPlate.bmp
 
# play animation on blank menu with transparent background twice before showing menu (0xa2)
# use 0x22 for non-transparent background, 0x02 or 0x82 to play twice after menu is displayed
set ANIMFD3=/_ISO/cubeln.ima
set last=117
# 1st param = type - use 0xA0 for looping+transparent background, use 0x20 for looping+opaque background, bit 0-3=0 for continuous, 1-f for number of loops
# 2nd param is delay (1\18th second), 3rd is last frame number, 4th is x pos, 5th is y pos (in pixels), 6th is path to first frame
set ANIMATE=0xa2=1=%last%=575=225 (fd3)/E2B/cubeln_frame_0001.BMP
 
#Examples for type
#type=0 - cancel animation
#type = 0x01 - play animation once in background (opaque background)
#type = 0x21 - play animation once and wait until finished (opaque background)
#type = 0x81 - play animation once in background (transparent background)
#type = 0xA1 - play animation once and wait until finished (transparent background)
#type = 0x10 - play animation infinite times in background (opaque background)
#type = 0x90 - play animation infinite times in background (transparent background)

WARNING: There must be no spaces after the frame filename!

set ANIMATE=0xa2=1=%last%=575=225 (fd3)/E2B/cubeln_frame_0001.BMP <<<<<<(NO SPACE AFTER ‘BMP’)

Bug in grub4dos: If you start a second animation with a finite 1-15 count before the first one has finished, some grub4dos versions may crash.

Infinite animation on the menu (.IMA file)

Loading each frame from the USB drive can cause a delay between each picture and also can cause wear of the E2B Flash memory drive.

A much better solution is to load all the graphics files into memory first.

This is done by making a floppy disk image file (e.g. E2B_GIF.ima) which contains all the frame images.
It is better for performance reasons, to use uncompressed .bmp files or .jpg files for the frames but you can compress the final .ima file using Encode_LZMA.cmd.

This image will be loaded as floppy disk 3 (fd3) by E2B. You must set the ANIMFD3 variable and specify (fd3) for the source of the animation files.

# ANIMATE - displays a sequence - first file must be end in 01.xxx (can be a compressed bitmap using gzip or LZMA) - must use .bmp or .jpg as extension
# type: trans=transparent, infinite=animate on menu or add 1-15 for number of cycles, disable playing = 0x0
# 18 delay units = 1 second, top-left offset x and y in pixels, last = last frame number in sequence 01-255.xxx
# display a sequence on the menu (with transparent background)
set trans=0x80 && set infinite=0x10
set /A type=%infinite% + %trans% > nul
set delay=0x3
set last=09
set x=650
set y=40
# if images are inside a disk image, specify (fd3) as the device
set FILE=(fd3)/frame_0001.bmp
set ANIMATE=%type%=%delay%=%last%=%x%=%y% %FILE%
set trans= && set infinite= && set delay= && set type= && set last= && set y= && set x= && set FILE=
# If using a floppy disk image (fd3), we must specify the image file
# The floppy disk image is loaded into memory and so the animation is faster and does not constantly access the disk
# ANIMFD3 if a floppy disk image file containing the frames - it is mapped to fd3 by E2B
set ANIMFD3=/_ISO/docs/Templates/Animate/E2B_GIF.ima

If you wish, this can be shortened to just two lines:

set ANIMFD3=/_ISO/docs/Templates/Animate/E2B_GIF.ima
set ANIMATE=0x90=3=9=650=40 (fd3)/frame_0001.bmp

For details of how to make a floppy disk image containing the frames, see below.You can find example animations in the Alternate Download Area – Other Files folder (e.g. DNA and MrBean). 

Tip: Sometimes the first and last frame in a GIF are identical. This can cause a ripple effect at the end of each cycle.

To fix this, reduce the last frame number by 1. 

Really fast animation (E2B v1.99+)

Instead of specifying a delay in tick units (1 tick=55ms), you can specify a delay in units of milliseconds using a syntax of xxx:ms, e.g.

set ANIMATE=0x90=10:ms=9=650=40 (fd3)/frame_0001.bmp

Tip1: Use .bmp (not .jpg) for fast-playing or large-frame animations to avoid delays in grub4dos decoding the .jpg files. 

Tip2: To adjust the position of the animation in the menu, you can extract one frame from the .ima file  using 7zip and then temporarily define it as a STAMP1 in your \_ISO\MyE2B.cfg file. 

set STAMP1=0x80=570=23 /_ISO/frame_0001.bmp 

then use E2B_Editor.exe to display the STAMP so you can adjust its position by editing and re-loading the MyE2B.cfg file. 

How to make animated frames for E2B using GIFtoIMA.cmd

Making animation files is easy using GIFtoIMA.cmd! 

First install IrfanView and ImDisk (ImDisk is also in MPI Tool Kit) onto your Windows system, then… 

1. Convert/modify an animated GIF to the correct format using KickMyGraphics (see below for how to use KickMyGraphics).

2. Convert the GIF to an IMA file by drag-and-drop onto the GIFtoIMA.cmd file on your E2B drive (drive letter Z: must be unused on your system).
GIFtoIMA will then copy the .IMA file to E2B drive and add code lines into \_ISO\MyE2B.cfg (example code will also be output by GIFtoIMA.cmd into a .txt file for you).

3. (optional compression) – If the frames are in .bmp format then drag-and-drop the .IMA file onto the \_ISO\docs\E2B Utilities\LZMA\LZMA_Encode.cmd file – this will compress the .IMA file for faster loading by E2B. Steps 1 and 2 are described in detail below:

1. KickMyGraphics

GIFs which only store differences or which contain frames of different sizes are not suitable unless converted first using KickMyGraphics. I suggest you always save the .GIF file using KickMyGraphics.

Use the free app KickMyGraphics to load (Add Graphics), edit and then save (Make animated GIF) a GIF in the correct format (use loopback mode=off).

To trim (delete) selected frames use Trim selected frames.

  1. Run KickMyGraphics
  2. Load GIF
  3. Loopback mode off
  4. Check it plays OK  (can adjust quality for large pictures). I suggest you don’t change the size using this app., you can change the size later using GIFtoIMA.cmd
  5. ‘Make Animated GIF’ (save file) 

Tip: Max. limit is 255 frames – If there are more than 255 frames, use Step frames=2 to halve the number of frames. 

2. GIFtoIMA.cmd

After using KickMyGraphics to make a new .gif file, we must make an IMA file from the GIF file – just drag-and-drop the new converted GIF file onto the \_ISO\docs\E2B Utilities\GIFtoIMA\GIFtoIMA.cmd file. 

  1. (First, convert your GIF first, using KickMyGraphics.)
  2. Drag-and-drop the converted GIF file onto the GIFtoIMA.cmd file (must be the .cmd file on your E2B drive, not in the download).
  3. GIFtoIMA.cmd will output an .IMA file and a .txt file containing example code lines and optionally update your E2B drive’s MyE2B.cfg file for you.
  • GIFtoIMA.cmd will extract the .bmp files from a GIF and then make a IMA file (it uses IrfanView and ImDisk which must be pre-installed).
  • GIFtoIMA.cmd allows you to change the size of the frames (and maintain aspect ratio).
  • GIFtoIMA.cmd can convert to JPGs for smaller size but the transparent background option will not work well with JPG files. Only use .jpg format if transparency is not required – use .bmp if background transparency for the GIF is required.
  • GIFtoIMA.cmd allows you to specify a transparent background or opaque background if you choose .bmp format.
  • You can check a GIF using the View Slideshow option and the < > cursor keys.

Tip: Drive Z: must be unused in Explorer.  If one of the partitions on your USB drive has a drive letter of Z: already and Windows Disk management does not allow you to change it, you can change the drive letter using “\_ISO\docs\Make_E2B_USB_Drive\ChangeDriveLetter\ChangeLetter.cmd”.

Note: if you don’t specify a large enough size for the .IMA virtual floppy drive (Z:), you will get an error, press CTRL+C to abort and try again with a larger size. The size entered should be in KB, 2% extra is automatically added to the suggested size.

Optional: Once the .IMA file is made, you can then compress the IMA file using LZMA_Encode if it is in .bmp format, if you wish. Drag-and-drop the IMA file onto the \_ISO\docs\E2B Utilities\LZMA\LZMA_Encode.cmd file. This will compress the file for faster loading, but it will not change the .IMA file extension. There is no advantage in compression if using jpg frames because .jpg files are already compressed.

GIFtoIMA will offer to also modify your \_ISO\MyE2B.cfg file and copy across the .IMA file if you run it from your E2B drive.

GIFtoIMA also saves a .txt file which contains an example of the required code lines (\_ISO\MyE2B.cfg must always start with !BAT on first line), e.g.

!BAT
set ANIMFD3=/_ISO/horsedrawingKMG.ima
set last=6
# 1st param - use 0x90 for looping+transparent background, use 0x10 for opaque background
# 2nd param is delay (1\18th second units), 3rd is last frame number, 4th is x pos, 5th is y pos (in pixels), 6th is path to first frame
set ANIMATE=0x10=3=%last%=575=225 (fd3)/E2B/horsedrawingKMG_frame_0001.bmp

You will probably need to change the numbers in bold – type (0x10=opaque or 0x90=transparent), delay (1-99) and position (x=575, y=225) parameters. For more details see blog post here.

The delay between frames is specified in 1/18 second units (ticks), E2B allows you to specify the delay in milliseconds using the syntax nnn:ms (e.g. 15:ms), however some systems may play the animation slower, depending on the CPU and graphics speed.

Add a Powerpoint Help slideshow

See my blog post here

Multiple animations sequences

You can play animation sequences one after another from a MyE2B.cfg file.You should only use an infinite sequence for the menu, and you must set the ANIMATE variable last of all.For instance this will play two animation immediately first, enumerate the MAINMENU files and then play another one continuously on the menu.If you reload the menu using F8, they will play again:

# we must be in graphics mode
graphicsmode -1 800
#first display a background (optional)
splashimage /_ISO/wallpaper.bmp
 
# first play animation - A_frame_01.bmp - A_frame_15.bmp must exist  - MUST EXIST AS DISCRETE FILES ON DRIVE (not inside an IMA file)
set trans=0x80 && set infinite=0x10
# play sequence 3 times immediately
set /A type=%trans% + 3 > nul
set delay=0x3 && set last=15 && set x=350 && set y=40
set FILE=/_ISO/ANIM/A_frame_01.bmp
set ANIMATE=%type%=%delay%=%last%=%x%=%y% %FILE%
# play sequence now
splashimage --animated=%ANIMATE%
 
# second animation - B_frame_01.bmp - A_frame_12.bmp must exist
set delay=0x5 && set last=12 && set x=650 && set y=400
set FILE=/_ISO/ANIM/B_frame_01.bmp
set ANIMATE=%type%=%delay%=%last%=%x%=%y% %FILE%
# play sequence now
splashimage --animated=%ANIMATE%
 
# setup ANIMATE for Menu from a floppy disk image
set ANIMFD3=/_ISO/docs/Templates/Animate/E2B_GIF.ima
set ANIMATE=0x90=3=9=650=40 (fd3)/frame_0001.bmp
 
# delete unwanted variables
set trans= && set infinite= && set delay= && set type= && set last= && set y= && set x= && set FILE=

Play animation 3 times with a different background, before displaying the menu

Note that any error in code syntax will prevent the following lines from executing unless errorcheck off is used.Make sure the ‘last’ parameter is correct – if it is too big it may continue playing when the menu is reached!By testing for DONEMENU, the animation only plays on first boot and not when F8 is pressed.

### play boots animation on first boot 3 times - then use horse animation on main menu
 
### if error in our code, it will not run any lines afterwards if errorcheck on is used, so turn off
errorcheck off
### we must be in graphics mode
if not exist DONEMENU graphicsmode -1 800
###display a background on first boot - bitmap or single colour fill (optional)
#if not exist DONEMENU splashimage /_ISO/smile.bmp
### or just fill screen with one colour
if not exist DONEMENU splashimage --fill-color=0x010101
 
### first play animation 3 times using IMA file - make sure %last% is correct or strange things happen!
set trans=0x80 && set infinite=0x10
set type=0x90
set delay=0x1
set last=24 
set x=250 && set y=40
### load IMA as fd3
map --mem /_ISO/bootsKMG.ima (fd3) > nul
map --hook > nul
set ANIMATE=%type%=%delay%=%last%=%x%=%y% (fd3)/E2B/bootsKMG_frame_0001.BMP
### play sequence now
if not exist DONEMENU splashimage --animated=%ANIMATE%
 
### set up animation for menu
set ANIMFD3=/_ISO/AnimhorseKMGTrans.ima
set ANIMATE=0x90=1=7=370=510 (fd3)/E2B/AnimhorseKMGTrans_frame_0001.BMP

Download SmileHorse theme files. 

Start any animation

This code can be placed in any .mnu file to start a menu animation. User can edit bold parts.

### play animation using IMA file - make sure %last% is correct or strange things happen!
# transparent background=0x80 , infinite=0x10, transparent+infinite=0x90
set type=0x90
set delay=0x3
set last=24 
set x=650 && set y=40
### load IMA as fd3
map --mem /_ISO/bootsKMG.ima (fd3) > nul
map --hook > nul
set ANIMATE=%type%=%delay%=%last%=%x%=%y% (fd3)/E2B/bootsKMG_frame_0001.BMP
### play sequence now
splashimage --animated=%ANIMATE%

for faster animation use ms: – e.g. set delay=10:ms  (10 milliseconds per frame). 

Manual method (or doing it the hard way!)

Example (using multiple .bmp files)

The example below displays 9 individual frames – 530791_frame_0001.bmp to 530791_frame_0009.bmp – the last frame is 09 so last=9.

However, usually you would use a .IMA file (floppy image) which would contain all the frame files (see below).

Bitmap files can be compressed using GZip or LZMA. If there are more than 99 frames, the file name should end in 001.bmp or 001.jpg (max=255). The filename specified in the command line for ‘FILE’ should always be the first frame (e.g. abc01.bmp or abc001.bmp).

Note: All individual frames must be the same x,y dimensions or the image will jitter and may leave remnants on the screen during animation.
Also, they each frame must contain a complete image (you can check by viewing the extracted .bmp files). Some GIFS use a ‘differences only’ encoding format – KickMyGraphics will convert an animated GIF into the correct format.

A sample of some animation code for the MyE2B.cfg file is shown below:

# ANIMATE - displays a sequence - first file must be end in 01.xxx (can be compressed bitmap using gzip or LZMA or JPEG file) - must use .bmp or .jpg as extension
# trans=transparent, infinite=animate on menu or use 1-15 for number of cycles, current animation is stopped if type=0x00
# 18 delay units = 1 second, x and y in pixels, last = last frame number in sequence 01-255.xxx
set trans=0x80 && set infinite=0x10
 
# display sequence on menu (with transparent background)
set /A type=%infinite% + %trans% > nul
# uncomment line below to play sequence 3 times immediately
###set /A type=%trans% + 3 > nul
set delay=0x3
set last=09
set x=650
set y=40
set FILE=(bd)/_ISO/530791_frame_0001.bmp
set ANIMATE=%type%=%delay%=%last%=%x%=%y% %FILE%
set trans= && set infinite= && set delay= && set type= && set last= && set y= && set x= && set FILE=

or reduce it to:

set ANIMATE=0x90=3=9=650=40   /_ISO/530791_frame_0001.bmp

Note: By using type=1 and last=1, you can display any single picture for a set period of time during E2B startup.          Use delay=0 to stop animation (infinite delay), the specified first frame (e.g. 530791_frame_0003.bmp) only will be displayed. We need to find or make an Animated GIF file and then de-construct it into .bmp files. 1. Select a static picture that you want to animate. If you want to use a transparent background in E2B, the bottom-left pixel should be the ‘transparent’ colour.For example, if the bottom left pixel has an RGB value of 0xFF0000 (pure red), then all pixels of that colour will be written as ‘transparent’ pixels. 

Tip: If you want to make animated text, use Microsoft Paint to make a 2-colour (black&white) .bmp file. This will create a non-dithered image with just two colours. Then re-load and re-save it as a 24-colour bmp and change the colour of the letters to whatever colour you want. This will leave a plain background which is suitable for using with transparency.

Tip: You can use Google to find animated GIFs. Use Images – Tools – Size – Icon to find suitable ones

 2. There are many web-based animated GIF makers, use Google to find one. I used Animizer. Select the desired effect and choose the number of frames you want (use less than 20 if possible, max=255).Make the .GIF file and download it. 

3. I used IrfanView 4.41 to load the GIF file and then Options – Extract all frames to extract the frames as aaaaa-0001.bmp files (they will be in the correct format if you use IrfanView). There are also many web-based sites that will convert .GIF files to a sequence of .bmp files, but you may have to rename the files because they must end in 001.bmp, 002.bmp, etc..  Some sites you may find useful for web-based extraction from a GIF file are herehere and here

IMPORTANT: Many animated GIFs do not extract to the same size .bmp frames. After you extract the .bmp files, check that all frames are exactly the same dimensions or else the animation will jitter, leave remnants on the screen and won’t work properly. 

4. To reduce the size of the .bmp files and for faster loading, select all the files and then drag-and-drop them onto the \_ISO\docs\E2B Utilities\LZMA\LZMA_Encode.cmd file. This will compress all the .bmp files in one go, but will not change their file extension.

If you are going to make a .ima floppy disk image file (recommended – see below), then do not compress the .bmp files. For the fastest animation, use uncompressed .bmp files rather than .jpg files, make a floppy disk image as below and then compress the .ima file using LZMA_Encode.cmd (you can find it in the \_ISO\docs\E2B Utilities\LZMA folder). 

To make a floppy disk image containing the graphics frames manually, you can use WinImage or ImDisk.Once you have made the .IMA image file, you can compress the .IMA file using LZMA_Encode. 

WinImage (max 2.88MB)

1. Download and install WinImage 2. Click on File – New and choose a suitable size for the disk (max 2.88MB)Choose a size just large enough to hold all the images. 3. Drag-and-drop the bitmaps onto the window 4. Save the file  

ImDisk (for images larger than 2.88MB)

 ImDisk is slightly more difficult to use, but you can make a floppy image of any size (small or large).

1. Install ImDisk (if not already installed) 

2. Run ImDisk Virtual Disk Driver from the Start Menu – Programs menu (or click on it in the Windows – Control Panel) and choose Mount New… 

3. Specify the filename and size of floppy image, etc. (see screenshot) and Format the new volume (Windows will pop-up a Format dialogue box for you). 

4. Copy the bitmap files onto the new virtual drive (e.g. I:) 

5. Select the Drive\Image in the ImDisk Control panel and click on Remove

To reduce the file size, you can compress the .ima file using LZMA_Encode.  

Write text strings to the menu

You can write text strings to the menu by adding lines to MyE2B.cfg, e.g.

# Write text to the menu (grub4dos 0.4.6a only) – –string=x=y=colour=”text”
setmenu –string=69=18=0xFF00FF=”Hello”

See here for more details. 

Tunes (beep)

Tip: Simply install PimpMyDrive for a demonstration.

Later versions of grub4dos 0.4.6a (2018-06+, E2B v1.99+) can play notes on the internal PC\notebook speaker (if fitted) by using the beep command. beep commands can be added to the MyE2B.cfg file or you can call a grub4dos batch file to play a tune.Press a key to stop the noise. Note: Not all PCs or Notebooks are fitted with an internal speaker. The frequency of musical notes can be looked up here.

Here is a table using closest whole integers for Frequency  (262Hz = C4 = Middle C):

Use a frequency of 0 for a delay – e.g. beep 0 500 will delay for 1/2 second. Up to 126 notes+delays can be specfiied per beep command but you can play longer tunes also. Sample tunes may be found in \_ISO\docs\Tunes folder, e.g. in your \_ISO\MyE2B.cfg, add to the bottom of the file:

call /_ISO/docs/Tunes/Tetris_Loop.g4b

A \_ISO\docs\Sample mnu Files\E2B Menus\Play_a_Tune.mnu file can be copied to the \_ISO\MAINMENU folder to test the tunes. This menu entry is also added if you run \_ISO\Pimp_my_drive.cmd. Test on a real PC which has an internal speaker/beeper fitted. 

Note: If a graphics animation is also playing at the same time, the tune may be played at a slower speed. Animation, once playing, can be turned off or on using the F2 function key. Pressing the F2 key (or any key) will also stop the tune.

Example 1: Simple tune examples

play C4 (middle C – 262Hz) for 200 milliseconds (1/5 second)

beep 262 200 

play Doh Ray Me with 300ms of silence between each note

beep 262 300    0 300    294 300     0 300    330 300 

Mission Impossible (all on same line, max 126)

beep 784 150 0 300  784 150  0 300  932 150  0 150  1047 150  0 150  784 150  0 300  784 150  0 300  699 150 0 150  740 150  0 150  784 150  0 300  784 150  0 300  932 150  0 150  1047 150  0 150  784 150  0 300 784 150  0 300  699 150  0 150  740 150  0 150  932 150  784 150  587 1200  0 75  932 150  784 150  554 1200 0 75  932 150  784 150  523 1200  0 150  466 150  523 150 

Example 2: Simple tune repeated 3 times

beep --play=3 --nowait 311 250 415 450 311 150 415 250  311 180  415 180  466 250  523 600  415 300  0 600 

This plays in the background because the –nowait parameter has been specified. 

Example 3: Longer tune played in menu

This will play the tune synchronously in an infinite loop as a background task. 

The E2B menu will be displayed at same time as notes are played, etc. but any key press will stop the tune. 

beep --start 330 440 330 220 392 220 440 220 522 220 522 220 440 220 392 440 393 220 440 220 392 880
beep --mid 330 440 330 220 392 220 440 220 522 220 522 220 440 220 392 440 392 220 440 220 392 880
beep --mid 392 440 392 440 392 440 330 220 392 220 440 440 440 440 392 880
beep --mid 330 440 293 220 330 220 392 440 330 220 293 220 261 440 261 220 293 220 261 880
beep --mid 330 220 293 220 261 220 330 220 293 660 330 220 392 440 440 220 522 220 392 880
beep --mid 293 440 330 220 392 220 293 220 330 220 261 220 220 220 196 880 220 440 261 440
beep --end --play=255 --nowait 293 660 330 220 261 220 293 220 261 220 220 220 196 1320

The last line, ‘beep –end …’ will start to play the tune. Max. 126 notes in total. 

Example 4: Very long tune (>126 notes)

beep 330 440 330 220 392 220 440 220 522 220 522 220 440 220 392 440 393 220 440 220 392 880
beep 330 440 330 220 392 220 440 220 522 220 522 220 440 220 392 440 392 220 440 220 392 880
beep 392 440 392 440 392 440 330 220 392 220 440 440 440 440 392 880
beep 330 440 293 220 330 220 392 440 330 220 293 220 261 440 261 220 293 220 261 880
beep 330 220 293 220 261 220 330 220 293 660 330 220 392 440 440 220 522 220 392 880
beep 293 440 330 220 392 220 293 220 330 220 261 220 220 220 196 880 220 440 261 440
beep 293 660 330 220 261 220 293 220 261 220 220 220 196 1320

This method can be used to play very long tunes (over 126 notes) but it does not play in the background. If you want to allow the user to abort the whole tune by pressing any key, make a .g4b batch file and add || goto :FINBP to the end of each line, e.g.

!BAT
beep 659 125  659 125  0 125  659 125  0 167  523 125  659 125  0 125  784 125  0 375  392 125  0 375  || goto :FINBP 
beep 523 125  0 250  392 125  0 250  330 125  0 250  440 125  0 125  494 125  0 125  466 125  0 42  || goto :FINBP 
beep 440 125  0 125  392 125  0 125  659 125  0 125  784 125  0 125  880 125  0 125  698 125  784 125  || goto :FINBP
beep 0 125 659 125  0 125  523 125  0 125  587 125  494 125  0 125  523 125 || goto :FINBP
:FINBP

This code must be used within a batch file because of the use of labels (:FINBP).

e.g. in your \_ISO\MyE2B.cfg, add

call /_ISO/docs/Tunes/Tetris_WaitLoop.g4b

Tip: Use ‘goto :EOF’   (goto End Of File) instead of ‘goto :FINBP’ to exit from the whole batch file. The label :EOF does not need to be specified in the batch file.

If you want a certain tune to play when the user selects a certain menu – e.g. Memory Test menu

Create a file \_ISO\UTILITIES_MEMTEST\$$$$Tune.mnu containing the text:

call /_ISO/docs/Tunes/AxelFoley_Loop.g4b

Note that filename must begin with $$$$ so that it is added to the beginning of E2B menu.

Virtual Machines and tunes

Virtual Box and QEMU do not support a PC Speaker function, but VMware does, so you can test tunes out when booting from an E2B USB drive using VMWare.

New! Ventoy for Easy2Boot v1.0.97 now released!

 

eBooks available (in PDF format)

Easy-to-read eBooks are available in PDF format (each eBook is over 100 pages) – rated 4.5/5 stars.
Learn the secrets of Legacy and UEFI USB booting and then make your perfect multiboot USB drive.
E2B eBook #1 includes instructions on how to remove the E2B 5-second start-up delay blue screen.

E2B is unique in that it uses partition images which allows you to directly boot from Secure Boot images (no need to disable Secure Boot or run MOK manager or modify your UEFI BIOS).

Most eBooks are over 100 pages long, contain original content and step-by-step exercises which are suitable for both the beginner or the more experienced user.
Customer reviews are located at bottom of each eBook product page and multi-buy discounts are available when you buy more than one eBook. Please also visit RMPrepUSB.com and the E2B Forum.
Subscribe to my blog for the latest news, tips, USB boot articles and free eBook updates.