GithubHelp home page GithubHelp logo

nesizer2's Introduction

alt text

NESizer2: 2A03 Synthesizer Project

Join the chat at https://gitter.im/Jaffe-/NESizer2

alt text

The main idea of this project is to use an isolated NES 2A03 CPU/APU IC as a stand-alone synthesizer, controlled by an Atmel Atmega microcontroller. (The project is named NESizer2 after a failed attempt to create a NES synthesizer using only the 2A03 alone, with its own ROM, RAM and I/O logic.)

The 2A03 IC consists of a 6502 CPU core (with some minor changes), a DMA controller and the Audio Processing Unit. The APU is controlled via 22 registers, which are connected internally to the 6502 only; there are no external input pins facilitating communication with the APU directly. This means that in order to control the APU, the 6502 must act as a proxy: The microcontroller must send the 6502 instructions to take a value and put it in a desired APU register.

This project is inspired by a similar approach taken here: http://www.soniktech.com/tsundere/, but the idea here is to have the microcontroller communicate more directly with the 2A03, with a minimum of circuitry to do so.

Check out the most recent demo here!

See the ocumentation for a description of how the NESizer works:

nesizer2's People

Contributors

beau-seidon avatar gitter-badger avatar jaffe- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nesizer2's Issues

BOM Inquiry

First, this project is amazing, and thank you for sharing it.

I'm prepping to build one right now, and I just sent the 2 PCB's to be manufactured (with a red upper and blue lower board like Super Mario's clothes, see attached pic!).

My question is this: in the BOM, IC13 component DS1210 has no quantity, is it no longer required?
I noticed that in the last hardware.md commit (8 years ago, wow) you removed references to DS1210.
I compared the before and after, and see that a transistor switch circuit keeps the SRAM powered now instead, but DS1210 is still on the BOM. Is this just for reference / historical purposes?
I also see there is still an IC13 footprint by the battery.

It is discontinued from Mouser but there is an equivalent replacement. If I don't need it, I'll save 10 bucks.

Screenshot 2023-05-26 002712

How can I compile the sources

HI,

with with compiler do you compile the project.
There is no Project description in the src folder.
I try code from microsoft but it did not compile without errors.

Chris

Midi CC integration

I already have this implemented on a branch and need to run a few more tests on it before I make a PR. Just creating an issue so that it can be tracked for any bugs.

A recent update is causing a compile error:

There was a recent update in sample.c that is causing a compile error:

sample/sample.o: in function `.L22':
sample.c:(.text.allocate_block+0x176): relocation truncated to fit: R_AVR_7_PCREL against `.L9'
collect2: error: ld returned 1 exit status

This line

Documentation sample code does not compile

Hi! First of all, I wanted to say thank you for the tremendous work you've done and the effort you've put into documenting the project. I've been working on reverse-engineering the project to make a cut-down version (mostly no RAM or front panel) and your documentation and comments have made this task much easier than it would have been otherwise.

That said, the sample code in software.md does not currently compile. I believe it alludes to an older version of the code that had separate functions for each channel. From my understanding, I believe that this is the minimum amount of code required to produce a noise:

main() {
        bus_setup();
	io_setup();
        apu_setup();
    
	sq_setup(0, &sq1);

	sq1.period = 400;
	sq1.duty = 2;
	sq1.volume = 15;

	sq_update(&sq1);

	apu_refresh_channel(CHN_SQ1);

	while(1){}
}

I somehow killed the 2A03 that I was working with (oops), so I can't confirm that this does produce a sound. In my mind, bus_setup() is required because it sets up the bus pins that allow writing to the register that feeds the 2A03. Similarly, I believe apu_setup() is required because it enables the outputs of the channels.

Also, I had to change the fuses on the ATMEGA328P in order to get it to work off of the same clock as the 2A03. I'm not sure if I selected the right clock divider setting, but I think this would be helpful to add to software.md.

If these changes make sense to you, I would be more than happy to update the documentation. Once again, thanks for your work!

Unable to compile firmware properly with avr-gcc

Hello Jaffe.

Sorry to bother you.
I would like to build my own NESizer, but I am unable to compile the firmware properly.

Here are the exact steps I tried to compile.
I first installed avr-gcc and git for Windows and cloned the repository.
Then I run 'make' from the cloned repository using the git bash shell.
However, I get the following error message.

In file included from main.c:29:
apu/apu.h:29:10: fatal error: sample/sample.h: No such file or directory
29 | #include "sample/sample.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:41: main.o] Error 1

Could you please help me with some advice? Thank you very much!

Also, if it's convenient for you, could you please send me the compiled firmware hex code via email? My email address is sonic@mukoi dot com

Best regards
Sonic

Nesizer goes crazy when cell battery is inserted

Hi,

I build the NESizer2 and everything works great so far, as long as I don't insert the battery for patch saving.
When I power on the NESizer with the battery inserted the machine goes crazy. All soundwaves are activated and it starts to play a random melody while showing random numbers on the display. Without battery everthing works fine again.

Any suggestions for troubleshooting?

Setting the right fuses

So .. after building this thing and programming it .. I turned it on and nothing happened. Lots of messing around ... anyway worked out how to set the fuses - tried doing a PR on the make file but I dont have permissions :(

Here's a nice little patch that allows you to do "make fuse" and it will burn the fuses correctly?? - pulled the values out of platformio.ini in this repo - all standard "arduino" fuse settings and any other avr stuff ive done in the past didnt work.

+fuse:
+       avrdude -u -c $(PROGRAMMER) -P usb -p $(MCU) -U efuse:w:0xFF:m -U lfuse:w:0xE0:m -U hfuse:w:0xD9:m
+

AVR Programming Method

I'm new to interacting on GitHub, so I apologize if it's poor etiquette to create new issues on your project for basic questions like these.

My intention is to stick the Atmega328 on a breadboard with the bare-minimum required components as shown in the Breadboard Arduino reference here:
https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoToBreadboard
and then power and program it via my Raspberry Pi's GPIO / SPI pins using avrdude before installing.

Is that what you'd recommend or is there a better way?

Build Problems

I have the synth all built and as mentioned in another issue I used the MXD1210CPA+ instead of the DS1210. I am able to flash the Atmega using an Arduino and set the fuses to E:FF, H:DF, L:E0, or E:FF, H:D9, L:E0.

The issue is when I power it up all the LEDs light up and it doesn't produce any sounds. I have also tried the init within the settings using buttons 8,9,11, and 14, but nothing appears to happen after pressing 11 and 14. Pressing 8 then 9 does cause the LEDs to brighten and a sequence starts on the screen for about a second.

I can however test the chip type correctly with a returned value of 12.

Once after powering on it did start making sounds, but I haven't been able to reproduce that.

Any troubleshooting ideas?

Need Help With Code!PLZ!

Hey Jaffe, sorry to bother you, ive got the boards all put together, hardware and all, minus the coin cell battery(need to run to store). But i am a relative noob when it comes to compiling code. I have atmel studio installed. I see that on github there are many file/folders for all the various functions. Can you explain to me how to build code and load onto chip. I have an ftdi usb to serial will that work also i have an arduino uno if i can use that to program. Please any help would be greatly appreciated, i am so close to finishing this beautiful build. Ive dreamed of putting together an nes synth for so long! you can email me josh_kuebler@yahoodotcom

I Want To Build One

I want to invest the time and resources needed to build one or a few of these. I don't have a background in electronic/electrical engineering, but I am willing to learn. Are the current specs and schematics complete enough that I should be able to build a NESizer if I followed them?

How to upload samples?

Hi,
I just wanted to ask, how to upload samples? I assume the samples have to be converted for sysex and then send while in sample select mode?

Thanks in advance!
Keen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.