QSound and Assembly

Anything QL Software or Programming Related.
Post Reply
spkr
Bent Pin Expansion Port
Posts: 98
Joined: Tue May 04, 2021 6:52 pm

QSound and Assembly

Post by spkr »

Hi there,

I recently obtained a QSound device, and now that I cobbled together a working oqtadrive, I *should* be able to get my own programs running on the QL using the QSound! However, currently that is not yet the case.

I was wondering if anyone went this way, or got some suggestions for me to try out. So far I tried to play one of the predetermined sounds:

Following https://dilwyn.qlforum.co.uk/docs/manua ... QPRINT.pdf :

Code: Select all

    moveq    #0,d0                  
    trap    #1                        ; MT INF
    move.l    $164(a0),d0                ; get $164 offsert from system vars, which is the AY.JMP (page 9)
    move.l    d0,a0                    ; use AY.JMP as address

    moveq    #9,d0                    ; play predefined noise (page 19)
    moveq    #1,d1                    ; play predefied noise (gunshot)
    jsr        (a0)                    ; jump into the thing (similar to page 8)
However this not yet yield sound. (I Confirmed the QSound working by using the basic command, which works).

Later today I will try and push raw data to the registers using the AY.WRALL; but Ideally Id like a really minimal example as a proof of concept that I can make the QSound make sound from assemble.

Any input is greatly appreciated; I hope to get some music going for my upcoming Sinclair QL intro :)

Kind regards,
Wietze


spkr
Bent Pin Expansion Port
Posts: 98
Joined: Tue May 04, 2021 6:52 pm

Re: QSound and Assembly

Post by spkr »

Quick followup; it seemed that setting individual AY regs using trap calls did work.

So I used this and that worked like a charm.

Kind regards,
Wietze


Derek_Stewart
Font of All Knowledge
Posts: 3975
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QSound and Assembly

Post by Derek_Stewart »

Hi Wietze,

Truely excellent, I have been struggling with this for a long time.

I will have a play with the Qsound boards I have like writing in assembley language.
Last edited by Derek_Stewart on Tue Jan 23, 2024 7:29 pm, edited 1 time in total.


Regards,

Derek
spkr
Bent Pin Expansion Port
Posts: 98
Joined: Tue May 04, 2021 6:52 pm

Re: QSound and Assembly

Post by spkr »

Hi guys,

I've released a little prod using the qsound. It can be found here: https://www.pouet.net/prod.php?which=95891

It also contains a YouTube link in case you do not own a qsound.

Kind regards
Wietze


napsternds
Chuggy Microdrive
Posts: 57
Joined: Tue Jan 26, 2021 11:04 am

Re: QSound and Assembly

Post by napsternds »

spkr wrote: Tue Jan 23, 2024 4:33 pm I've released a little prod using the qsound. It can be found here: https://www.pouet.net/prod.php?which=95891
Great Job. What you achieve with a QL is amazing!


User avatar
M68008
Trump Card
Posts: 224
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: QSound and Assembly

Post by M68008 »

Great demo!


thorsinclair
Trump Card
Posts: 199
Joined: Mon Jan 10, 2011 5:08 pm

Re: QSound and Assembly

Post by thorsinclair »

Congrats, looking and sounding great! Getting better and better!


Post Reply