[Coco] How Many OR90s can be utilized?

RETRO Innovations go4retro at go4retro.com
Sat Nov 12 01:29:27 EST 2016


On 11/12/2016 12:17 AM, RETRO Innovations wrote:
> On 11/12/2016 12:03 AM, William Astle wrote:
>> On 2016-11-11 10:48 PM, RETRO Innovations wrote:
>>> Is it possible to (or does software exist to ) utilize more than 
>>> Orch 90
>>> device in a single system?
>>
>> You would have addressing conflicts. I don't believe the Orch 90 uses 
>> the SCS line for it's DAC registers which means its registers are 
>> present even if its slot isn't active.
>>
>> If you could relocate the DACs for one or more Orch 90s, you could 
>> use them all in the same system but it will require either modding 
>> the Orch 90s so you can set the DAC addresses or a special multipack 
>> scheme that remaps the Orch 90 registers.
>>
>
> I understand, but I have created an orch90 replacement on the 
> CocoFLASH cart, and so I can control where it sits (or if it sits in 
> memory).
>
>
> The easiest approach is to do this:  (pseudo code)
>
> ; assume $ff64 is base reg of CocoFLASH 1, and bit 3 of the base reg 
> controls if the OR90 support on the CocoFLASH is present or not:
>
> ; grab 4 channels of data
>
> ; turn bit 3 on in $ff64
>
> ; store left1 value in $ff7a
>
> ; store right1 value in $ff7b
>
> ; turn bit 3 off in $ff64
>
> ; now assume $ff68 is location of second CocoFLASH
>
> ; turn bit 3 on in $ff68
>
> ; store left2 value in $ff7a (will be sent to second CocoFLASH)
>
> ; store right2 value in $ff7b
>
> ; turn bit 3 off in $ff68
>
> ; repeat 
This could probably be optimized to:
lda $ff64
ora #$08
tax
and #$f7
tay
; assume both CocoFLASH cart have the same config in base_reg
play:
stx $ff64
ldd <data>
std $ff7a
sty $ff64
stx $ff68
ldd <data>
std $ff7a
sty $ff68
bra play

Of course, it's not as fast as:

play:
ldd <data>
std $ff7a
ldd <data>
std $ff7c
bra play

as I assume it will take 16 more cycles to perform (3 to load 
"st","<abs:lo>", "<abs:hi>", and 1 more to actually store the value * 4 
iterations per loop)

Jim


More information about the Coco mailing list