Edge Grinder for the Spectrum

Show us what you're working on, (preferably with screenshots).
Post Reply
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: Edge Grinder for the Spectrum

Post by R-Tape »

Thanks for the tips Joe and Hikaru, they'll need some processing time (in my head not the z80).
AndyC wrote: Tue Nov 14, 2017 6:34 pm If you need the AY routine to be called at 50fps but don't want to wait for HALTs, why not just call it from within the interrupt handler itself? Your music might go iffy I suppose if you DI for too long, but that's probably as true for any other strategy. Alternatively count frames in the interrupt handler, call a music handler whenever you can and only have that actually call the real AY routine if the frame count has increased.
I haven't tested it yet but I think it's sure to sound wonky, interrupts have to be disabled for around 15% of the time during screen PUSH.

I've tried this with an AY tune* and (you'll be horrified I'm even considering it!) and I think it sounded okay. The main loop looks something like this:

CALL AY
a bit of stuff
rotatebuffer
CALL AY
xor stuff ON
push buffer to screen
xor stuff OFF
most other stuff

The distance between the two CALL AYs can be placed as close as possible to a frame apart, a lot of the routines have been written so they don't vary that much, e.g. if a sprite is off still draw it but elsewhere.

It's icky, but if it works I'll be happy.

When everything's in place I'll need to see how well I can refine it, barring a complete redesign or calling it a AY free first attempt.

*not the Edge Grinder track, which I still need to commission or get my hands on the CPC version.
Post Reply