Jump to content

Propane13's Photo

Propane13

Member Since 24 May 2001
OFFLINE Last Active Today, 7:20 AM

Topics I've Started

Stan's Atari Excellence Awards

Thu Feb 2, 2012 1:04 PM

I just found these 3 interesting links on Atariage:
http://www.atariage....2002/index.html
http://www.atariage....2003/index.html
http://www.atariage....2004/index.html

These are really neat; I was hoping there were more, but it seems that these features stopped in 2004.

Is there any reason why they did?

-John

Music-generation code strategies

Tue Jan 31, 2012 6:25 AM

Hello!

I've written TIA music before, and it's always a pain for me to get started.
There are so many variables, and I always bang my head against a wall before I start writing music.

Here's why.

Let's say the simplest algorithm for music generation is:
set channels once, never set again.
Read frequencies from a list at certain intervals-- if that frequency is $FF then change volume for that channel to zero, else turn the volume to a pre-specified amount (say, 6).

The above is a very simple practice, but there is so much more that people do with the 2600's sound capabilities.
I can see that some people may want to keep a table for volume toggling, and some may want a table for sound channel swapping.

If you take those into consideration, you may have more thatn 255 bytes of notes to deal with, since you have to do things in-between notes, and this could take up a lot of space (by this, I mean you may be toggling notes every 10 frames, but volume every frame). Plus, if you want to "fake out" that you have more sound channels, you may want to have AUDC switch between frames to 2 different sounds. It may sound a little funny, but this may allow you to feel like you put more sound into the mix.

And, to add one final headache to the mix, let's say that you have actual sounds in a game, and you want the "second track" of music to go quiet while a sound plays on screen-- you can see this happen in Pitfall 2; the music doesn't stop, but one channel seamlessly mutes whenever you get a gold bar.

Of course, all of this comes at a price, and I was wondering what some of the best coding algorithms are that people use to make their msuic better than the simplest method of "just notes, and no volume tweaks". Any recommendations?

Thanks!
-John

Any Cuttle Cart 2's near Philly / NJ?

Wed Jan 25, 2012 6:31 AM

Hello!

I was thinking of going to NAVA for the first time ever in NJ on Saturday, and I wanted to see a Cuttle Cart 2 in action (since I've never seen one).

2 random questions I have are:
- Does anyone in the Philly or NJ area have one?
- If yes, what would it take to motivate you to go to NAVA on Saturday?

Thanks!
-John

Too many cycles

Fri Dec 16, 2011 7:07 AM

Hello!

So, I was working on a project, and then a situation hit me that I think could be a real tripping hazard for 7800 programmers.
If I remember right, if you have more cycles of calculations than the space between VBlank starting and MARIA's next screen drawing routine, then on real hardware, you'll have some issues. I think (correct me if I'm wrong) that MARIA will go ahead and start drawing the next frame, interrupting whatever calculation you're on, but when she returns, you may have some register corruption. I think I remember running into something like this a few years ago.

Since this seems to be a valid situation that emulation does not trap (maybe it indicates that an issue is present with some subtle graphics glitches), I was wondering:
1) How many cycles are there between when VBLank starts (let's assume a worst-case scenario, when MARIA's last DLL is full of data), and when MARIA starts drawing the next frame? Is that an easy number to derive or estimate?
2) Is there any way in emulation or with a tool to see how many cycles some code is using in order to make sure you end up under that threshold?
What would be perfect is if I could press a button in prosystem and have it give a count of the cycles between MSTAT reads/writes/BIT commands. If it was over the cycle threshold in 1, put the color in red, if under, put it in green.

I know the 7800 community is limited, but I wonder how other programmers deal with this issue.
Optimization is the solution, sure, but how do you know when you've surpassed the threshold, or how close you are?
I guess the other possibility is to disable MARIA drawing when calculations take longer than expected, but I'm thinking that's more of a workaround than a correct solution.

Thoughts?
-John

Do any 7800 emulators offer debugging info?

Fri Nov 4, 2011 2:49 PM

Do any 7800 emulators offer debugging info (like the ability to monitor a specific location in RAM)?

-John