diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-03-20 18:04:34 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-03-20 18:04:34 +0100 |
| commit | 96b5af8c4e058f2d55a80add3208cfe4b02c453b (patch) | |
| tree | 0e61eee07841f8a35035fc84ae2597acd242c7cc | |
| parent | b21e3d2588749568c777a84435905bef110f3479 (diff) | |
| download | code.nes-96b5af8c4e058f2d55a80add3208cfe4b02c453b.tar.gz code.nes-96b5af8c4e058f2d55a80add3208cfe4b02c453b.zip | |
Provide better wording on disabling decimal mode
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
| -rw-r--r-- | basics/sprite.s | 19 | ||||
| -rw-r--r-- | scroll/include/background.s | 2 |
2 files changed, 13 insertions, 8 deletions
diff --git a/basics/sprite.s b/basics/sprite.s index 27beb91..569ba28 100644 --- a/basics/sprite.s +++ b/basics/sprite.s @@ -95,13 +95,18 @@ ;; main idea is to leave the hardware in a known state and then jump into the ;; main game subroutine. .proc reset - ;; We first instruct the NES to disable everything. That is, we don't want - ;; any pesky interrupt to make us jump into the `nmi` section, for example, - ;; before we have configured everything. - - ;; Ignore IRQs and disable decimal mode (the NES 6502 chip, for copyright - ;; issues or legal reasons against MOS that I don't fully know nor care, - ;; does not have decimal mode anyway, but it's considered good practice). + ;; We first instruct the NES/Famicom to disable everything. That is, we + ;; don't want any pesky interrupt to make us jump into the `nmi` section, + ;; for example, before we have configured everything. + + ;; Ignore IRQs and disable decimal mode. The CPU for the NES/Famicom was + ;; developed by Ricoh and it is a modified MOS 6502 processor which, besides + ;; adding the APU, also removed the decimal mode from the original MOS 6502 + ;; processor. The latter was done for obscure reasons (e.g. copyright + ;; shenanigans). You can read more about the processor's specifics here: + ;; https://www.nesdev.org/wiki/CPU. All of that being said, it's considered + ;; good practice to disable decimal mode anyways, and games like Super Mario + ;; Bros. followed this practice as well. sei cld diff --git a/scroll/include/background.s b/scroll/include/background.s index e637380..c4a5345 100644 --- a/scroll/include/background.s +++ b/scroll/include/background.s @@ -29,7 +29,7 @@ ;; The offset for metatile rows. That is, from where should the engine start ;; counting rows of metatiles. By default it's 0, but it could be set to - ;; something else to reserve so top space for a HUD or something similar. + ;; something else to reserve top space for a HUD or something similar. ;; ;; NOTE: configurable. .ifndef BACKGROUND_ROW_OFFSET |
