The NESIZER

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

Post Reply
Jaffe
Posts: 48
Joined: Sun May 14, 2006 10:26 am
Location: Norway

The NESIZER

Post by Jaffe » Wed Apr 15, 2015 2:33 am

Hi :)

It's been a while since I was here last time, but I thought I'd post a project I've been working on for the last year or so: The NESIZER. It's basically a little synthesizer module using the 2A03 (or a 2A07 or Dendy clone). It has buttons and a display for programming patches / sounds and battery backed memory to store them. It can be played via MIDI, or sequences and tracks can be made using an in-built sequencer (not finished writing the software for that yet).

The hardware is basically centered around a microcontroller (Atmel ATmega328) doing all the work, with the 6502 just idling and updating APU registers. The idea was inspired by the TSUNDERE project which takes a similar approach which I simplified to a way that requires no external logic except for latch. Basically the ATmega328 keeps the opcode for STA zero page ($85) on the 2A03's databus to keep the 6502 busy. When an APU register is to be updated, the ATmega waits for the 6502's R/W line to go low, in which case the 6502 is in its last cycle of the STA instruction and the next cycle will be the fetch of the next opcode. The ATmega then outputs the necessary stream of instructions to load a value and store it in the desired APU register. Doing this glitch-free is achieved by having both the ATmega and 2A03 running off the same 20 MHz clock so that the two are always phase locked and there is a known and constant number of ATmega cycles for each 6502 cycle.

The hardware is pretty much completed, and I have made a few prototype PCBs. The software is still work in progress, but I'm getting there (I don't have much time to work on it now). So far I have implemented rudimentary MIDI support, three envelope generators, three LFOs, glide/portamento and coarse and fine tuning. It can also play back PCM samples at 16 kHz (samples can be sent via MIDI and stored in memory).

You can see a little demo video of it here.
The hardware and software is open source and can be found here.

I don't know what you guys think? There is a bit of interest in the synthesizer (especially DIY) community. I'm thinking of maybe making this into a DIY kit when it's finished, and maybe making an enclosure for it too.

tepples
Posts: 22141
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: The NESIZER

Post by tepples » Wed Apr 15, 2015 5:04 am

How do you keep the program counter from drifting into the readable APU ports at $4015-$4017?

Jaffe
Posts: 48
Joined: Sun May 14, 2006 10:26 am
Location: Norway

Re: The NESIZER

Post by Jaffe » Wed Apr 15, 2015 5:23 am

A JMP opcode is sent each time a sequence of APU updates is done. It is immediately followed by the STA zero page opcode, so the 6502 jumps to $8585 and then continues executing STA.

I initially thought it was unnecessary, as it seemed to work fine without jumping, but that was until I tried disabling all channels except SQ2 (in which case $4015 reads as an illegal opcode).

JRoatch
Formerly 43110
Posts: 390
Joined: Wed Feb 05, 2014 7:01 am
Location: us-east
Contact:

Re: The NESIZER

Post by JRoatch » Wed Apr 15, 2015 9:30 am

You might be able to fix those phase reset clicks by using the APU sweep units. From what I understand there can be 3 different sequences: when the high bits increment, decrement, or stay the same.

Jaffe
Posts: 48
Joined: Sun May 14, 2006 10:26 am
Location: Norway

Re: The NESIZER

Post by Jaffe » Wed Apr 15, 2015 2:13 pm

43110 wrote:You might be able to fix those phase reset clicks by using the APU sweep units. From what I understand there can be 3 different sequences: when the high bits increment, decrement, or stay the same.
Wow, I searched around about this problem and came to the conclusion that I couldn't do anything about it! Thanks a bunch :D. I'll try it out soon.

User avatar
MottZilla
Posts: 2832
Joined: Wed Dec 06, 2006 8:18 pm

Re: The NESIZER

Post by MottZilla » Wed Apr 15, 2015 4:52 pm

Your project looks and sounds awesome.

Jaffe
Posts: 48
Joined: Sun May 14, 2006 10:26 am
Location: Norway

Re: The NESIZER

Post by Jaffe » Wed Apr 22, 2015 1:12 pm

Thanks :)

I fixed the phase reset clicking now, thanks 43110!

Post Reply