English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 26 February 2023, 08:52   #1
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
How to use Playsid.library in assembly?

Hi
Is there somewhere a bit of code that show how to load, play and stop a 64 tune using Playsid.library in assembly?
kamelito is offline  
Old 26 February 2023, 11:38   #2
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Without error-checks etc.

Code:
    include ndk32/lvo/exec_lib.i
    include playsid/playsid_lib.i

    macro execall
    move.l      4, a6
    jsr         (_LVO\1, a6)
    endm


    section code

    moveq       #0, d0
    lea         playsidlib, a1
    execall     OpenLibrary
    move.l      d0, _PlaySidBase

    CALLPLAYSID AllocEmulResource

    moveq       #50, d0
    CALLPLAYSID SetVertFreq

    lea         sidmodule, a0 
    move.l      a0, a1
    move.l      #sidlength, d0
    CALLPLAYSID SetModule

    moveq       #0, d0
    CALLPLAYSID StartSong

.w  btst        #6, $bfe001
    bne         .w

    CALLPLAYSID StopSong
    CALLPLAYSID FreeEmulResource

    move.l      _PlaySidBase, a1
    execall     CloseLibrary

    moveq       #0, d0
    rts


playsidlib
    dc.b "playsid.library", 0
    even
sidmodule
    incbin trifle.sid
sidlength = *-sidmodule


    section data

_PlaySidBase
    ds.l 1
Leffmann is offline  
Old 26 February 2023, 19:55   #3
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
Thank you very much.
kamelito is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
AmiAMP, AModPlay, DAPlayer, PlaySID, and PowerPlayer Missing ARexx Commands tygre support.Apps 12 03 December 2023 00:38
playsid.library with reSID support koobo News 48 02 December 2023 17:06
Playsid library v1.2 Legionary News 12 26 September 2022 17:02
Playsid.library source Legionary Nostalgia & memories 5 05 November 2016 15:54
HELP: Opus5, KingCON, SysInfo.library (Sysmon.library) triangle Michael support.Apps 6 10 March 2014 14:08

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:50.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14947 seconds with 13 queries