Skip to content

pinobatch/snrom-template

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

Extended support for Windows 8.1 ends on Tuesday 2023-01-10.
Now that Windows 10 is the oldest supported Windows version, and its
Notepad supports UNIX newlines,  we no longer single out Notepad.
bdfbd96

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
December 26, 2022 21:39
November 15, 2016 19:54
November 15, 2016 19:54
April 6, 2019 12:42
December 26, 2022 21:39
November 16, 2016 20:45
November 16, 2016 20:45
November 16, 2016 20:45
November 16, 2016 20:45
November 16, 2016 20:45

IF THIS FILE HAS NO LINE BREAKS: View it in a web browser.
(Some text editors do not understand UNIX-style line breaks.)

SNROM template

Screenshot: a figure in a red vest and newsboy cap scooting on his hands and bottom on a ground of grass and dirt between two yellow crates

This is a minimal working program for the Nintendo Entertainment System using the SGROM, SNROM, UNROM, or UOROM board. It assumes familiarity with nrom-template.

Additional concepts illustrated:

  • initializing the MMC1
  • loading tile data into CHR RAM
  • calls from one PRG bank to another

Setting up the build environment

Building this demo requires cc65, Python, Pillow, GNU Make, and GNU Coreutils. For detailed instructions to set up a build environment, see nrom-template.

Organization of the program

Include files

  • nes.inc: Register definitions and useful macros
  • global.inc: Global variable and function declarations

Source code files

  • mmc1.s: iNES header and driver for MMC1
  • unrom.s: iNES header and driver for UNROM/UOROM
  • init.s: PPU and CPU I/O initialization code
  • main.s: Main program
  • bankcalltable.s: List of entry points called through a far call (one that goes from one bank to another)
  • chrram.s: CHR RAM data setup
  • bg.s: Background graphics setup
  • player.s: Player sprite graphics setup and movement
  • pads.s: Read the controllers in a DPCM-safe manner
  • ppuclear.s: Useful subroutines for interacting with the S-PPU

Greets

  • NESdev Wiki and forum contributors
  • FCEUX team
  • Joe Parsell (Memblers) for getting me into NESdev in the first place
  • Jeremy Chadwick (koitsu) for more code organization tips

Legal

The demo is distributed under the following license, based on the GNU All-Permissive License:

Copyright 2011-2016 Damian Yerrick

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved in all source code copies. This file is offered as-is, without any warranty.

About

NES UNROM, UOROM, SGROM, SNROM project template for ca65 assembler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published