Jump to content
playsoft

Dragonfly Pokeymax Covox

Recommended Posts

I tried out Covox from the Pokeymax in my Dragonfly cart and was pleasantly surprised by the audio quality. The attached is playing with a sample rate of 7860, writing to Covox every 2 scanlines.

wa.a78

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

I had the same idea. I even did Rick Astley conversion - Never gonna give up :)
I have to go back to converting Neo Tracker player from 8bit Atari. The problem is that the player takes the entire zero page. The A7800 uses registers from $00- $3F.

But I Never give up.;)

  • Like 2

Share this post


Link to post
Share on other sites
5 hours ago, playsoft said:

I tried out Covox from the Pokeymax in my Dragonfly cart and was pleasantly surprised by the audio quality. The attached is playing with a sample rate of 7860, writing to Covox every 2 scanlines.

wa.a78 1 MB · 4 downloads

Works great on my Dragonfly. And interesting deep-cut you picked for the track. :) 

 

When I loaded up the .a78 it seemed to take a REAL long time before the DF cart said to power on the console. I worried for a second then realized that the digitized audio will be larger than the typical cart rom. It was only after it was playing that I actually looked at the file size. 👀

Share this post


Link to post
Share on other sites
26 minutes ago, DrVenkman said:

Works great on my Dragonfly. And interesting deep-cut you picked for the track. :) 

Sounds great on my Dragonfly as well. Cool track.👍

Share this post


Link to post
Share on other sites

How feasible is it to use this in a game?

 

e.g. Kung Fu Master, which uses sampling for the short karate yells in the game.

Share this post


Link to post
Share on other sites
4 hours ago, Synthpopalooza said:

How feasible is it to use this in a game?

 

e.g. Kung Fu Master, which uses sampling for the short karate yells in the game.

Unlikely. No IRQ, Vcount, Vblank ;(

The only hope is in DLI interrupts. 

I did something similar once for 8 bit Atari.

 

Share this post


Link to post
Share on other sites

If the interrupt is raised during during DMA, when the 6502 is halted, it won't be responded to.

Share this post


Link to post
Share on other sites

I tried out the timers/IRQ today and they work although the timing was a little different to the 5200/A8 where if you put POKEY in 15kHz mode 1 timer tick is exactly 1 scanline. If you set the timer running in the middle of a scanline and have the interrupt set the background to white then back to black, you end up with a vertical white line down the middle of the screen. On the 7800 it appears to take slightly longer as instead of a vertical line it veers to the right. I put a real POKEY in the Dragonfly and got the same result. If it had been accurate like the 5200/A8 then I was going to have the interrupts occur down the right side of the screen where Maria DMA is likely to have finished to avoid any delay in servicing the interrupt.

 

Since the interrupt is effectively moving (by taking longer than a scanline) there is no way to avoid the DMA. In this test the same track is played but from the IRQ instead of the main loop so you need to enable the POKEY IRQ on Dragonfly to hear it. It's still playing at a sample rate of 7860, just that the time between samples is inconsistent. In the main loop it reads the controllers and lets you move the silhouettes left and right.

 

I have a couple of things that I have been playing around with but I didn't plan to use samples so may not have enough cycles for the IRQ processing. I am going to try adding a sample and if successful will post here.

 

wa_irq.a78

 

 

source.zip

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, playsoft said:

Since the interrupt is effectively moving (by taking longer than a scanline) there is no way to avoid the DMA. In this test the same track is played but from the IRQ instead of the main loop so you need to enable the POKEY IRQ on Dragonfly to hear it. It's still playing at a sample rate of 7860, just that the time between samples is inconsistent. In the main loop it reads the controllers and lets you move the silhouettes left and right.

That sounds pretty good, better than I would have thought!

 

The DMA doesn't appear to be very high overall, or in any one particular zone, so the interference isn't likely too bad. That would make this at least usable for title screens, and the games themselves where DMA isn't being crushed. Even in the latter case, it still might be good enough for a lot of applications. :thumbsup:

Share this post


Link to post
Share on other sites

You know what I have found to be deeply lacking on the 7800? The bad apple demo. Maybe this is the chance.

  • Like 1

Share this post


Link to post
Share on other sites

Here it's used in something I'm working on, a more typical game setting, playing samples between attack waves. It sounds pretty good, still using a sampling rate of 7860. I don't have the guns firing yet so there will be a few more missiles on screen when the samples are played but that probably won't affect it too much. Credits are @kiwilove graphics, @RevEng's TIA sound effects and I borrowed @Fragmare's Air Zonk for some background music (playing on the second POKEY as a channel on the first is used for the IRQ timer).

 

I am reluctant to post a NTSC version because I can't test it and there's a bit of dodgy code needed to get it working. I have two DLIs, one to change the mode to 320 for the text area and another to change it back to 160. NMIs should have priority over IRQs but there is a timing issue where an IRQ can cause the NMI to be missed completely. Normally you'd get around it by positioning the IRQ to occur at a position on the scanline away from the DLI but I can't do that because for some reason the 15kHz timer is slightly longer than a scanline, so the position of the IRQ moves. Instead I reset the position of the IRQ in the first DLI, such that it's still OK when it reaches the second DLI and when it gets back to the first DLI again. This was very much suck it and see, I don't know if this position would work on NTSC where there are less scanlines per frame.

 

portal_p.a78

  • Like 8

Share this post


Link to post
Share on other sites

Very cool demo!

2 hours ago, playsoft said:

Normally you'd get around it by positioning the IRQ to occur at a position on the scanline away from the DLI but I can't do that because for some reason the 15kHz timer is slightly longer than a scanline, so the position of the IRQ moves.

Inaccuracies are likely due to a scanline length of 113.5 1.79MHz cycles (not 114 cycles like the A8), and the clock slowdown affecting Pokey whenever you access TIA and RIOT.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
17 hours ago, RevEng said:

Very cool demo!

Inaccuracies are likely due to a scanline length of 113.5 1.79MHz cycles (not 114 cycles like the A8), and the clock slowdown affecting Pokey whenever you access TIA and RIOT.

That's (the 113.5 cycles) a very good explanation for why the interrupt position moves rightwards. Thanks!

  • Like 2

Share this post


Link to post
Share on other sites

I haven't test this yet, but I sure want to now and will need to see if I can get a direct capture from it.

 

  • Like 1

Share this post


Link to post
Share on other sites

What happened to the file as it isn't listed as being available anymore? Darn...

 

Share this post


Link to post
Share on other sites
On 3/31/2021 at 9:59 AM, playsoft said:

Here it's used in something I'm working on, a more typical game setting, playing samples between attack waves. It sounds pretty good, still using a sampling rate of 7860. I don't have the guns firing yet so there will be a few more missiles on screen when the samples are played but that probably won't affect it too much. Credits are @kiwilove graphics, @RevEng's TIA sound effects and I borrowed @Fragmare's Air Zonk for some background music (playing on the second POKEY as a channel on the first is used for the IRQ timer).

 

I am reluctant to post a NTSC version because I can't test it and there's a bit of dodgy code needed to get it working. I have two DLIs, one to change the mode to 320 for the text area and another to change it back to 160. NMIs should have priority over IRQs but there is a timing issue where an IRQ can cause the NMI to be missed completely. Normally you'd get around it by positioning the IRQ to occur at a position on the scanline away from the DLI but I can't do that because for some reason the 15kHz timer is slightly longer than a scanline, so the position of the IRQ moves. Instead I reset the position of the IRQ in the first DLI, such that it's still OK when it reaches the second DLI and when it gets back to the first DLI again. This was very much suck it and see, I don't know if this position would work on NTSC where there are less scanlines per frame.

 

portal_p.a78Fetching info...

Can't actually test it as I noticed it is PAL so it isn't signed for NTSC use.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...