aboutsummaryrefslogtreecommitdiff
path: root/shared
Commit message (Collapse)AuthorAgeFilesLines
* Add the sound/beep.s exampleMiquel Sabaté Solà2026-04-104-0/+36
| | | | | | | | This is the most simple example you can come up when it comes to producing sound on the NES/Famicom. Basically, a single note is delivered to the APU which is continuously on. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Clarify on how nametables are to be initializedMiquel Sabaté Solà2026-04-071-1/+1
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* shared: Bring joypad into a proper styleMiquel Sabaté Solà2025-03-112-65/+53
| | | | | | | Put functions inside of the scope, avoid useless fallthroughs and be more realistic on what is needed from elsewhere. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Small code style cleanupsMiquel Sabaté Solà2025-03-111-3/+3
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Provide an example on multiscreen scrollingMiquel Sabaté Solà2025-03-101-0/+22
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* shared: Add utilities for clearing screensMiquel Sabaté Solà2025-03-071-0/+39
| | | | | | | | | | | | | These are quite mindless, but they are rather useful on simple examples in which we don't care about performance and we just want to show something on the screen. For now this didn't matter much, but on real hardware I was able to reproduce the same glitches as with emulators which randomized memory on both the CPU memory and on the PPU. Hence, just allow some examples to manually reset these regions and avoid silly graphical glitches. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* scroll: Implement a roulette-like gameMiquel Sabaté Solà2025-02-042-3/+14
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* fx: Provide an example of PPU bank switchingMiquel Sabaté Solà2025-02-041-0/+23
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add a way to safely read from controllersMiquel Sabaté Solà2025-02-041-40/+68
| | | | | | | | | First of all, move some reading utilities into the new `shared` directory, so controllers can be read by more than one example. Second, even if we keep the example on `basics/input.s` simple, let's provide a safe alternative for the other examples. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
* basics: Add a flickering exampleMiquel Sabaté Solà2025-02-042-0/+151
Add an example on how to flicker sprites so to not surpass the scanline limit for them. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>