Jump to content
  • 0
ZeroByte

pre-R39 cc65 question

Question

Posted (edited)

I'm trying working to make a quick pull request to fix the YM2151 clock frequency on github (still gotta figure out how that works using the command line but not asking that here) and so I recompiled my AdLib emulation demo to see that the playback pitch is correct with my setting - but my program doesn't run because waitvsync() seems broken in cc65 on the main branch....

I don't want to update cc65 yet because I don't want to mess with cc65 at the moment because I don't want to inadvertently break my ability to write for R38 until R39 is official. Does anyone know what breaks about waitvsync() in "R39" and what a workaround might be?

I did load one of my BASIC programs that plays music, and it's correct pitch on that, and poking a concert A into the YM produced the correct pitch, so I'm already convinced, but I wanted to hear music play back correctly before making the decision to submit my pull request.

Edited by ZeroByte

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0
On 4/6/2021 at 4:15 AM, AndyMt said:

 

I've updated my Repo so now waitvsync() uses RDTIM instead of the TIMER memory address. This makes it compatible with more ROM versions, but also a bit slower.

 

This is more important than I thought. Apparently the jiffies clock is updated very late in the kernal IRQ handler. When I started working on input code on my Flappy Bird game, I noticed tearing at the top of the screen whenever I hit keys on the kbd. This means that waitvsync() isn’t even getting control back until AFTER vblank is done.

Not a big deal for me as I already plan to switch over to using the raster IRQ anyway, but I thought it might be useful knowledge to share this.

  • Like 1

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.

Guest
Answer this question...

×   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.


×
×
  • Create New...

Important Information

Please review our Terms of Use