aboutsummaryrefslogtreecommitdiff
path: root/basics/sprite.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2023-11-01 09:20:03 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-02-04 20:59:14 +0100
commit988332816972638adfa8000dd7e1a474c5fea424 (patch)
tree9f5589df5652ce9f8b40b681cbe1b78a7a020646 /basics/sprite.s
parentc22ea7b25d8949f1c6266208eeb027d0350a54a7 (diff)
downloadcode.nes-988332816972638adfa8000dd7e1a474c5fea424.tar.gz
code.nes-988332816972638adfa8000dd7e1a474c5fea424.zip
basics: Improve documentation
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>
Diffstat (limited to 'basics/sprite.s')
-rw-r--r--basics/sprite.s9
1 files changed, 4 insertions, 5 deletions
diff --git a/basics/sprite.s b/basics/sprite.s
index ac68d7f..09dd8e5 100644
--- a/basics/sprite.s
+++ b/basics/sprite.s
@@ -49,9 +49,8 @@
;; The previous are the mandatory bytes in order to get a "cartridge" going.
;; After this there are some other bytes you can put into the header, like
- ;; if the "cartridge" counts on a battery-backed RAM-mapped section to save
- ;; states (e.g. The Legend of Zelda) or rare flags like specifying the
- ;; region (NTSC vs PAL), but for now this falls out of my radar :-)
+ ;; specifying the region (NTSC vs PAL), but for now this falls out of my
+ ;; radar :-)
;;;
;; This is the segment where we tell the processor where to find the code for
@@ -422,8 +421,8 @@ palettes:
;; offset for the first element was $00C8, which added to the base address
;; of $2000 (start of the first nametable), gives us the address $20C8.
;; Therefore, if I want this background element to be rendered in the
- ;; position I envisioned on this tool, I need to write $20C8 into PPUADDR
- ;; (NOTE: these are a total of two bytes to be loaded, for operations that
+ ;; position I envisioned on this tool, I need to write $20C8 into PPUADDR.
+ ;; NOTE: these are a total of two bytes to be loaded, for operations that
;; only support one byte at a time. Hence, we have to load byte by byte (in
;; little-endian format) and store them. As for the PPUDATA address, I need
;; to pass #$02 because that's the index inside of the CHR file of the star