I need of an INTERRUPT TIME hook for a sound SFX in assembler

Page 2/2
1 |

By ro

Scribe (4355)

ro's picture

08-02-2021, 15:13

wondering what May 1st will bring this year... Smile

By ro

Scribe (4355)

ro's picture

08-02-2021, 15:27

I took a quick look, there's not a BASIC prepared loader. In essence it's simple:

- load the driver binaries
- load the SEE data file
- initialize (including putting it on the interrupt if ye wish)

But there needs to be some extra assembly to assign sound fx etc. But that's easy Smile
hmm

By gasparrini

Champion (321)

gasparrini's picture

09-02-2021, 19:27

Sorry if i would like to insist, but you "RO" and "DAEMOS" did not give me the
answer to help me make this blessed sound effect routine work.

Please, if any of you could intervene to solve my programming and small
development program.

Thanks in advance, I look forward to your positive feedback.

By Daemos

Paragon (1878)

Daemos's picture

09-02-2021, 22:27

I am affraid that nobody will give you the awnser because we allready gave it to you. I am affraid that at this point you are on your own. I gave you a part of the int handler, ro gave you instructions on the see replayer code. Thats all that we can give you.

By ro

Scribe (4355)

ro's picture

10-02-2021, 11:00

Hai gasparrini,
I'm sorry we could not help you like you've hoped. Sometimes it takes a bit more effort on both sides to get things working. You get what you ask for.

In your initial post you showed us some ASM source code, do you do any asm at all?

You know what, I'll have a look into loading SEE driver and DATA in BASIC and have SFX on interrupts. My BASIC is a bit rusty, so I can't promise much. I'm an assembly guy Smile

Give me a few days to figure stuff out. Get back to you.

By thegeps

Paladin (717)

thegeps's picture

10-02-2021, 11:51

Well, I think that it is enough to write a little sfx replayer that update psg regs every vblank with a counter to stop the sfx. It has to be hooked in H.TIMI and started with a check on a memory loc. So, to start the sfx he has to poke 1 to that loc. The sfx replayer will reset that loc when sfx loop is ended.
So replayer routine coukd start at c001h in this way:

 Org 0c000h
Sfx_flag:
 db 0
Sfx_check:
 ld a,(0c000h)
 dec a
 ret nz
Sfx_replayer:

Code...
 ret

To play sfx from basic he simply has to do poke&hc000,1

My 2cents

By ro

Scribe (4355)

ro's picture

10-02-2021, 14:03

That is exactly the point, and SEE provides just that. The problem is that it needs a driver AND data loaded, have an interrupt setup, and have an entry for BASIS to work with. When yer only prog knowledge is BASIC, then you need help Smile

By ro

Scribe (4355)

ro's picture

19-02-2021, 14:39

As promised: I made a small BASIC loader and dito program. Uploaded it here: https://www.msx.org/downloads/music/trackers/sound-effect-ed...
included Hinotori sound FX, for yer liking :)

It's been 100 years, or so, since I did some BASIC programming. So, bare with me on that. The "see.bas" programm loads the driver and data loader, initializes the driver and sets FX 0 to demonstrate. I was gonna use the a=usr("inputvariables") stuff but couldn't get it to work, so everything is accessable as a POKE. Including loading the file (the file$ string has 2b 8 chars exaclty, end with spaces if needed)

something like that?

Page 2/2
1 |