{"id":19510299,"url":"https://github.com/maxbane/nesdev-template","last_synced_at":"2026-05-13T08:32:28.743Z","repository":{"id":141201573,"uuid":"495443577","full_name":"maxbane/nesdev-template","owner":"maxbane","description":"Simple starter template for an NES project based around the ca65 assembler, linker, and GNU Make.","archived":false,"fork":false,"pushed_at":"2022-05-23T20:10:58.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T23:49:08.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxbane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-23T14:22:56.000Z","updated_at":"2022-10-02T02:00:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0b2fcc0-d9f0-4a6f-9710-b7f62567d515","html_url":"https://github.com/maxbane/nesdev-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxbane/nesdev-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbane%2Fnesdev-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbane%2Fnesdev-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbane%2Fnesdev-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbane%2Fnesdev-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxbane","download_url":"https://codeload.github.com/maxbane/nesdev-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbane%2Fnesdev-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32974608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T06:31:55.726Z","status":"ssl_error","status_checked_at":"2026-05-13T06:31:51.336Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T23:15:27.454Z","updated_at":"2026-05-13T08:32:28.727Z","avatar_url":"https://github.com/maxbane.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nesdev-template\n\nA simple starter template for an NES project based around the ca65 assembler and\nlinker, and GNU Make. It includes:\n\n* A working Makefile that builds a stub game ready for fleshing out.\n* A simple tool for automatically generating the Makefile-compatible build\n  dependencies of each module by recursively scanning the assembly source for\n  included files; the Makefile uses this by default.\n* Simple tooling to generate character ROM binaries from PNG or XCF sprite\n  sheets as part of the make process. The `bin/bmp2nes` tools is by Damian\n  Yerrick (see copyright notice there).\n* A PPU module with working reset/control routines, an NMI handler that\n  implements a simple system for buffered writes of all key graphics data: OAM\n  data (via DMA), Nametable data (via a write log), the scroll/mask/control\n  registers. Provides routines for interacting with the buffers and NMI handler.\n* Some generic math macros derived from public domain code at 6502.org and\n  cleaned up for ca65.\n* A random number generation module adapted from Damian Yerrick's code (see\n  copyright notice in `asm/random.s`).\n* A simple controller input module (`asm/joy.s`, using \"joy\" as in \"joy stick\"\n  or \"joy pad\").\n* A main module that ties these elements together into a simple program intended\n  for NROM cartridges that displays a static graphical scene with a minimal\n  \"game loop\" and some input handling, ready to be replaced and extended.\n\n## Usage\n\nOptional prerequisite: [The GIMP](https://www.gimp.org), for building graphics\nROM data from XCF-format source assets. However, an intermediate PNG file is\nincluded in the repo in case you don't have gimp on the path.\n\n1. Fork this repo.\n2. Edit the Makefile to reflect the desired name of target iNES file, as well as\n   the locations of tools like ca65 and emulators.\n3. Run `make` to build the target iNES file; run `make mesen` to do the same and\n   run the Mesen emulator on the result.\n4. Begin modifying and extending the source code. As you add new modules, edit\n   the Makefile to include their object file names (.o) in the definition of the\n   OBJECTS variable, causing them to be linked into the target iNES file.\n\n### A note about includes and graphics\n\n`.include` statements in your ca65 assembly code are automatically detected so\nthat make knows which other files (usually .inc) the module object (.o file)\ndepends on.\n\n`.incbin` statements are also detected and mark binary files as\ndependencies of the module.\n\nMake will attempt to create dependencies that don't exist (or are out of date)\nif it knows how, and the Makefile includes rules for creating binary CHR data\nfrom PNGs, and PNGs from Gimp XCF files. Therefore it is only necessary to put\nan XCF file `foo.xcf` in your repo as the \"source\" asset for some graphics, then\n`.incbin foo.chr` in your assembly code, and Make will automatically determine\nthat it can satisfy the need for `foo.chr` by creating `foo.png` from `foo.xcf`\nand then `foo.chr` from `foo.png`, and that it must do so before assembling the\nmodule. See the example graphics files (`chr/*.xcf`) for the pixel layout and\ncolor format conventions expected by the graphics conversion tools.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxbane%2Fnesdev-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxbane%2Fnesdev-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxbane%2Fnesdev-template/lists"}