In MS DOS you can only access up to one Megabyte of memory easily, on an original PC or XT. This memory in turn is segmented, so accessing more than 64K at a time becomes a bit more tricky. This is why languages like Turbo C and Pascal introduced near and far pointers to the programmer. However there are also huge pointers, which we will investigate in this episode.
Tag: letscode
Let’s Code MS DOS 0x36: Sprites & Occlusion
In the last video we learned how to make 2D sprites with transparency and scaling. This time around we also make our Guybrush automatically scale with the background, limit his ability to move into nonsensical parts of the scene, and most important: Walk in front and behind objects.
Source Code: https://codeberg.org/root42/VSPRITES/src/branch/feature/mask-and-scaling
Let’s Code MS DOS 0x35: Sprites & Scaling
Adventure games like Monkey Island utilized sprites that could be moved and scaled arbitrarily on the screen. How does this work on a machine that doesn’t have support hardware sprites? We will work our way from simple sprites with no transparency, to ones that are clipped, have transparency and can be scaled down arbitrarily.
Let’s Code MS DOS 0x44: VGA Blending
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!
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!