Comments (5)
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.
Thanks
from agon-vdp.
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.
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.
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)
- Documentation for new screen modes added in VDP 1.03RC2 HOT 1
- Make vertical timing of 640x240 modes the same as 320x240 modes HOT 1
- VDU to get a keycode HOT 2
- Documentation for virtual keycodes
- [Feature request] a VDU command to change only a byte in a bitmap, and some other stuffs HOT 1
- vdu 25,80,x;y; do wrong triangles HOT 8
- PRINT TAB() should be relative to text viewport. HOT 1
- Feature Request: the ability to copy from screen/buffer to current bitmap HOT 3
- VDP crash on real Agon but not on the emulator sending bitmaps data HOT 2
- PLOT 69 does not set the current position. HOT 1
- Key up events rollover HOT 1
- Feature Request: class ProxyWaveformGenerator : public WaveformGenerator HOT 2
- Circle terminal position is incorrect. HOT 3
- [bug] Issue with equal/plus key on French keyboard HOT 2
- When using double-buffered modes, keyboard input is not visible HOT 3
- Feature request: Changing video modes should preserver colour scheme HOT 2
- Feature request: expose the selected FG/BG colours HOT 5
- Agon locks up when POS and/or VPOS is used with VDU 31 HOT 2
- Leave firmware to Steve.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agon-vdp.