Hot answers tagged

119

One use is as a copyright mechanism. Many distributors would steal/copy programs and sell pirate or derivative copies, by changing the text strings inside the code and reordering the blocks, it was hard to prove the code had been stolen. Placing noops of different types you could put a signature sequence which was much easier to detect and hard to hide. A ...


76

Note: This answer mainly focuses on the NES, since that's what I'm most familiar with. Yes; this is called static recompilation or static binary translation, and it is theoretically possible -- jamulator by Andrew Kelly does it. However, recompilation can be incredibly difficult (to the point that falling back to interpretation at runtime may be required ...


70

The NES was also from the era where some sound and graphics resources were also executable code. (Typically, this worked the other way around. Identify a needed sound and listen to chunks of the binary to find a reasonable candidate.) Injecting NOPs can improve the look or sound derived from a section of executable. Example: "One of the more-challenging ...


68

In Super Mario Bros, you can access warp zones in three areas of the game. There are two of these that are important for the minus world glitch: the one at the end of World 1-2 (following the exit pipe) and the one at the end of World 4-2 (also following the exit pipe). The first warp zone takes you normally to World 2, 3, and 4, while the second one only ...


58

No MMC3 tricks are used for this effect; just standard background and sprite manipulation. Tiles that are completely invisible are replaced with a blank tile, while black sprites forming a circle outline cover the partially-visible tiles. We can make the effect more obvious by drawing background and sprites separately (and coloring the circle sprites white ...


52

Warp zones exist at the end of some levels. In order to access them, you have to break through blocks at the top of the level, then run along the top until a secret area becomes visible. In order to access the warp zone below you, you have to fall through a gap at the right-most side of the level. The loading of the right-most wall is what triggers the ...


51

They were different. You probably already know that NTSC is 60 Hz and PAL is 50 Hz. The video generation hardware was much more 'bare metal' than today (the NES color palette implementation was so bare metal that one of the colors you could select, referred to as 'blacker than black', could mess up some TVs due to the way the NES simply fed the color bits ...


42

The situation with the 386(DX) v. 386SX is similar to the situation with the 8086 v. 8088. The big issue isn’t the data lines (although they do have an impact on complexity and cost when routing a whole motherboard), the issue is mostly the cost of support components: motherboard chipsets (whether integrated or discrete), memory, etc. By going back to a 16-...


40

This is done by changing the scroll mid-screen. This is what the nametables look like on scanline 30 in Super Mario Bros, with the scroll shown: The horizontal scroll is 0 (you can barely see the white line on the left side). Here is the same image on scanline 31: Now the horizontal scroll is at the left edge of the visible area. The PPU draws the ...


40

It is not intentionally mirrored, it is just a side effect of making the address decoding hardware for RAM as simple and cheap as possible with a single common 74LS139 chip used for the task, when an 8k area of addresses are reserved for RAM, but only 2k of RAM is present in the 8k area. If you look at the address map, 0x0000 to 0x1FFF is reserved for the ...


36

I'm just speculating here, but one possible reason for using a 2-byte NOP would be if you wanted to change an existing 2-byte instruction into a NOP (to fix a bug, for instance), without changing the byte count for the instruction. (An undocumented 2-byte NOP might execute more quickly than two standard 1-byte NOPs in succession.) You might do this to ...


35

A mistake? The instruction $89 on the 6502 is a two-byte NOP. Based on adjacent instructions in the opcode matrix, especially LDA #ii ($A9 ii), it would have been STA #ii, a store to an immediate value, which makes no sense. On the 65C02, this instruction is changed to BIT #ii, which almost behaves as a two-byte NOP. One hypothesis is that a programmer ...


35

As seen in that incorrect† image, the levels seem to merge well. This wasn't a case of "Let's take these shapes, and see if they... whoa! They fit together!" It was more like, "Here's a big rectangle. Let's cut away some shapes." It's kind of like starting with a big batch of cookie dough, or silly putty, and cutting shapes out of that. Then, at ...


32

The Zapper worked by receiving light through the photodiode at the front of the gun in the barrel. mental_floss has a really great description of what happens: When you point at a duck and pull the trigger, the computer in the NES blacks out the screen and the Zapper diode begins reception. Then, the computer flashes a solid white block around the ...


30

This website might help. A guy (Chris Covell) picked up a children's picture book in Japan which shows kids how NES games were made. (Mostly focussing on Super Mario Bros. 3) Chris actually scanned the whole book and translated it so you can read it on the website! The book shows many things such as designing (with Shigeru Miyamoto smoking), programming, ...


30

The Picture Processing Unit (PPU) in the NES can only draw 64 sprites per frame and 8 sprites per horizontal line (scanline). If the game tries to draw more than that, some of them will be invisible. It could ruin the game if enemies became invisible because there were too many of them, so the developers programmed the games to change the order of sprites ...


28

The cartridge contains extra RAM. The NES can use tiles in cartridge memory space, but that doesn't necessarily have to be ROM. With suitable RAM and memory mapping the cartridge can create a basic bitmap display out of tiles. The vectors are then rendered to that RAM using the NES CPU in the normal way.


28

The NES's region lock is implemented in hardware, not software, with the CIC chip. The NES contains a CIC, and each authentic cartridge contains an identical CIC. When the console is powered on, the two chips communicate via a challenge-response handshake protocol, and if the cartridge fails to provide the correct responses, the CIC on the NES resets the ...


27

Subpixels in general are invisible fractional pixels that you cannot see, but are used internally to represent the positions of objects at a finer level than they're capable of being displayed at. So far as Super Mario goes they're represented as an integer with 16 subpixels per visible pixel. This allows inertia to be loosely modeled so that you can start ...


25

I worked with one and it was a pain to use. It was a cartridge made of static ram; the computer would write the contents to the cartridge and you would manually reset the console. it was slow, the upload would sometimes fail and there was no way to communicate anything back to the computer. We were using an assembler under MSDOS to make the games. On the ...


25

Typically in cases like this, they are designed to fit together. Actually, it's not so much that they are separate maps that happen to fit together, but rather it's just one big map and each 'dungeon' is simply a piece of it. This can simplify the game design because what appears to the player as moving to a new map can be coded internally as simply moving ...


25

The 'NES Version' was the branding of the revision of the Nintendo Entertainment System for the UK release. The European (non-UK) version of the Nintendo Entertainment System, was not a 'NES Version'. Since European countries would mostly be compatible with the UK PAL system's output, it exists mostly to distinguish regions for hardware region lockout (like ...


24

You're correct about it being a consequence of cartridges being able to observe the PPU memory bus. The advanced video features of the MMC5 and other mappers might have been trivial to add if Nintendo provided more signals to expose the internal state of the PPU to the cartridge, but they didn't, so these chips function by carefully monitoring PPU memory ...


22

So that indicates extra data lines were very expensive; the difference between a 386SX and 386DX computer came to hundreds of dollars. Not really. Sure, they need to have some room and routing - and thus more thru hole connections, but over all, doing a 32 data lines instead of 16 isn't a big deal. It wasn't the data lines themselves, but rather the ...


22

In many 8 bit games the position of the player's sprite is stored as the pixel coordinates it rests on. For many games that is adequate, but it has some limitations. If the game only uses whole pixel coordinates then the minimum movement speed is 1 pixel. In other words the resolution of the player's speedometer is 1 pixel. They can be moving at 1 pixel per ...


22

Any electronic equipment using radio frequencies which is sold in the USA has to be tested to show that it doesn't cause interference to other equipment, and also that it doesn't fail in a dangerous manner if it is subjected to interference from other devices. "Interference" could be anything from messing up the display on your own TV, through disrupting ...


21

In the case of the NES Advantage at least, the Turbo rate was adjustable, by turning the dial at the top of each button. You are right in assuming that the NES does not communicate the start of a frame to the controller. But also, these buttons do not need to know when the frames are. All they need to do is open and close the circuit; the software will ...


21

You may also find useful this other schematic, which I find easier to read, though some of the design details differ. It's from the NesDev wiki which is a fount of useful technical information about older Nintendo consoles. All of the chips you mention are low-level interface logic, and probably not important for your emulation. You'll need to do the same ...


20

To a certain extent you can guess the number of cycles by counting the number of memory accesses. A 2-byte instruction will take a minimum of 2 cycles because you need to read 2 bytes. If the instruction needs to read or write a data byte add another cycle. For example, a zero-page read is a 2-byte instruction, but in addition to reading the instruction ...


Only top voted, non community-wiki answers of a minimum length are eligible