Jump to content
Csonicgo

DPC+ chiptunes / DPC+ Music kit?

Recommended Posts

I am a bit of a chiptune nut, and I've been wondering about the possibilities of a small DPC+ music module player.

 

From what I've read, the DPC+ is a 3-channel square wave sound generator, plus the two TIA sounds.

 

I have no idea how fast the DPC+ can be called to change sound pitches, but given the examples I have heard, it can be quite a fun music machine. So at the end of the day, 5 channels to mess with sounds pretty enticing to me.

 

Speccing a small module format wouldn't be difficult (Heck, the C64 had one) and most modules out there with no sample data (like for SID) are around 2-4K in size. I would be more than willing to assist with making specs for a module format.

 

Does anyone out there think this is possible? Or would it be more trouble than it's worth?

Share this post


Link to post
Share on other sites

Hopefully maybe someday.

One of the two channels is used for the 3-channel waves which can be sine, saw, or square.

The other channel is free for sound the TIA can make normally like notes, percussion, etc.

The only way to made DPC+ music is assembly. Batari Basic DPC+ 1.1d kernel does not have 3-channel sound implemented.

It is so simple an idea. All it is doing is changing just the audio channel's volume.

You can make a sound in bB by setting AUDV0 = 8 drawscreen AUDV0 = 0 drawscreen.

That will push out the speaker one the first drawscreen and pull it back on the second drawscreen. Since drawscreen happens 60 times a second NTSC, you get a 60Hz tone.

The hard part is that to get different notes, you must update the volume register "each scan line."

Remember you only get 76 cycles on each scan line while the screen is drawing.

I think the updating even continues through the vertical horizontal blanks (not sure).

Updating less than every scan line cause the sound to get worse.

That's a start to wrap your head around.

Does Chetiry use DPC+ music? You can also do that music technique in software like Stella Stocking does ( I could be wrong), and the Better Than Pitfall Demos are software (4-channel sound?)

There is a great unannounced 2600 game I helped input the music data coming out this year with lots of DPC+ music!

Share this post


Link to post
Share on other sites

yes, changing volumes would be an absolute must if instruments are to be defined in an ADSR fashion. Vibrato or tremolo would also be needed if you wanted any flute-like sounds.

 

A small module format would be like so: note lane of 3 (or 5?) columns x 64 or less rows. each lane would be a "pattern" which would require a pattern order table, which can either be followed or thrown out with a "goto" in the note lane . useful for intros.

Edited by Csonicgo

Share this post


Link to post
Share on other sites

You can use more than just sine, saw or square waves. The game iesposta mentions uses these waveform definitions:

SQUARE_255:     ; wave 0
   .byte   0,  0,  0,  0,  0,  0,  0,  0
   .byte 255,255,255,255,255,255,255,255
   .byte 255,255,255,255,255,255,255,255
   .byte   0,  0,  0,  0,  0,  0,  0,  0

SAWTOOTH_255:   ; wave 1
   .byte   7, 15, 23, 31, 39, 47, 55, 63
   .byte  71, 79, 87, 95,103,111,119,127
   .byte 135,143,151,159,167,175,183,191
   .byte 199,207,215,223,231,239,247,255

SINE_255:       ; wave 2
   .byte   1,  3, 11, 22, 38, 57, 79,103
   .byte 128,153,177,199,218,234,245,253
   .byte 255,253,245,234,218,199,177,153
   .byte 128,103, 79, 57, 38, 22, 11,  3

SINE_SINE_255:  ; wave 3
   .byte   0,  8, 30, 64,105,148,188,221
   .byte 243,253,250,238,219,198,180,167
   .byte 162,167,180,198,219,238,250,253
   .byte 243,221,188,148,105, 64, 30,  8

CLARINET_WAVE:  ; wave 4
   .byte 111,171,221,251,255,237,205,173
   .byte 151,146,158,180,202,213,205,177
   .byte 135, 88, 50, 28, 26, 41, 65, 86
   .byte  95, 86, 63, 32,  8,  0, 15, 55

OBOE_WAVE:      ; wave 5
   .byte 172,202,233,255,255,230,189,148
   .byte 121,110,107,106,107,116,138,167
   .byte 187,186,161,123, 90, 70, 62, 52
   .byte  35, 13,  0,  7, 35, 74,113,144

BANJO_WAVE:     ; wave 6
   .byte 127,207,254,255,223,183,156,143
   .byte 132,117, 99, 90, 98,118,135,138
   .byte 127,117,119,137,157,164,156,138
   .byte 122,112, 99, 71, 32,  0,  0, 47

 

and these ADSR values:

; instead of 1-5, use 2-6
; this is because 5*255>>8 = 4, not 5.
ADSR_Data:
   .byte 2,3,4,5,6,6,6,6   ; ADSR 0
   .byte 5,5,5,5,4,4,4,4
   .byte 3,3,3,3,2,2,2,2
   .byte 2,2,2,2,2,2,2,2

   .byte 2,2,3,3,4,4,5,5   ; ADSR 1
   .byte 6,6,6,6,6,6,6,6
   .byte 6,6,6,6,6,6,6,6
   .byte 6,6,6,6,6,6,6,6

   .byte 2,3,4,5,6,6,6,6   ; ADSR 2
   .byte 5,5,5,5,5,5,5,5
   .byte 4,4,4,4,4,4,4,4
   .byte 3,3,3,3,3,3,3,3

   .byte 6,5,4,4,3,3,3,2   ; ADSR 3 supercat
   .byte 2,2,2,0,0,0,0,0
   .byte 0,0,0,0,0,0,0,0
   .byte 0,0,0,0,0,0,0,0

   .byte 6,5,6,5,4,5,4,5   ; ADSR 4 thomas - banjo
   .byte 4,5,4,3,4,3,4,3
   .byte 2,3,2,3,2,3,2,3
   .byte 2,1,2,1,2,1,2,1   ; <-- note, 1 is the same as 0 (so a banjo note lasts just over 1/2 a second).

   .byte 2,4,6,6,6,6,6,6  ; ADSR 5 iesposta
   .byte 6,6,6,6,6,6,6,6
   .byte 6,6,6,6,6,6,6,6
   .byte 6,6,6,6,6,6,6,6

 

The driver will on-the-fly add together 2 waveforms and apply the ADSR values. It uses these arrays to define the instruments:

const unsigned char instrument_waves[iNSTRUMENT_COUNT] = {
// WAVE1 WAVE2     ADSR     INSTRUMENT  NAME
   5*8 + 5,    //  0           0
   2*8 + 1,    //  1           1
   2*8 + 2,    //  1           2
   3*8 + 1,    //  1           3
   4*8 + 0,    //  1           4       WOODWIND
   5*8 + 4,    //  1           5
   0*8 + 2,    //  2           6
   2*8 + 1,    //  2           7
   6*8 + 6,    //  3           8       BANJO
   1*8 + 0,    //  2           9
   3*8 + 3,    //  5          10       ORGAN1
   4*8 + 4,    //  5          11       ORGAN2
   3*8 + 3     //  1          12       ORGAN3
};

const unsigned char instrument_adsr[iNSTRUMENT_COUNT] = {
//  ADSR
   0*32,
   1*32,
   1*32,
   1*32,
   1*32,
   1*32,
   2*32,
   2*32,
   3*32,
   2*32,
   5*32,
   5*32,
   1*32
};

 

I'll most likely make the source available sometime next year, after the game has been released.

  • Like 1

Share this post


Link to post
Share on other sites

WOW! So it's possible! You sir have made my day. Looks like the format for this game would be a great place to start. So it's pretty safe to say that the DPC+ is a freeform wave? This puts it on par with the Famicom Disk System.

Edited by Csonicgo

Share this post


Link to post
Share on other sites

I have no clue what's being discussed, but horray for expanded potential!

 

Well, if I'm reading this right, and I do think I am, the DPC+ is more than a square wave tone generator. it's a freeform wave. That puts it on par with the game boy. This is exciting news! That means any small waveform can be done, so a lot of classic sounds can come out of it.

 

I'm really geeking out here at how awesome this is.

Share this post


Link to post
Share on other sites

Well, if I'm reading this right, and I do think I am, the DPC+ is more than a square wave tone generator. it's a freeform wave.

I don't know if "freeform" is quite accurate, because as I understand it you must define the waveform first.

Share this post


Link to post
Share on other sites

I don't know if "freeform" is quite accurate, because as I understand it you must define the waveform first.

 

I mean freeform as in the wave can be defined, it's not "fixed" to a simple oscillator value. what you're speaking of is a dynamic wave.

 

I think the MSX soundchip was also free-form.

Edited by Csonicgo

Share this post


Link to post
Share on other sites

What I'd like to do is put the wave in (expansion) RAM so new waveforms can be created dynamically, such as combining different harmonics. :)

Share this post


Link to post
Share on other sites
I think the MSX soundchip was also free-form.

The konami SCC chip uses 32-bytes samples for waveforms.

Edited by roland p

Share this post


Link to post
Share on other sites

All this low level stuff is clearly important. However, without a MIDI to DPC+ coverter the chiptune fellows wont have a chance.

 

Heck, I don't have a chance :) The best I can do is plunk randomly on the virtual keyboard via VisualbB and hope i can memorize enough of the good notes to edit a small section.

Share this post


Link to post
Share on other sites

The konami SCC chip uses 32-bytes samples for waveforms.

I think the definition for that is very open. while it is a sample, I wouldn't call it a sampler.

 

All this low level stuff is clearly important. However, without a MIDI to DPC+ coverter the chiptune fellows wont have a chance.

 

Heck, I don't have a chance :) The best I can do is plunk randomly on the virtual keyboard via VisualbB and hope i can memorize enough of the good notes to edit a small section.

 

Midi input into a program would be alright. Although the output format should ideally be a protracker-style format for size reasons. I mean, you can fit a bunch into that format, plus it keeps your "ducks" (voice channels) in a row. you never run into polyphony problems if you base the format around the sound channels.

Share this post


Link to post
Share on other sites

Does Chetiry use DPC+ music? You can also do that music technique in software like Stella Stocking does ( I could be wrong), and the Better Than Pitfall Demos are software (4-channel sound?)

Chetiry uses DPC music (not DPC+). It is similar but limited to square waves. I posted a demo in a thread about DPC music a while back.

Chris

Share this post


Link to post
Share on other sites

I think the definition for that is very open. while it is a sample, I wouldn't call it a sampler.

 

 

 

Midi input into a program would be alright. Although the output format should ideally be a protracker-style format for size reasons. I mean, you can fit a bunch into that format, plus it keeps your "ducks" (voice channels) in a row. you never run into polyphony problems if you base the format around the sound channels.

Interesting topic!

You might want to see this 8-)

http://chipmusic.org/forums/topic/10345/a26f-atari-2600-midi-music-interface/

Yogi

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...