The VGA card can display up to 256 colors on the screen at the same time, using an indexed 8 bit color mode. This is not much, but it allows us to fade two 16 color images into each other. This looks pretty nifty!
Tag: letscode
Let’s Code MS DOS: 0x33 PowerBasic 3D Starfield
Every year around Christmas we return to the roots. To PowerBasic instead of Turbo C! As Christmas is already over, we do something that is also befitting New Year’s Eve: a classic 3D starfield! With some EGA/VGA palette tricks, to make the stars appear smoother!
Let’s Code MS DOS: 0x32 VGA Split Screen
A couple of games back in the 1990s utilised the VGA split screen functionality to enable things that were otherwise only possible on more capable machines, like the Amiga. The VGA split screen allowed games such as Jazz Jackrabbit or Pinball Fantasies to display a static status bar at the bottom of the screen, while the rest of the screen was smoothly scrolling in two or more directions. In this video I will show how this is possible, and which VGA registers to program with the appropriate values.
Let’s Code Commodore PET 0x02: Snakes on a PET
In this episode we code a simple game for the PET. It is the classic snake game, where you control a snake that picks up food and grows longer. We learn how to read from the keyboard, and how to limit the speed of the game, as the PET is slow, but not THAT slow.
Let’s Code Commodore PET 0x01: Hello World!
This time around we will start another, probably short lived Let’s Code series. It will center around the Commodore PET, the first personal computer made by Commodore in 1977. Even before the VIC20 and C64. It shares a lot of structural similarities, but also has many peculiarities. It does not have any proper graphics support, so we will do a bit of a fancy text based hello world program, using direct screen memory access. We will use the modern, optimizing C compiler named oscar64.
Let’s Code MS DOS 0x2E: VGA Redefinable Charsets
The EGA and VGA cards support custom or redefinable character sets. Those can be used to add characters from languages not covered by the original ROMs on the card, but can also be used to aid in drawing shapes in text mode. We will use this feature to port our VGA plasma effect from graphics to text mode.
Let’s Code MS DOS 0x2D: L System XMas
It is the holiday season again, and what better way to celebrate than with MS DOS, PowerBasic and some nice L-systems! This time we introduce the push and pop functions and use them to draw colorful Christmas trees!
Let’s Code MS DOS 0x2C: Noisy 3D Animation
Earlier this year I saw a demo effect using a random noise background and simple wireframe 3D using XOR line drawing to create an interesting visual effect. Building on the 3D Cube program we did a while ago we can reimplement this effect. The magic happens when you pause the animation — or this video. Then the object magically disappears…
Let’s Code MS DOS 0x2B: Memory and Pointers
Here is a little refresher on how memory management and pointers work in the C programming language, and especially under real mode MS DOS programs written in Turbo C 2.0. We will go back to the basics to give all the new subscribers of this video series a chance to catch up.
Let’s Code MS DOS 0x2A: Background Adlib Music
We already learned how to program the Adlib sound card to produce percussion and melodic instruments. Now we tackle the problem of getting real music out of it. By utilizing the Reality Adlib Tracker’s playback routine we learn how to program the Programmable Interrupt Timer (PIT) in the PC to get a steady playback of background music.