nitrofurano Posted June 29, 2014 Share Posted June 29, 2014 (edited) On msx, i use a code like this for having some sound: out $a0,7 ';- register 7: channel switch (OpenMSX warning: bit 6 should be 0) out $a1,%10111110 ';- value out $a0,0 ';- register 0: channel a frequency (16 bit, unsure if it is more or less significant byte) out $a1,93 ';- value out $a0,1 ';- register 1: channel a frequency (16 bit, unsure if it is more or less significant byte) out $a1,4 ';- value out $a0,8 ';- register 8: volume - channel a out $a1,7 ';- value There, the port $A0 is used for the psg register choosing, and $A1 for setting values. The confusion is when i try to find which ports are used on Colecovision, which http://www.colecoboxart.com/faq/FAQ05.htm says it is from $C0 to $DF, and http://adamcon.org/pipermail/coladam/2012q3/002088.html from $E0 to $FF - which one is correct, and which are for setting register, and which are for outputting values? Edited June 29, 2014 by nitrofurano Quote Link to comment Share on other sites More sharing options...
CrazyBoss Posted June 30, 2014 Share Posted June 30, 2014 I just use FF. But the MSX chip is not compatible with the Colecovision one. So you cant just change the port number you need to do som conversion. 1 Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted June 30, 2014 Author Share Posted June 30, 2014 (edited) I just use FF. But the MSX chip is not compatible with the Colecovision one. So you cant just change the port number you need to do som conversion. thanks btw, the documentation at http://www.smspower.org/Development/SN76489 looks quite confusing - how simple is to convert code that use ay-3-8910 to sn76489 and back? and where from can we find documentation comparing these both side by side? Edited June 30, 2014 by nitrofurano Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted June 30, 2014 Author Share Posted June 30, 2014 and it seems that sn76489 misses some ay-3-8910 features like envelopes? (and we only can have some idea of envelopes simulating it controlling the volume during the sound play?) Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted June 30, 2014 Author Share Posted June 30, 2014 i'm trying this now ( copied from http://www.smspower.org/Development/SN76489 ) : ld a,%10001110 out ($FF),a ld a,%00001111 out ($FF),a ld a,%11011111 out ($FF),a ld a,%11011111 out ($FF),a ld a,%00000000 out ($FF),a ld a,%11100101 out ($FF),a ld a,%11100101 out ($FF),a ld a,%00000100 out ($FF),a and getting no sound at all... :S - where from should we try examples that works? Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted July 3, 2014 Author Share Posted July 3, 2014 (edited) another thing i'm seeing is that you can play on ay-3-8910 2 octaves lower than sn76489 lower frequency limit? (A0 on ay-3-8910, and A2 at sn76489 - due on 12 bits for ay-3-8910 and 10 bits for sn76489, for 111861/hz value ) - from http://www.seventhstring.com/resources/notefrequencies.html i'm seeing that we can’t play most of the bass/cello notes scale... Edited July 3, 2014 by nitrofurano Quote Link to comment Share on other sites More sharing options...
+nanochess Posted July 3, 2014 Share Posted July 3, 2014 i'm trying this now ( copied from http://www.smspower.org/Development/SN76489 ) : and getting no sound at all... :S - where from should we try examples that works? This code will work. Read more carefully the documentation ld a,$8a ; Select channel 0, update lower 4 bits (contained in bits 3-0) out ($ff),a ld a,$0a ; Continue updating channel 0, update higher 6 bits (contained in bits 5-0) out ($ff),a ld a,$9f ; Select volume 0 (bit 7= 1=select), lower 4 bits are volume out ($ff),a 1 Quote Link to comment Share on other sites More sharing options...
nitrofurano Posted July 4, 2014 Author Share Posted July 4, 2014 This code will work. Read more carefully the documentation ld a,$8a ; Select channel 0, update lower 4 bits (contained in bits 3-0) out ($ff),a ld a,$0a ; Continue updating channel 0, update higher 6 bits (contained in bits 5-0) out ($ff),a ld a,$9f ; Select volume 0 (bit 7= 1=select), lower 4 bits are volume out ($ff),a thanks! recently my doubt was that i didn’t know if %1xxxxxxx and %0xxxxxxx values should have some special sequence Quote Link to comment Share on other sites More sharing options...
+nanochess Posted July 4, 2014 Share Posted July 4, 2014 thanks! recently my doubt was that i didnt know if %1xxxxxxx and %0xxxxxxx values should have some special sequence Yep, technically a %00xxxxxx just after a %1rr0xxxx for register selection. (0/1/2) Only for frequency registers. And there are the four volume registers %1rr1xxxx and the control register %1110xxxx for noise channel. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.