From fdf44365e56c3741f47cbd421a57f0d074a5492c Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 23 Jan 2025 16:14:12 +0100 Subject: fx: Provide an example of PPU bank switching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- fx/README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'fx/README.md') diff --git a/fx/README.md b/fx/README.md index 746e922..e7194dc 100644 --- a/fx/README.md +++ b/fx/README.md @@ -1,4 +1,12 @@ -TBD +## Effects by bank switching on CHR-ROM -- Animating through CHR bank switching (a la Megaman 5 with MMC3) -- Shrinking a sprite rendered through CHR-RAM +Some games like Megaman 5/6 performed some subtle background effects by +performing bank switching on the PPU thanks to the capabilities of the MMC3. +That is, the trick is to devote at least two similar 1KB chunks where one +contains a subtly changed version of the other. This way, you can simply perform +a periodic bank switch and the PPU will render subtly different things every +time, without the CPU having to dedicate any resources on changing any values on +the data. + +A very simple example is provided in [blink.s](./blink.s) where a character +blinks periodically. -- cgit v1.2.3