Varying Tone/Timbre on AY Channel through Hardware!

Probably the most technical forum around. It does not have to be coding related, or assembly code only. Just talk about how you can use the AY chip to do cool sounding things :)
Post Reply
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Varying Tone/Timbre on AY Channel through Hardware!

Post by Twilighte » Mon May 28, 2007 1:16 am

I have had a bit of a brainwave.
The following idea can only be done on a Real Oric not on any emulator (because the shift register is not emulated) apart maybe from Caloric (when it is finished).


1) Set up one channel to EG Control by setting B4 in volume channel
2) Write 0 to the Envelope (EG) period
3) Set up the AY Sound Register to 13 (Cycle register)
4) Write \_ envelope waveform value to Port A ($030F)
5) Write %10000000 (Binary) to shift register
6) set CA2 low and CB2 to low
7) Write a mid-range value to T2
8 ) Set up the Shift Register to shift continuously at T2 rate

Now at a rate set by T2, the shift register will Rotate the value 10000000 with each carry being placed both on CB2 and Bit7 of the shift register again.
With CA2 low, CB2 going high will write the current value in $030F(PortA) to AY register 13. Because a write to register 13 always resets the waveform, it will produce this...

1000000010000000..
\_______\_______

By placing 11000000 in the shift register we will effectively produce the same pitch and volume but alter the tonal quality of the note.

11000000
\\______

Whilst we display the trigger as \\ the actual height will be more uniform (because even with an envelope period of 1, the Envelope will not have time to depleat before the second trigger is sent).

Now by varying T2 Latch/counter we are able to change the frequency of the note. On further reading of the 6522 spec it would seem that only the lower 8 bits of T2 are used for the rate which is even better since only the low period of T2 is latched in the 6522.

Cool huh?
It may even be possible to produce PWM samples using this technique.
Now all thats needed is someone to write this code and try it.
Last edited by Twilighte on Sat Jan 03, 2009 1:35 pm, edited 2 times in total.

User avatar
carlsson
Pilot Officer
Posts: 127
Joined: Thu Jan 12, 2006 11:26 pm
Location: Västerås, Sweden

Post by carlsson » Wed Jun 06, 2007 6:00 pm

Interesting. Would this technique only be useful on the Oric, with the AY chip mapped through the VIA?
Anders Carlsson

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Thu Jul 05, 2007 8:11 pm

Yes :/

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Sat Jan 03, 2009 1:39 pm

I've just updated the first message again. There were some discrepencies.
Apparently Andre is currently converting xeuphoric to C. It would be very cool if the 6522 was completely emulated. Fabrice theorised to make this so would require a pentium pc.. hmm methinks we have moved beyond those now. :)

User avatar
waskol
Flight Lieutenant
Posts: 331
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol » Fri Feb 06, 2009 10:01 am

Twilighte wrote:I've just updated the first message again. There were some discrepencies.
Apparently Andre is currently converting xeuphoric to C. It would be very cool if the 6522 was completely emulated. Fabrice theorised to make this so would require a pentium pc.. hmm methinks we have moved beyond those now. :)
If this is done, you will have an emulator for XP/VISTA/SEVEN operational very quickly since it is the only part I did not success to emulate in my emulator !

If only I could get in touch with Andre in order to work on it could be very great !

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Fri Feb 19, 2010 12:59 am

Well now we have Oricutron (previously Oriculator) by Xeron we have an emulator that supports the Shift Register.
There are bugs in version 0.4 regards mode 100 Shift register mode which is intended for HardSID on the Oric and at the moment these are preventing HardSID to work correctly.

To test it i have written a little utility called hs.tap
It allows control of all the parameters in the HardSID environment.
You can get it here..

http://code.google.com/p/oriculator/issues/detail?id=17

The massive advantage of HardSID is it doesn't require a fast irq to constantly run in order to generate the SID sound.
Take the Times of Lore title music for example..

It displays the natty colour title TIMES of LORE then displays the doors opening sequence then back to the title again.
If we run a fast IRQ the SID sound will be too bad if we interrupt it everytime we want to change the HIRES screen (40x120).
Conversely the HIRES screen will look ugly if we keep the irq running during its display update.
But with HardSID we can use the CPU solely for updating the screen (and music element) which will look far superior.
[/img]

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests