From 96b5af8c4e058f2d55a80add3208cfe4b02c453b Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 20 Mar 2025 18:04:34 +0100 Subject: Provide better wording on disabling decimal mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- basics/sprite.s | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'basics/sprite.s') 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 -- cgit v1.2.3