GithubHelp home page GithubHelp logo

Comments (5)

richardturnnidge avatar richardturnnidge commented on August 24, 2024

Just been struggling with this myself... Assuming you are on 1.04RC2 for this feature to work... You need an rst.lil $10 after each LD A instructions that you have to send the bytes to VDP. The result does not come back to any register, it gets put into the sysvar_audioSuccess system variable. See: https://github.com/breakintoprogram/agon-docs/wiki/MOS-API#system-variables. It may not a moment, it is not an instant reply.

from agon-vdp.

DjPoke avatar DjPoke commented on August 24, 2024

Thanks

from agon-vdp.

DjPoke avatar DjPoke commented on August 24, 2024

I'm doing this but while a note is playing, the status flag never return 3 :

wait_chan0_stop:
	LD A,23
	RST.LIS $10
	LD A,0
	RST.LIS $10
	LD A,$85
	RST.LIS $10
	LD A,0 ; channel
	RST.LIS $10
	LD A,1 ; command
	RST.LIS $10

	MOSCALL mos_sysvars
	LD A,(IX+sysvar_audioSuccess)

	AND 3 ; active and playing ?
	CP 3
	JR Z,wait_chan0_stop ; loop

	RET

from agon-vdp.

richardturnnidge avatar richardturnnidge commented on August 24, 2024

Have a look on the Agon programmers Discord server, Steve went through the basics with me, check the 'music, general' section. I wrote a dead simple Basic version first based on his sample to check the system was doing the correct thing, then applied to Assembly. I found my code needed to go off and do something else for a while after sending the status request and checking for the answer.
https://discord.com/channels/1080130527908069467

from agon-vdp.

DjPoke avatar DjPoke commented on August 24, 2024

Right. A simple 'wait VBL', after checking for the status, seems to do the job.

; wait vblank
wait_VBL:
	MOSCALL mos_sysvars
	
	LD A,(IX+sysvar_time)
	LD B,A

wv_loop:
        MOSCALL mos_sysvars
	LD A,(IX+sysvar_time)
	CP B
	JR Z,wv_loop
	
	RET

from agon-vdp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.