It is currently Fri Aug 17, 2018 12:13 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu Jun 07, 2018 11:37 am 
Offline

Joined: Thu Jun 07, 2018 11:13 am
Posts: 2
Hey all,

I'm new to this forum, NES hardware, and really to electronics in general. I mostly work on the software side of things. I'm a musician, a coder, and a fan of classic chiptune, so I thought it would be really neat to try and build a synthesizer using an actual RP2A03.

I ordered a broken Famicom off of ebay, extracted the chip, and now my plan is to control it using an Arduino Mega 2560. My initial thoughts were to have the arduino do all the heavy lifting, sending the correct signals directly to the 2A03 without any additional hardware. My goal is to have the simplest design possible. However, I've looked at several other similar projects, and there's usually a bunch of extra hardware involved.

This is essentially what I had in mind:

Image

So here are my questions:

    1. Is my plan feasible? Is it even possible to control the 2A03 with only an arduino?

    2. If it isn't possible, what additional hardware would be required?

    3. What are some good resources on how I could control the 2A03 (or any other required hardware)? In other words, where can I find out what signals to send from the arduino?


Thanks for reading, sorry if this is just basic stuff. I'm a complete noob to all this, so bear with me.
-QS


Top
 Profile  
 
PostPosted: Thu Jun 07, 2018 12:21 pm 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20413
Location: NE Indiana, USA (NTSC)
The MCU on your Arduino board will be acting as the 2A03's ROM and RAM. So you'll need to spoon-feed opcodes onto the eight data bus pins and react to what it outputs on M2 and a subset of the address lines. Most of these signals change at 1.8 MHz, one-twelfth of the input clock.


Top
 Profile  
 
PostPosted: Thu Jun 07, 2018 12:26 pm 
Offline
User avatar

Joined: Thu Mar 31, 2016 11:15 am
Posts: 335
The 2A03 is not a dedicated sound chip. It's a CPU with a sound chip tacked on, and you can't access the sound chip directly through the pins. You have to do everything by faking CPU data.

If you get stuck, you might find it easier to pick another sound chip. Here's an article of a guy controlling a commodore SID with nothing more than an arduino, for example: https://hatestheinternet.com/hackery/kr ... id-arduino


Top
 Profile  
 
PostPosted: Thu Jun 07, 2018 12:39 pm 
Offline

Joined: Thu Jun 07, 2018 11:13 am
Posts: 2
tepples wrote:
The MCU on your Arduino board will be acting as the 2A03's ROM and RAM. So you'll need to spoon-feed opcodes onto the eight data bus pins and react to what it outputs on M2 and a subset of the address lines. Most of these signals change at 1.8 MHz, one-twelfth of the input clock.


pubby wrote:
The 2A03 is not a dedicated sound chip. It's a CPU with a sound chip tacked on, and you can't access the sound chip directly through the pins. You have to do everything by faking CPU data.


Alright, that makes sense. I'll try to do some research on the opcodes so that I can figure out what signals I need to send. Thanks!

pubby wrote:
If you get stuck, you might find it easier to pick another sound chip. Here's an article of a guy controlling a commodore SID with nothing more than an arduino, for example: https://hatestheinternet.com/hackery/kr ... id-arduino


I'd really like to get it working with the 2A03, but depending on how this project goes I might try to do something similar with the SID too.


Top
 Profile  
 
PostPosted: Thu Jun 07, 2018 12:50 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7391
Location: Seattle
You basically will either have to
- Significantly underclock the 2A03 so that the arduino can serve as a ROM emulator. (You will additionally have to write this code possibly in asm, maybe C, and not using any of the convenience arduino methods)
- Provide some kind of ROM or ROM-like thing (examples: viewtopic.php?f=9&t=16964 viewtopic.php?p=30276#p30276 )
- Use one of the myriad sound ICs without also a CPU (YMZ284, SN76494, YMF262, &c)


Top
 Profile  
 
PostPosted: Thu Jun 07, 2018 3:52 pm 
Offline

Joined: Sun Jun 12, 2011 12:06 pm
Posts: 355
Location: Poland
Make atmega control CLK to the pin 29. This CLK pin should be connected to one of atmega's timer outputs.
During idle time (for example, when USB communication is in progress), you want to keep CLK at stable frequency to make generation of stable fruequency square/triangle sound waves. At that time, you also fed $4C to data bus to mimic JMP $4C4C opcode.

When executing special commands (like: play sound at frequency f), you programatically control CLK (and R/!W, address and data bus) to mimic feding asm opcodes.


Top
 Profile  
 
PostPosted: Thu Jun 14, 2018 2:53 pm 
Offline

Joined: Thu Jun 14, 2018 2:50 pm
Posts: 9
I've controlled a C64 SID chip with a Pi. I a man going to use an Arduino soon.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group