Skip to content

Mapper 28 (Action 53) version of Witch n Wiz; 2nd place winner of the 2020/21 nesdev competition.

License

Notifications You must be signed in to change notification settings

mhughson/mbh-A53-witchnwiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Witch n' Wiz Action53 NESDev Compo 2020/21 Edition

This is the version of Witch n' Wiz (www.witchnwiz.com) that was entered into the NESDev competition in March 2021, and won 2nd place. It is not the full retail version of the game released in November 2021.

My goal is to provide this as a starting point for other NESDev coding works in C, who want to make a nesdev compeition entry requiring Mapper 28 compatibility.

However, targetting Mapper 0 (NROM) is by far the simplest approach if you are new to NES development. The downside is you will be limited in terms of ROM size.

nes2_nesdev_title

For the NESDev Competition, entries must be compatible with the Action 53 Mapper (Mapper 28), which may not be straight forward depending on you technical backround. Witch n' Wiz was targetting Mapper 1 (MMC1) prior to the competition, and the transition was not straight forward for me. My hope is that this project can be a starting point for others wanting to create NES games in C for the compo.

nes2_nesdev_shortgameplay_loop_small

Credits (beyond actual game credits)

  • Shiru (neslib, famitone)
  • nesdoug (nesdoug library)
  • norill (donut integration, and general Mapper 28 support)
  • JRoatch (donut compression library)

Compiling

Windows

It requires Python to be installed and for the "python" command to work. You can test this by opening command prompt and simply typing "python" without quotes. If this is unrecognized, you need to install Python.

How to build:

  1. In VSCode open root folder of project.
  2. Press Ctrl + Shift + B to open the "Built Task to Run" prompt.
  3. Select "Build All". This will build all aspects of the game (music, sound, art, code).
  4. ROM will be found in "game/BUILD/main.nes"

I recommend that you associate ".nes" files with your prefered emulator. This will allow you to use the "Build & Run" commands to automatically open the game after building.

image

Linux

The script game/compile_master.sh does the job. It depends on python, cc65, and wine.

$ cd game/
$ ./compile_master.sh

Things of Note

  1. The Root directory is almost entirely the compiler for the game (CC65 toolchain). The game itself can be found in the "game" sub-directory.
  2. Compiling the project happens in compile_master.bat.
  3. CHR data is split arcross multiple banks (chrrom_bank0.chr, chrrom_bank1.chr, ...).
  4. You can add addtional banks of CHR in compile_master.bat.
  5. Code is also spread across multiple banks named game/PRG0.c, PRG1.c, ...
  6. game/main.c is the fixed bank.
  7. Bank layout from the MMC1 version of the game to the Action53 version changed, and to make things simple I just redefine what each bank number actually maps to here: https://github.com/mhughson/mbh-A53-witchnwiz/blob/master/game/main.h#L171