Tezz Posted January 11, 2014 Share Posted January 11, 2014 (edited) 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 January 11, 2014 by Tezz 12 Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 12, 2014 Share Posted January 12, 2014 Nice work. Plenty of SID tunes have heavy use of square/pulse wave but there's often the noise component as well. Worth a shot I suppose. Alternatively, a noise channel might be emulated by doing frequency translation and just using 16-bit AUDF control. Quote Link to comment Share on other sites More sharing options...
+JAC! Posted January 12, 2014 Share Posted January 12, 2014 WOW, and excellent choice of the tune. For me this is a dream come true. Pitty it requires DMA to be off... Quote Link to comment Share on other sites More sharing options...
Tezz Posted January 12, 2014 Author Share Posted January 12, 2014 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. Quote Link to comment Share on other sites More sharing options...
snicklin Posted January 12, 2014 Share Posted January 12, 2014 If someone had told me 10 years ago that 8-bit machines would be emulating other 8-bit machines, either in full or part, I would have told you that you were mad, a joker or a liar. Quote Link to comment Share on other sites More sharing options...
miker Posted January 12, 2014 Share Posted January 12, 2014 (edited) Well, there were first tries on SID-player almost ten years ago: http://atariage.com/forums/topic/45267-softsynth-2/?hl=%20sid%20%20player Not counting the routines in HARD demos and first version of Mental Age game. Edited January 12, 2014 by miker Quote Link to comment Share on other sites More sharing options...
snicklin Posted January 12, 2014 Share Posted January 12, 2014 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... Quote Link to comment Share on other sites More sharing options...
Tezz Posted January 12, 2014 Author Share Posted January 12, 2014 Well, there were first tries on SID-player almost ten years ago: http://atariage.com/forums/topic/45267-softsynth-2/?hl=%20sid%20%20player Not counting the routines in HARD demos and first version of Mental Age game. Yea, I was always hoping Saint would return for more Atari stuff. Quote Link to comment Share on other sites More sharing options...
Tezz Posted January 12, 2014 Author Share Posted January 12, 2014 @snicklin I know what you mean, I remember being amazed as the first complete system emulators started appearing all those years ago. Quote Link to comment Share on other sites More sharing options...
miker Posted January 12, 2014 Share Posted January 12, 2014 (edited) Yea, I was always hoping Saint would return for more Atari stuff. I hope too... But he's more that addicted with tuning his old car. :/ Edited January 12, 2014 by miker Quote Link to comment Share on other sites More sharing options...
Bryan Posted January 12, 2014 Share Posted January 12, 2014 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. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted January 12, 2014 Share Posted January 12, 2014 Cool stuft, Tezz... Looks like 2600 title screen .... No raster color changes possible? Or what about low DMA graphics mode... Quote Link to comment Share on other sites More sharing options...
+David_P Posted January 12, 2014 Share Posted January 12, 2014 To now think that we have a Spectrum emulation (of sorts) and we have SID emulation is amazing. Don't forget the Apple II emulator: http://atariage.com/forums/topic/131940-apple-ii-emulator/?hl=apple%20ii%20emulator Quote Link to comment Share on other sites More sharing options...
Tezz Posted January 12, 2014 Author Share Posted January 12, 2014 (edited) Cool stuft, Tezz... Looks like 2600 title screen .... 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 January 12, 2014 by Tezz Quote Link to comment Share on other sites More sharing options...
Tezz Posted January 12, 2014 Author Share Posted January 12, 2014 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? Quote Link to comment Share on other sites More sharing options...
MaPa Posted January 12, 2014 Share Posted January 12, 2014 Are the RAM refreshes counted into the 92 cycles? Quote Link to comment Share on other sites More sharing options...
Sikor Posted January 12, 2014 Share Posted January 12, 2014 Don't forget the Apple II emulator: http://atariage.com/forums/topic/131940-apple-ii-emulator/?hl=apple%20ii%20emulator And other: http://atarionline.pl/v01/index.php?ct=utils&sub=B.+Emulatory And of coz some game strictly emulated by Atari (like Asteroids). Quote Link to comment Share on other sites More sharing options...
Lynxpro Posted January 12, 2014 Share Posted January 12, 2014 I'd imagine an AMY could've emulated the SID w/o CPU overhead but unfortunately, that didn't happen back-in-the-day due to Atari - Inc and Corp - failing to bring it to market... Quote Link to comment Share on other sites More sharing options...
Tezz Posted January 12, 2014 Author Share Posted January 12, 2014 Are the RAM refreshes counted into the 92 cycles? I'm not sure about ram refresh cycles with no playfield DMA? Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 12, 2014 Share Posted January 12, 2014 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. Quote Link to comment Share on other sites More sharing options...
Tezz Posted January 13, 2014 Author Share Posted January 13, 2014 (edited) 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 January 13, 2014 by Tezz Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 13, 2014 Share Posted January 13, 2014 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. Quote Link to comment Share on other sites More sharing options...
+JAC! Posted January 13, 2014 Share Posted January 13, 2014 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. 3 Quote Link to comment Share on other sites More sharing options...
Tezz Posted January 13, 2014 Author Share Posted January 13, 2014 (edited) That's a great idea Jac, I didn't consider that 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 January 13, 2014 by Tezz Quote Link to comment Share on other sites More sharing options...
Tezz Posted January 13, 2014 Author Share Posted January 13, 2014 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.