Your AY playroutine Mike :)
Your AY playroutine Mike :)
Hi Mike,
IIRC, you have a playroutine for AY muzak, it was used to play the Trust music. Can you give us the code and how to use it
Regards
Kamel
IIRC, you have a playroutine for AY muzak, it was used to play the Trust music. Can you give us the code and how to use it
Regards
Kamel
/kml
skype pseudo : kamelitoloveless
skype pseudo : kamelitoloveless
Well, you are talking of the routine I made in 1997, that I used in two demo screens:
- The big scroller with 3 volume metters on top
- The big bouncing Oric logos in the first multiscreen demo I made
Well... this routine is crap, probably very bugged, not optimised, and I don't even have all the the parts of it. Accessorily it was programmed using the old SDK from Fabrice and Vagelis, with the FRASM (Frankestein Assembler) syntax.
Basicaly what I did was to replay Thrust music on my Atari ST, replacing the YM output by a write in memory in a big buffer, then I saved the buffer, and transformed it a bit to something more compact and usable on the Oric.
So this routine is just a 'AY register dump replayer' that loops after one minute or so.
I wanted to post the code as an attachment, but it seems this is not a standard feature of phpBB, and if there is an attachment "mod" available, it seems to suffer from serious security problems.
So well, in the mean time, here is the routine in "plain text":
As you can see, this is not particularly elegant code... and for it to work correctly, interrupts have to be disabled.
- The big scroller with 3 volume metters on top
- The big bouncing Oric logos in the first multiscreen demo I made
Well... this routine is crap, probably very bugged, not optimised, and I don't even have all the the parts of it. Accessorily it was programmed using the old SDK from Fabrice and Vagelis, with the FRASM (Frankestein Assembler) syntax.
Basicaly what I did was to replay Thrust music on my Atari ST, replacing the YM output by a write in memory in a big buffer, then I saved the buffer, and transformed it a bit to something more compact and usable on the Oric.
So this routine is just a 'AY register dump replayer' that loops after one minute or so.
I wanted to post the code as an attachment, but it seems this is not a standard feature of phpBB, and if there is an attachment "mod" available, it seems to suffer from serious security problems.
So well, in the mean time, here is the routine in "plain text":
Code: Select all
VIA_1 equ $30f
VIA_2 equ $30c
_MusicVolA BYTE 0
_MusicVolB BYTE 0
_MusicVolC BYTE 0
_MusicAdress WORD 0
_MusicPosition BYTE 0
_MusicPattern BYTE 0
_MusicLenght BYTE 60
;
; 48*7=336
;
_InitMusic
lda #LOW(_TrustMusic)
sta _MusicAdress
lda #HIGH(_TrustMusic)
sta _MusicAdress+1
lda #0
sta _MusicPattern
sta _MusicPosition
rts
_PlayMusic
lda _MusicAdress
sta tmp
lda _MusicAdress+1
sta tmp+1
playnote_loop
ldy #0
lda (tmp),y
tax
lda #0
jsr VIA_select
ldy #1
lda (tmp),y
tax
lda #2
jsr VIA_select
ldy #2
lda (tmp),y
tax
lda #4
jsr VIA_select
ldy #3
lda (tmp),y
tay
and #31
tax
lda #6
jsr VIA_select
tya
lsr a
lsr a
lsr a
lsr a
lsr a
tay
eor #7
asl a
asl a
asl a
sta add_value+1
tya
clc
add_value
adc #0
ora #64
tax
lda #7
jsr VIA_select
ldy #4
lda (tmp),y
tay
and #$0f
tax
lda #1
jsr VIA_select
tya
lsr a
lsr a
lsr a
lsr a
tax
lda #3
jsr VIA_select
ldy #5
lda (tmp),y
tay
and #$0f
tax
lda #5
jsr VIA_select
tya
lsr a
lsr a
lsr a
lsr a
tax
stx _MusicVolA
lda #8
jsr VIA_select
ldy #6
lda (tmp),y
tay
and #$0f
tax
stx _MusicVolB
lda #9
jsr VIA_select
tya
lsr a
lsr a
lsr a
lsr a
tax
stx _MusicVolC
lda #10
jsr VIA_select
clc
lda tmp
adc #7
sta tmp
lda tmp+1
adc #0
sta tmp+1
lda tmp
sta _MusicAdress
lda tmp+1
sta _MusicAdress+1
ldx _MusicPosition
inx
cpx #48
bne continue_pattern
next_pattern
ldx #0
ldy _MusicPattern
iny
cpy #60
bne continue_music
ldy #0
lda #LOW(_TrustMusic)
sta _MusicAdress
lda #HIGH(_TrustMusic)
sta _MusicAdress+1
continue_music
sty _MusicPattern
continue_pattern
stx _MusicPosition
rts
;
; A -> Soundchip register number (0-13)
; X -> Value to write
;
VIA_select
sta VIA_1
txa
pha
lda VIA_2
ora #$EE ; $EE 238 11101110
sta VIA_2
and #$11 ; $11 17 00010001
ora #$CC ; $CC 204 11001100
sta VIA_2
tax
pla
sta VIA_1
txa
ora #$EC ; $EC 236 11101100
sta VIA_2
and #$11 ; $11 17 00010001
ora #$CC ; $CC 204 11001100
sta VIA_2
rts
_TrustMusic
BYTE $30,$ee,$de,$57,$e2,$fe,$0f
BYTE $28,$ee,$de,$5f,$e2,$fe,$0f
BYTE $20,$ee,$ee,$57,$e2,$fe,$0e
BYTE $20,$ee,$fe,$5f,$e2,$fe,$0d
BYTE $28,$ee,$fe,$57,$e2,$fe,$0c
BYTE $30,$ee,$ee,$5f,$e2,$fe,$0b
; Some more data
The picture is maybe one or two years ago. I'm 30, but may look younger.
I've been a bit of a Oric fan for years, but not really got the incentive to try some programming. I put some bids on the Oric Atmos in Dimitri's sales, but it went a bit too expensive for my taste. I guess reading some tech articles (I know all of your sites) and try out in Euphoric would be a good start.
I've been a bit of a Oric fan for years, but not really got the incentive to try some programming. I put some bids on the Oric Atmos in Dimitri's sales, but it went a bit too expensive for my taste. I guess reading some tech articles (I know all of your sites) and try out in Euphoric would be a good start.
Anders Carlsson
VIA 6522, the IO chip in the Oric.
You can see it here:
http://www.defence-force.org/computing/ ... /index.htm
There are also numerous data sheets on the net
You can see it here:
http://www.defence-force.org/computing/ ... /index.htm
There are also numerous data sheets on the net
From the second message in the thread:
I never edited this music. It's only a rip from some other musician play routine.Basicaly what I did was to replay Thrust music on my Atari ST, replacing the YM output by a write in memory in a big buffer, then I saved the buffer, and transformed it a bit to something more compact and usable on the Oric.
So this routine is just a 'AY register dump replayer' that loops after one minute or so.