Skip to content

Commit

Permalink
style: render raster images/screenshots as pixelated (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
avivace committed Dec 13, 2023
1 parent fc748ce commit 695b3ff
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions custom/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ code {
font-weight: 500;
}

.pixelated {
-ms-interpolation-mode: nearest-neighbor;
image-rendering: crisp-edges;
image-rendering: pixelated;
}

.header {
font-weight: 600;
}
Expand Down
2 changes: 1 addition & 1 deletion src/History.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Pan Docs - also known as `GAMEBOY.TXT` or `GBSPEC.TXT` - is an old document dating back to early 1995, originally written by *Pan of Anthrox*. It has been one of the most important references for Game Boy hackers, emulators and homebrew developers during the last 25 years.

<p align="center">
<img src="https://raw.githubusercontent.com/gbdev/pandocs/master/historical/1995-Jan-28-ATX-GBI/ADDRESS1.png">
<img class="pixelated" src="https://raw.githubusercontent.com/gbdev/pandocs/master/historical/1995-Jan-28-ATX-GBI/ADDRESS1.png">
<br>
<i>ADDRESS1.PCX, one of the diagrams attached to the first version, released January 28th, 1995</i>
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/MBC5.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ As for the MBC1s RAM Banking Mode, writing a value in the range $00-$0F
maps the corresponding external RAM bank (if any) into the memory area at
A000-BFFF.

![](imgs/MBC5.png "imgs/MBC5.png")
<img class="pixelated" src="imgs/MBC5.png">

### Rumble

Expand Down
4 changes: 2 additions & 2 deletions src/OAM.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ four bytes with the following meanings:

## Byte 0 — Y Position

![Interpretation of object Y coordinates](imgs/Objects_vertical_position.png)
<img class="pixelated" src="imgs/Objects_vertical_position.png" alt="Interpretation of object Y coordinates">

Y = Object's vertical position on the screen + 16. So for example:

Expand Down Expand Up @@ -108,7 +108,7 @@ differently when in CGB mode.
- **In CGB mode**, only the object's location in OAM determines its priority.
The earlier the object, the higher its priority.

:::tip Interaction with "BG over OBJ" flag
::: tip Interaction with "BG over OBJ" flag

Object drawing priority and ["BG over OBJ"](<#BG Map Attributes (CGB Mode only)>) interact in a non-intuitive way.

Expand Down
8 changes: 4 additions & 4 deletions src/Power_Up_Sequence.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ The boot ROM picks a compatibility palette using an ID computed using the follow
The resulting palettes ID is used to pick 3 palettes out of a table via a fairly complex mechanism.
The user can override this choice using certain button combinations during the logo animation; some of these manual choices are identical to auto-colorizations, [but others are unique](https://tcrf.net/Notes:Game_Boy_Color_Bootstrap_ROM#Manual_Select_Palette_Configurations).

:::tip Available palettes
::: tip Available palettes

A table of checksums (and tie-breaker fourth letters when applicable) and the corresponding palettes can be found [on TCRF](https://tcrf.net/Notes:Game_Boy_Color_Bootstrap_ROM#Assigned_Palette_Configurations).

Expand Down Expand Up @@ -161,7 +161,7 @@ While it may make sense for the boot ROM to at least partially verify the ROM's

### Legal implications

:::danger Caution
::: danger Caution

The following is advisory, but **is not legal advice**.
If necessary (e.g. commercial releases with logos on the boxes), consult a lawyer.
Expand All @@ -178,7 +178,7 @@ Fortunately, [*Sega v. Accolade*](https://en.wikipedia.org/wiki/Sega_v._Accolade

That said, if you want to explicitly mark the lack of licensing from Nintendo, you can add some text to the logo screen once the boot ROM hands off control, for example like this:

![Mockup screenshot of an endorsement disambiguation screen](imgs/not_licensed.png)
<img class="pixelated" src="imgs/not_licensed.png" alt="Mockup screenshot of an endorsement disambiguation screen">

### Bypass

Expand All @@ -197,7 +197,7 @@ Strangely, despite correcting the TOCTTOU vulnerability in its later revision, t
Regardless of the console you intend for your game to run on, it is prudent to rely on as little of the following as possible, barring what is mentioned elsewhere in this documentation to detect which system you are running on.
This ensures maximum compatibility, both across consoles and cartridges (especially flashcarts, which typically run their own menu code before your game), increases reliability, and is generally considered good practice.

:::warning Use it at your own risk
::: warning Use it at your own risk

Some of the information below is highly volatile, due to the complexity of some of the boot ROM behaviors; thus, some of it may contain errors.
Rely on it at your own risk.
Expand Down
2 changes: 1 addition & 1 deletion src/Scrolling.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The Window is visible (if enabled) when both coordinates are in the ranges
WX=0..166, WY=0..143 respectively. Values WX=7, WY=0 place the Window at the
top left of the screen, completely covering the background.

:::warning Warning
::: warning Warning

WX values 0 and 166 are unreliable due to hardware bugs.

Expand Down

0 comments on commit 695b3ff

Please sign in to comment.