From 8fe0ee28b0c1220dd5b598e38e5c8e659c44e58e Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 10 Feb 2025 22:33:25 +0100 Subject: Add some comments on managing assets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 144c28e..666de45 100644 --- a/README.md +++ b/README.md @@ -466,6 +466,17 @@ will always be placed in the global scope. For this reason you should always write `.macro` statements in the global scope as embedding them into `.scope` or `.proc` is simply misleading. +# Managing assets + +## Order of pattern tables + +The NES/Famicom is quite open on which pattern table you are using for +background tiles and which for sprite tiles. That being said, prefer using +background tiles for the first pattern table and sprite tiles for the second +pattern table. This is because some mappers like MMC3 have some [IRQ +quirks](https://www.nesdev.org/wiki/MMC3#IRQ_Specifics) that can be avoided by +following this order. + # Project layout This is a tough cookie and it mostly boils down to how your game is structured. @@ -516,6 +527,16 @@ That being said, don't go over the top. Certainly a function like `reset` can be quite similar in many games, but some might need specific tweaks for specific mappers, for example. Having a myriad of `.ifdef` or similar is not desirable. +## Assets + +Leave your assets into a specific directory named `assets` or similar. That is, +do not put `.chr` files in the same directory as code or at the root of your +project. + +Moreover, some tools like [NEXXT](https://frankengraphics.itch.io/nexxt) will +save a `session.nss` file to your `assets` directory. Do not remove it nor ignore +it via git, as it will help you everytime you go back to your `chr` files. + # License This work is licensed under