32

Here's a selection of Game Boys I've dug out from my drawer: The original Game Boy displays a solid black rectangle (and a ®) which scroll down from the top of the screen, in the same way that the Nintendo logo would if a cartridge were inserted. This image remains on the screen until the Game Boy is switched off. (Note the difference with the picture of ...


31

Gameboy games use a CR2025 battery which over the years eventually dies stopping games from saving and causing previously saved games to disappear. Note however while the game is powered you can still save, however once you power down the save will be gone. In order to replace the battery you must open up the cartridge with a 3.8mm screwdriver security bit. ...


20

ROM and RAM bank switching is controlled by a memory bank controller present on the cartridge. By writing values to areas of read-only memory, a game or program is able to specify which ROM banks to access when read operations are performed. The simplest cartridges simply contained ROM and had only had 32 KBytes of space. It is mapped directly to $0000-$...


20

Firstly, the stretching isn't done in the vertical direction: Game Boy (and Color) games only used 144 rows of the 160 available on Advance screen, so there'd be black "letterbox" bars at the top and bottom, whether you stretched the image widescreen (with the shoulder buttons) or not. Horizontally, the image is definitely stretched. If the Advance had ...


19

To complement the previous answer on why this happens, the Game Boy contains a very small ROM that is executed by the CPU before running the cartridge. One of its routines include checking if the cartridge contains a Nintendo logo (Nintendo used this as a way of controlling game distribution by use of trademark law). Then another routine checks if the ...


18

Overflow doesn't mean what you think. That flag exposes the internal ALU carry from bit 6 -> bit 7. It's needed when you are handling the most significant byte of a 2-complement number, because you can't use the carry for that purpose here: it's jumbled by the MSB sign bit. When you don't add or subtract 2-complement numbers (MSB isn't meant as sign bit but ...


18

I cannot speak about Pokémon in particular, but as a programmer for ~30 years, I'll answer thus: either laziness, incorrect assumption, or surprise. Laziness After an operation that overflows, you need to write extra code to check for the overflow, and then decide what to do about it. That's extra time, and extra work. Incorrect assumption (Often ...


15

Gameboy games use CR2025 battery, which will die and take all the data with it: It's lost for good. Saved games back in those days were preserved through the use of a battery right in the game pack, not stored on the gaming device itself like it is today. And when that battery dies, so does the saves with it. It's not about corruption of the save or ...


15

Technically, the behaviour is what we call "undefined,"* meaning you can't know what will happen and the system is allowed to do anything it wants in response, up to and including launching a nuclear attack on another country. That, of course, is highly unlikely (or you clearly got your hands on a Game Boy you should not have). The most likely scenario in ...


12

None of the GameBoy series machine has a Z80, but instead a Sharp LR35902, which runs a "GBZ80" instruction set, which is if I'm not mistaking similar but incompatible with the genuine Z80, as it lacks the two registers sets (much like the 8080) and other instructions. Just like the 2A03 in the NES, the CPU is in the same chip as the sound generation ...


10

I think your premise is wrong. Firstly "overflow" in most cases doesn't mean pure arithmetic overflow, it means overflow of some other limit, checking said limits would require more than a single extra instruction. Secondly in many of the glitches involving overflow the overflow is a secondary part of the glitch. Using a rare candy on a level 255 pokemon ...


10

A direct connection is not going to work - The Gameboy's pixel clock is much too low to drive a VGA screen: GameBoy VGA Pixel clock 4 MHz 25 MHz V-Sync 60 Hz 70 Hz H-Sync 9 kHz 31 kHz So, in a nutshell, this will not work without a significant investment into capturing the GBA ...


10

According to Gameboy [sic] Development Wiki page The Cartridge Header, locations 0x104 through 0x133 in the cartridge contain a bitmap of the Nintendo logo that's displayed when the Game Boy is turned on. (Presumably that's the "Nintendo®" text/logo shown in this video.) After booting and displaying the logo, these data are checked by the GB (the first 0x18 ...


10

This is what a GameBoy Pocket does: Two black blobs (and an ®) slowly descend from the top and come to rest half way down the screen. Taken from the (somewhat interesting) video, What it looks like when you turn on a game boy without a game. Other GameBoy versions (DMG, GBC) differ in behaviour, as Kaz's answer demonstrates.


9

Address Decoding Any computer system (including video game consoles) with more than one memory device needs hardware (usually) external to the CPU to determine which device to access for any particular address. This process is called address decoding. In the simplest case this could be a single device that looks at the address and makes the decision this ...


9

Depending on how bad the corrosion is, various techniques can work. First, just try plain old water (or better yet, isopropyl alcohol) and a cotton bud - on the cartridges and the Game Boy itself. Failing that, try the same technique with distilled (white) vinegar. If all else fails - very carefully rubbing with a fine-grit sandpaper can help to remove ...


9

Calling it a "memory range" is incorrect - and possibly what is leading you astray. The entire range 0000-FFFF is called the "address range" of the CPU - you can write a CPU instruction (or three) that can access a bit, byte or word at any of those addresses. What the hardware does with that access depends on what hardware is "at" that address. The first ...


8

I have seen this happen on several Nintendo systems: Back in the days of the G&W games, they were putting a rather thick polarizing layer in front of the LCD screen and not gluing it. At some point, they started to use thinner films and then glue them to the screen and, in some cases, the glue produces some gas and it can bubble. I am not sure why it ...


8

The code for the decompression system has been decompiled and partially commented here. Essentially the compression used is a form of run-length encoding, with a few modifications to make it more efficient for Gameboy graphics. The main improvement is that graphics are split into bitplanes rather than being compressed as single bitmaps. That is, each pixel ...


8

According to the Iwata Asks for G/S, Iwata created compression tools for the graphics in G/S (as well as other parts of other Pokémon games). Morimoto: What's more, there were the tools for compressing the Pokémon graphic code… Iwata: Ah yes, the compression tools. Morimoto: You were kind enough to create those tools. Iwata: Yes. (...


7

The Wikipedia comment is misleading. The Game Boy CPU has several components in one chip, including the Z80-alike CPU core and a sound generator among others. These components may all be in the same chip but they are functionally independent; you don't need the Z80 CPU to be able to produce audio. The Nintendo DS inherited the Game Boy sound generator ...


7

Build it on a Linux VM of the era. The tools will probably expect command lines of GCC of the time, as well as libraries current at that time. I'd say something like Debian 2.0 or Redhat 7 (not RHEL!) should be OK.


7

There are cart readers available for virtually any type of cartridge, including Game Boy, that will allow you to hook it into your computer to be read. Modern ones, like the Gen3 Reader/Writer (supports GB/GBC/GBA) use USB to connect with a PC and also allow you to flash your own blank carts for homebrew software. Alternately, you could also rig one up ...


7

Generally, the RAM wouldn't respond to reads or writes (obviously). Writes would be discarded, the CPU moves on. Reads would return 0xFF if the cart leaves the lines floating, though 0x00 is a possibility. There's also the chance that a particular memory mapper that's actually its own processor could hang, with results similar to yanking out the cart. As far ...


6

Tetris didn't have any sort of save state for the high scores. According to this list, it appears that the high scores were effectively reset each time the Gameboy was powered off. It's not that there's some sort of save device in Tetris itself or the Gameboy that's broken, it's simply not designed to save the high scores. The Gameboy itself has no usable ...


6

However, looking at some of the opcodes they don't seem compatible. There's your answer. The LR35902, the Z80 and the 8080 really are different CPUs. They are similar in many ways, such as the register set and much of the programming model. The Z80 does not have the HL postdecrement addressing mode you're talking about, and some things the Z80 has the ...


5

According to the source you linked: The value written to bits marked with '-' has no effect. Reference to the value in a register means the last value written to it. However, it wouldn't surprise me if those registers are actually open bus -- instead of the last value written to that register, it could be the last value written to any register.


5

I developed few game on the GBA back in the days and I remember that I looked into using the Z80 but found nothing in the official documentation. Even if possible, it is an unsupported feature and therefore I doubt that any Nintendo approved game uses it.


4

In principle, there's certainly no reason it isn't possible. The BCM2385 on the Raspberry Pi model 1 has 45 GPIO pins (you'll need 32 to interface with the Gameboy cartridge bus) that are (apparently) designed to operate at 125MHz (although the partial datasheet cautions that they may not run that fast when driving high capacitance outputs ... but you'll ...


4

Those "memory locations" are not used for anything; they don't exist. The addresses exist, of course, becuase the CPU can generate them, but there's no RAM there. Though you access these addresses as if you were talking to a RAM device, by reading and writing memory locations, remember that that's not actually what's happening. Instead you're talking to a ...


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