| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
| |
This example just repeats a scale of notes over and over.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
| |
This is an iteration over the sound/beep.s example, but it covers three
channels instead of just square 1. Moreover, you can use the joypad to
select which channel you want to hear and, of course, you can combine
them all at will.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
| |
This was an oversight from the very first example that has propagated
into the other ones.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
| |
That is, just toggle between two fixed nametables.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
| |
After digging deeper into this good ol' machine, I've found that there
are better ways to explain some of the basic things, or things that
seemed easy but came back to bite me.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
| |
Be more careful on everything and try to follow along style.nes from my
repository. This might change in the future, but it's in a much better
state now.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
| |
At least on the MMC3 chip, it's important to have background tiles on
the first pattern table and then sprite tiles on the second pattern
table. This avoids a hardware bug on scanline IRQs.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's a pity that cl65 allows macros to be written inside of scopes while
their usage is only possible from the global scope. Hence, by allowing
programmers to write macros inside of scopes, it feels like 'cc65' is
actually lying to programmers. 'nasm' double downs on this by simply
refusing to assemble such a case, which is the sensible thing to do if
it's not allowed anyways.
Long story short, macro statements have to be written in the global
scope and so this commit moves the READ_CONTROLLER one from the `space`
example globally.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
| |
Otherwise we will get a warning from nasm.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
| |
Moreover, I have introduced a linker configuration for MMC1 as well, so
to properly implement the `basics/persist.s` example.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
| |
This also involves moving the target for the `space` example to the
general Makefile. The Makefile is not as clear as I'd like, but at least
it's not a mess (yet).
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
| |
This includes more clear explanations, images, etc.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
| |
|
|
|
|
| |
Moreover, add a simple fix to the CI.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
| |
|
|
|
|
|
| |
This is still work in progress but at least there's some basic structure
to it.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
| |
|
|
|
|
| |
Hopefully the path is now more clear.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
| |
|
|
|
|
|
|
|
| |
Originally this was supposed to be a sort of mini game, but that would
have probably made it too complex for newcomers. Thus, let's just keep
it to subpixel movement and shooting bullets, which is already a big
step from the `basics/sprite.s` example.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
| |
|
|
|
|
|
| |
Add more comments to `sprite.s` and `persist.s` so they can be read by a
newcomer, and also introduce a README for this directory.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
| |
|
|
|
|
|
|
| |
Let's divide things by topic instead of a broad "examples" directory.
This will allow for simple files to co-exist together with full-blown
projects.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
| |
|
|
|
|
|
| |
This is way better documented. Moreover, the `input.s` example has been
further simplified.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|
|
|
Add the basic structure and the first example: managing controller
input.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
|