3

Recently, I've been hearing a good deal about hardware tricks. For instance, the YouTuber Ahoy (see A Brief History of Graphics) mentions that some game programmers resorted to "hardware tricks" to diversify the gamut of colors on the screens of console systems using mode 7 (I'm assuming that's mode 07h in Assembly). Then I read about some kind of "graphical trickery" in Doom (see the Reception section on the Wiki page for Doom here) to give the illusion that you are in a world with heights and elevations. Does that also mean some kind of hardware trickery? What is a hardware trick and is there such a thing as a software trick?

EDIT: Just to be clear, though I do have a basic idea of what a "hack" or a "trick" is, the emphasis really is on the "hardware" part, but people got sidetracked by the former. It is my understanding that the "hardware" part comes in when we discuss things like video memory (memory addresses) as part of the larger memory component in a machine, and there is a sea of numbers involved to be manipulated to represent 2D (faux 3D) geometries. Am I correct on that last one?

8
  • 17
    ‘trick’ is used in its ordinary-language meaning here; it doesn’t refer to any particular technique. There is no ‘one weird trick’ that everyone uses. Oct 26, 2022 at 10:11
  • 9
    In earlier times, we'd have used the word "hack".
    – dave
    Oct 26, 2022 at 12:15
  • 2
    A hardware trick is usually software exploiting a side effect of the hardware design. The stuff about "faux 3d" is firstly related to "tricky" and is based on a weird misunderstanding of what "3d" is and what is and is not a "dimension". But in the case of mode 7 it does use a side effect of the hardware to achieve a 3D texture. My understanding is the hardware was designed to allow scaling and 2D rotation and somebody clever realized they could exploit that to get a perspective mapping. Like with Doom, people calling that "pseudo 3D" have imagined 3D is something other than 3 dimensions. Oct 26, 2022 at 15:07
  • 1
    @hippietrail : You've pretty much captured the sentiment behind my question with that last comment. Hence my edit. Oct 26, 2022 at 15:23

4 Answers 4

9

Some turned to hardware tricks to simulate 3D worlds, and the Super NES's Mode 7 could be considered a rudimentary form of texture mapping.

Note the following passage later on to give some context:

Many of these early games were reliant on tricks to simulate a 3D world. Limited geometry, the use of sprites, or other time-saving hacks. True texture-mapped 3D games required a great deal of processing power.

The "tricks" is referring to giving the illusion of real-time 3D to the player without actually doing the hard math for it and it's a "hardware trick" because they're leveraging a special feature of the hardware (In that case, Background Mode 7 of the SNES's PPU) to do it.

The more you understand about how it's actually accomplished, the easier it is to understand why it's a "trick" and, for Mode 7 specifically, when you look at how something like the Top Racer/Top Gear series combines Mode 7 and scanline interrupts to curve the track.

Scanline interrupts are the best example I can think of for something that's both a designed feature of a system and easy to understand as a "hardware trick", given our modern conception of how 3D rendering works.

Retro Game Mechanics Explained's SNES Background Mode 7 - Super Nintendo Entertainment System Features Pt. 05 goes into "enough to program something using it"-level detail on Mode 7 if you want a deep dive.

If you want something less academic, maybe Sharopolis's Games That Push the Limits of the Super NES (and others in the series), since he does use an emulator debugger to slice, dice, and inspect the effects to visually demonstrate how they're accomplished.

2
  • 5
    I would add that part of the reason scanline interrupts and other techniques are "tricks" isn't because they trick the system into rendering something it shouldn't be able to or trick the user. Rather, they're "tricks" because they're using documented features in an undocumented or unintended way. Mode 7 for example is designed to allow rotating, scaling, and skewing on a static image (the background layer). The "trick" is using scanline interrupts to modifying that image mid-render, opening a new world of possible effects not envisioned by the hardware's creators. Oct 26, 2022 at 15:39
  • 1
    It's also a 'trick' in the sense that these games are not working with a complete three-dimensional model of the scene you see, the way a modern game would. This means they cannot present the scene from an arbitrary camera position and/or that there are arrangements of objects that would be possible in real life but the game cannot draw. Top Racer can only show the racetrack from a camera position directly behind the player's car, DOOM cannot have one floor directly above or below another, etc.
    – zwol
    Oct 26, 2022 at 19:12
7

Magicians show magic tricks but it is not really magic as it only creates an illusion of magic because of some detail you don't yet know or have just not thought about it. So it's a trick.

Same applies here.

In the case of your first example, the software running on console hardware just sets the video chip into a specific mode how it processes graphics and perhaps software alters the parameters each line to make the hardware do operations you want it to do. It is just commanded to show some graphics in a way that makes it appear as if you have a texture mapped 3D floor, which would not be possible otherwise or it would be too slow in practice.

The real trick might just be to know what the hardware can do and then have an idea what kind of effects are possible to do with the given hardware or how to control it to make it do the effect you want.

Doom being able to give illusion of being in a world with heights and elevation has nothing to do with hardware features of the system. It's just pure software algorithm that renders the screen according to the data structures of the game. If there is a trick, it's just the idea of how to bring the heights and elevations into the data structures and render the screen from that data. And how to write the code to fake it so it is fast and credible enough. So the predecessor Wold3D is just a 2D maze game with just 90 degree rendered walls with no variability in floor and ceiling. Doom is 2.5D, or 2D maze with arbitrary wall angles and support for defining floor and ceiling heights and rendering them too with textures. So it just tricks the sensation of 3D world.

In a way, what feels like a trick to some people, is just better software algorithm to do utilize the given hardware better, no matter if it is a program that controls a video chip to achieve a stunning immersive effect, or just a program which can do a certain task due to better algorithm or optimization.

1
  • The SNES Mario Kart 3D effect is made by setting the video processor into a mode where it rotates and zooms the background (the kind of mode you might use in Mohawk and Headphone Jack (hello AGDQ terrible games block)), but then the trick is to change the rotation and zoom in-between every scan line.
    – user253751
    Oct 28, 2022 at 17:21
3

A classic example of a hardware trick is VSP (Variable Screen Positioning\Placement) on the Commodore 64, which allows for extremely fast screen scrolling. It uses a design flaw in the VIC-II chip as detailed in the link. Doom and other '2.5D' games like Duke Nukem 3D did not use any hardware tricks, the term 'trickery' there probably refers to the fact that the ray-casting method used to build the screen display is a short cut necessitated by limited hardware capabilities and only really works when the player's view is level. Looking up and down is simulated by warping the display mathematically rather than the way modern polygon-based games would do it.

7
  • 5
    AFAIR Duke Nukem does use hardware 'tricks', in fact it includes the mother of all VGA tricks, the latch copy.
    – Raffzahn
    Oct 26, 2022 at 8:51
  • 1
    @Raffzahn what is latch copy? Oct 26, 2022 at 9:21
  • 1
    @OmarL Due the way a VGA video memory is organized each access latches several pixels at once. Thus a sequence of read and write can be used to transfer more than a single pixel at once between screen areas, all without moving them thru the bus. This will speed up block copy operations noticeably See here
    – Raffzahn
    Oct 26, 2022 at 9:36
  • 3
    @Justme in the end every 'trick' is already build in, otherwise it wouldn't work. The 'trick' part is the "effective, clever or quick way" of doing it. Same goes for all software - and in fact everything in RL which is a trick.. Even your C64 border 'tricks' are that way. it doesn't mater if the (rather sparse) commodore manuals mention the details or not.
    – Raffzahn
    Oct 26, 2022 at 10:15
  • 1
    Being built-in is not the same thing as being documented. Even when a trick is documented it might've been discovered after the thing was made for its original purpose but before the docs were published. Then again using undocumented CPU opcodes can still be considered a trick even though the hardware designers usually know what they do. In other cases finding a trick is like finding a bug that can be exploited. A built in bug in hardware or software is not intentional. Finding a way to make it useful is a "trick". Oct 26, 2022 at 11:32
2

This does seem not like a retro-,not even a computing question, but rather language related, isn't it?

A trick is a clever and or quick application of some item, procedure or idea - usually something impossible, or at least way more effort, when done by the book. It can happen anywhere from cooking to fashion. This of course includes software as well.

See

5
  • 2
    I'm not sure this is helpful as an answer to the question in its original context of a 'hardware or software' trick. I think the etymology of the work trick is a given here. Additionally, discussion of whether the question is on topic belong in the comments. Oct 26, 2022 at 9:12
  • 3
    @MarkWilliams The question is 'what is a hardware trick', not 'what hardware tricks are there' - so yes, it's all about understanding usage/meaning. (Also, if it would as for examples of tricks, which it doesn't, the question would be simply to broad and/or a list request. Both by default off topic).
    – Raffzahn
    Oct 26, 2022 at 9:14
  • 2
    that is a legitimate commentary on the original question, but not a answer. Oct 26, 2022 at 9:25
  • 2
    @MarkWilliams I would appreciate if you read my reply to your comment at whole, not just pick a part, one which also is only added as a secondary comment.
    – Raffzahn
    Oct 26, 2022 at 9:30
  • -1 The first paragraph implies something weird. Retro computing, or past eras of computing, are or were cultures, and language is an elemental part of culture. Culture is about what people do, and cultural studies belong to humanistic sciences. The whole retro computing site is a humanistic effort, not natural science. Oct 27, 2022 at 11:02

Not the answer you're looking for? Browse other questions tagged .