2A03 Puritans Album (source code)

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

Post Reply
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

2A03 Puritans Album (source code)

Post by rainwarrior »

The 2A03 Puritans Album has just has a cartridge release, and I would like to provide the full source code for anyone that's interested in trying to build a similar project with the mapper hardware infiniteneslives has created.

Download here: http://rainwarrior.ca/projects/nes/2a03puritans.html

There is an NES ROM for download, but because it used a new custom mapper it's not currently supported by emulators. In the source code package there is an implementation of the mapper for FCEUX. It was using iNES mapper 3031 for the custom mapper, but it looks like that has been assigned since I worked on this project. If anyone has suggestions about assigning this mapper, please make them.

Feel free to ask any other questions about the source in this thread. This was a somewhat complex project combining NSFs from many sources into one large ROM, so I hope to eventually create a simpler project that's a little easier to follow.
Last edited by rainwarrior on Tue Apr 29, 2014 8:47 am, edited 1 time in total.
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: 2A03 Puritans Album (source code)

Post by zzo38 »

Can you describe the mapper?
(Free Hero Mesh - FOSS puzzle game engine)
Bavi_H
Posts: 193
Joined: Sun Mar 03, 2013 1:52 am
Location: Texas, USA
Contact:

Re: 2A03 Puritans Album (source code)

Post by Bavi_H »

zzo38 wrote:Can you describe the mapper?
2a03puritans_src.zip -> readme.txt has some info:
Mapper
======

This project required the design and implementation of a new custom mapper by infiniteneslives and rainwarrior, intended to facilitate the inclusion of one of more NSFs into a single NES cartridge.

This mapper supports up to 1MB of PRG-ROM, in 4k banks located at $8000, $9000, $A000, $B000, $C000, $D000, $E000, and $F000. Each bank is selected by n 8-bit register at $5FF8, $5FF9, $5FFA, $5FFB, $5FFC, $5FFD, $5FFE, and $5FFF, respectively, just like NSF banking. These registers are mirrored across the entire $5000-$5FFF region (the register is selected by the low 3 bits), but it is recommended to use the original addresses. The mirroring is merely a convenience for the hardware implementation.

The 8kb CHR region may be RAM or ROM. This project uses CHR-RAM, and the board used by infiniteneslives for this project may only support CHR-RAM.

At power-on, the mapper automatically sets all bits in the $5FFF bank register, placing the highest bank in $F000. This occurs on power-on but not on reset, so any bank that is mapped to $F000 after power-on should contain a valid reset vector.

At present, the project uses iNES mapper 30 to designate this mapper, but this was merely chosen because it was unused by FCUEX at the time of development. No mapper number has been officially reserved yet.
User avatar
OneCrudeDude
Posts: 276
Joined: Fri Aug 23, 2013 2:14 am

Re: 2A03 Puritans Album (source code)

Post by OneCrudeDude »

I wonder, I've had this idea to make a cartridge that contained covers of existing songs, but I'm not a programmer or musically inclined in the slightest. My idea would be to display a small "album art" picture (let's say 128*128) while it displayed composer, musician, and other information as it played. Each song would have different artwork. Additionally, it would have a crude way of visualizing what is playing (such as the square waves looking narrower for 12.5% DC, etc) as well as their hex data.

Sounds a bit complicated, but would it be possible to develop a system like that? My apologies for the slightly off topic post.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: 2A03 Puritans Album (source code)

Post by rainwarrior »

OneCrudeDude wrote:I wonder, I've had this idea to make a cartridge that contained covers of existing songs, but I'm not a programmer or musically inclined in the slightest. My idea would be to display a small "album art" picture (let's say 128*128) while it displayed composer, musician, and other information as it played. Each song would have different artwork. Additionally, it would have a crude way of visualizing what is playing (such as the square waves looking narrower for 12.5% DC, etc) as well as their hex data.

Sounds a bit complicated, but would it be possible to develop a system like that?
I did exactly that a while back. Source code is available here, but it's not a drop-in solution. You'll need to learn at least a little programming, or find someone who will help: http://rainwarrior.ca/music/moon8.html
etabeta
Posts: 109
Joined: Wed Nov 29, 2006 10:11 am
Location: Trieste, Italy

Re: 2A03 Puritans Album (source code)

Post by etabeta »

FYI latest MESS (from svn repo) supports emulation of this PCB, even if our APU emulation is not 100% accurate yet (but recent progresses on the MAME core will soon allow for some improvements)
I have followed your choice of mapper 30, of course, since it does not appear to be used...
caitsith2
Posts: 74
Joined: Mon May 26, 2008 11:41 pm

Re: 2A03 Puritans Album (source code)

Post by caitsith2 »

etabeta wrote:FYI latest MESS (from svn repo) supports emulation of this PCB, even if our APU emulation is not 100% accurate yet (but recent progresses on the MAME core will soon allow for some improvements)
I have followed your choice of mapper 30, of course, since it does not appear to be used...
You might want to move that to another unused mapper slot, as 30 has been used already, by UNROM 512. I am going to suggest moving over to Mapper 31.
etabeta
Posts: 109
Joined: Wed Nov 29, 2006 10:11 am
Location: Trieste, Italy

Re: 2A03 Puritans Album (source code)

Post by etabeta »

I stand corrected, then. I did not know about UNROM 512 :)
Let's see which mapper rainwarrior chooses...
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: 2A03 Puritans Album (source code)

Post by rainwarrior »

Okay, on CaitSith2's advice I switched it to mapper 31.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 2A03 Puritans Album (source code)

Post by tepples »

Wiki stub allocated. Do I need to make a Holy Diver Batman module for this?
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: 2A03 Puritans Album (source code)

Post by rainwarrior »

There's also an FCEUX mapper implementation included with the source code, in case it's needed for reference.
caitsith2
Posts: 74
Joined: Mon May 26, 2008 11:41 pm

Re: 2A03 Puritans Album (source code)

Post by caitsith2 »

Submitted that, in modified to mapper 31 form to the fceux svn. Also submitted a patch of my own for the mapper to bizhawk as well.
etabeta
Posts: 109
Joined: Wed Nov 29, 2006 10:11 am
Location: Trieste, Italy

Re: 2A03 Puritans Album (source code)

Post by etabeta »

updated MESS as well
Post Reply