Last active
July 10, 2023 18:24
-
-
Save zorchenhimer/b5e1f30feb082f5a920c6b7e7a072b13 to your computer and use it in GitHub Desktop.
Revisions
-
zorchenhimer revised this gist
Jun 28, 2019 . 1 changed file with 5 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -73,13 +73,10 @@ nes │ ├── README.md │ └── [...] └── tools └── cc65 ├── bin │ ├── ca65 │ ├── ld65 │ └── [...] └── [...] ``` -
zorchenhimer revised this gist
Apr 8, 2019 . 1 changed file with 4 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,16 +31,13 @@ $ cd cc65 && make && cd .. Compiling cc65 may take a little while. ### Go A few utilities are written in Go and are incorperated into the build process. These utilities are usually built when needed and include things like `bmp2chr` and `generate-credits`. Download and install Go from here: https://golang.org/dl/ If you run linux, your distribution may have Go in it's package repository. The most recent version of Go is usually required (v1.12 as of this writing). ## Ready to build -
zorchenhimer created this gist
Jan 10, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,88 @@ # Setting up a NES Build environment This setup will allow you to assemble the NES projects I've got up on GitHub. ## Requirements - [GNU Make](https://www.gnu.org/software/make/) - [Git](https://git-scm.com/) - [Go](https://golang.org/) ## Setting up dependencies Make a folder somewhere for all this stuff to go. Something like `C:\nes` (or `~/nes` if on Linux). All of the following commands should be run from the command line in the folder you create. All dependencies will be put into a subfolder: ``` $ mkdir tools ``` ### cc65 If you're on Windows you can grab the release snapshot from their SourceForge instead of compiling from source: [cc65-snapshot-win32.zip](https://sourceforge.net/projects/cc65/files/cc65-snapshot-win32.zip) For linux, or if you want to compile from source on Windows: ``` $ cd tools && git clone https://github.com/cc65/cc65.git $ cd cc65 && make && cd .. ``` Compiling cc65 may take a little while. ### ld65-labels This is an over-engineered label post-processor that I wrote to put the debugging symbols into a format that can be imported into FCEUX and Mesen. The changes that I make with this tool may be incorporated into the emulator I use at some point. At which point this tool will probably be removed from the build process. ``` $ git clone https://github.com/zorchenhimer/ld65-labels.git $ cd ld65-labels && go build ``` ## Ready to build At this point you should be able to assemble my various NES projects by typing `make` in the correct source directory. For instance, to assemble [nes-pong](https://github.com/zorchenhimer/nes-pong) run these commands, starting in the top-level `nes` folder: ``` $ git clone https://github.com/zorchenhimer/nes-pong.git $ cd nes-pong $ make ``` After `make` finishes you should have a `bin/` folder inside the `nes-pong` folder which will contain the rom file `pong.nes`. The directory structure should look like this: ``` nes ├── pong │ ├── bin │ │ ├── pong.labels │ │ ├── pong.lst │ │ ├── pong.mlb │ │ ├── pong.nes │ │ ├── pong.nes.0.nl │ │ ├── pong.nes.db │ │ ├── pong.nes.map │ │ ├── pong.nes.ram.nl │ │ └── pong.o │ ├── LICENSE.txt │ ├── Makefile │ ├── pong.asm │ ├── pong.chr │ ├── README.md │ └── [...] └── tools ├── cc65 │ ├── bin │ │ ├── ca65 │ │ ├── ld65 │ │ └── [...] │ └── [...] └── ld65-labels ├── ld65-labels └── [...] ```