Jump to content
IGNORED

Taking software SID emulation further


Tezz

Recommended Posts

I went back into the software SID emulation this week to have a think about the possibilities of developing the otherwise heavy cpu solution of processing three channels of 15.6hz based around the procedure from Ivo van Poorten. The irq running in zero page is now 92 cycles per scanline (Thanks to Phaeron and xxl for their assistance) so there's enough time available for P/M DMA. It's a shame not to make use of it for some title screens.

 

Phaeron reminded me the other day that Andymoo came up with a technique of using square waves and interrupting only on the waveform edges which I would be very interested to take advantage of with this once the game projects are out of the way.

 

http://www.youtube.com/watch?v=jOfD7rZ6GbI

Executable here : cybernoid.xex (PAL only)

Edited by Tezz
  • Like 12
Link to comment
Share on other sites

The ultimate goal for me with this is to write a custom A8 player with a mix of Pokey wave/noise tables and 15.6hz making use of Andym00s technique. It should open up some new possibilities. I've spent time in the past to fully disassemble several C64 players.

Link to comment
Share on other sites

10 years ago though I wasn't following what was going on with the Atari 8 bit.

 

My point being, I used to see emulation as something that could only happen between more a significantly more powerful machine and a significantly less powerful machine.

 

To now think that we have a Spectrum emulation (of sorts) and we have SID emulation is amazing.

 

And there's a lot of people on here much more knowledgeable than I am.

 

I am blown away by the knowledge of some on here, whether it be circuitry or knowing the exact timings of specific operations of the processor, all this is beyond me, but I have a lot of respect for those who do such things. Here's a few names (amongst others) I could name... Lotharek, Phaeron, Rybags, Candle...

Link to comment
Share on other sites

Personally, I think stuff like this should be posted in the main A8 forum as it would be of interest to more than just programmers and many people won't notice it here. I think this forum should be used mostly for the tedium of code and internal machine details.

Link to comment
Share on other sites

Cool stuft, Tezz... Looks like 2600 title screen :D.... No raster color changes possible? Or what about low DMA graphics mode...

haha yes it does pretty much :)

 

Even low DMA graphics modes aren't possible but the pmg title could look better if a kernel jump list polling vcount was possible to make some register changes although with 92 cycles per scanline + 5 cycles taken for P/M DMA there's 17 cycles per scanline remaining so with (114-97)*312 = 5304 cycles per frame for the original c64 player and the interpreter that's out of the question. Once this is taken down to one or two 15.6hz channels we should have some more headroom to play with.

Edited by Tezz
Link to comment
Share on other sites

Personally, I think stuff like this should be posted in the main A8 forum as it would be of interest to more than just programmers and many people won't notice it here. I think this forum should be used mostly for the tedium of code and internal machine details.

I thought it would be appropriate to post it in the programming section but you're probably right, it would be better in the A8 forum.

 

Can the mods move it maybe?

Link to comment
Share on other sites

Ram Refresh is 9 cycles per scanline.

 

It's been some time since I've looked at the coding of the SID emu stuff, but from memory it had heavy IRQ use and the player got the few remaining cycles.

 

I wonder - could it be changed such that the player portion is called by IRQ and the emulation (waveform stuffing) is the main task.

 

Some sort of cheap multitasking setup might be needed - preemptive swapping between the 2 tasks.

 

Problem I forsee though is that the playback would at times have lots of cycles/scanline and at other times have few which might affect the audio quality.

Link to comment
Share on other sites

ok cheers, 9 cycles regardless.

Having two channels of 15.6hz and the third channel from regular Pokey wave tables in the main player code should enable just enough time to add the kernel for one register change to the pmg display every even scanline or could go to one channel only to regain playfield DMA. I'll have to think about the possibilities of splitting it to a 2 part irq with the player task. Maybe not without dropping the rate. The differing amount of time taken by the player should not be a concern then.

 

Attached is the end of the Myth intro I did a couple of years ago with the display kernel jump table and 7.8Khz sample playing over two scanlines.welcome.xex

Edited by Tezz
Link to comment
Share on other sites

Idea to save cycles: Support extended memory. Pre-render values of the $1a SID registers, plus maybe some pre-calc there. In BlueREU, they didn't have enough frame time for the SID player too and so they "streamed" the registers values insted.

  • Like 3
Link to comment
Share on other sites

That's a great idea Jac, I didn't consider that :thumbsup: :)

 

I put some thought into the irq this morning before I left to see if I could squeeze in 2 channels of 15.6hz and the jump table for the pmg register changes, the best I came up with just about managed it but requires having everything including the jump list in zero page so only room for roughly 30 register changes in the pmg display.

Edited by Tezz
Link to comment
Share on other sites

You could remain with 3 channels of digital output and use 2 voices for normal Pokey waveforms.

 

When doing 16-bit mode, you could use the voice that you normally set to silent of the pair for digital output.

Nice idea, that would give scope for some interesting tracks.

Link to comment
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...