Monthly Archives: December 2007

Shredz64 – Raster Interrupts Working

Let me first say that if you ever get the idea to drive an hour both ways in a major snow storm, quickly forget that idea. Trust me.

Apart from my 2 hour turned 6 disaster, some good additions tonight. After banging my head against the wall the last few nights with getting raster interrupts working with my code and the way the compiler writes the executable, I finally got it working tonight. The speed of the program is just sick now, I think I’ll be able to add some better graphics into the program while still maintaining necessary speed for SID processing and reading the guitar. Which is good, because it will look better, and a few people have written in with some nice examples of how it could look. And since I am definitely not an artist I’ll be writing you guys back. ๐Ÿ™‚

The program has come a long way since I posted that video a few days ago (I’m almost tempted to take it down since it goes so much faster now, but I’ll keep it up until I get a new video online). Checklist of things left to do:

1. Finish and debug button/scoring code that detects whether a correct button combination was pressed or not.
2. Implement an in-game editor that allows creating note-button data for any given song (pretty necessary for both now and end-user expansion)
3. Create intro screen, game menu, song selection, etc
4. Allow saving of score to disk
5. Add some nice backgrounds, better sprites and graphics if possible (most likely will be at this point)

Also, PSX64 related, after the game is completed I’m going to be getting some professionally made PCBs to sell if anyone is interested, more on that later though. Remember, the PSX64 can be used with any playstation controlled on any DB9 digital joystick system (C64, Amiga, Atari, SMS, etc)

Shredz64 – Code Rewrite and Optimization

Oh man, lots of coding tonight. I rewrote pretty much the whole graphic/sprite engine and optimized a ton of crap, I didn’t realize how much unneccessary code I had in there until the SID file exposed just how much processor time it was taking up. The majority of the fixes were things like only redrawing a specific area instead of a general region, precalculating sprite movement ahead of time instead of running division and multiplication operations every refresh to figure out where to put a sprite, stuff like that.

Long story short, songs now play at full speed, even while the maximum number of notes are on screen and hammering away at the strum bar. There are still a few more things to add into the gameplay that will slow it down a bit, but I’m confident now it won’t be an issue. Actually, after all the work tonight, there really aren’t a lot of major obstacles left, the only thing that will be a pain at this point is getting real button-note data in there so notes on the fret board actually line up with the music. I was thinking of writing an editor that could be used in game to add your own note data, allowing you to add any sid file you want and turn it into a Shredz64 song. This is probably what I’ll do, as I need to make a tool to get it in there anyway, no way am I typing out the millisecond of every note to appear on the board.

I’m thinking that it will function by playing a SID very very slowly, letting you play the notes on the guitar where you want them, and then records this to the note file. The only thing that might be weird is some sound envelope processing won’t work correctly playing the PSID file so slowly, and might not play at all. We’ll see, it doesn’t have to be perfect by any means.

I’m confident that in a months time I will have a full video of at least 1 demo song in action. Check back often! ๐Ÿ™‚

Shredz64 – SID playing implemented

After finishing up some other projects going on, I’ve finally been able to work on Shredz64 again, which I’m pretty happy about. Lots of good updates, and even a movie (please read disclaimer before watching!)

First off, I had to abandon my work with the SID converter. It was a neat idea and was kind of working, but the files it made were waaaay too huge for a C64, the timing didn’t work properly (and was never going to), and would require an extra step whenever I (or anyone else) wanted to add a new SID to the game. So instead I decided to focus more on having Shredz64 support (most) SID files with no conversion necessary.

As mentioned before, sid files, unlike other music files, are actually executable code (with a header) and not just music data. They have hard coded addresses in them and must be loaded at an exact address or nothing will work properly. I modified Shredz64 to reserve a 10K block in memory (leaving a little room for the loader, but up to $2FFF is for the SID) which allows most SIDs that execute within that space to work. I then wrote a few quick assembly routines to initialize and play the sid, and inserted them in the appropriate places in code. The result was that a sid file can now be placed on disk and read by Shredz64, and played, with correct timing (well, correct timing when nothing else is happening).

Below is a link to a video that shows Shredz64 in action. It’s fairly painful at the moment, but I was so excited to finally get the SID code working properly that I wanted to upload it. If you take a gander at it, please keep the following in mind:

1. I haven’t optimized any of the code yet, and it lags the song. There are a number of places where I can save a lot of processing time, so I’m not too worried.

2. Except for some note-buttons at the beginning, I just plugged in the same two notes over and over again for test purposes. Plus, the note-button timing is working off the old system and zips by. It will obviously go slower when the game is done.

3. I wasn’t playing the guitar while this demo was recording, so no score will increase and the crowd meter falls. Also, thanks to Marc Fischer for creating the SID

I’m very excited, I see this new sid code working out a lot better than the old. Also, I’ve got a few SIDs in mind for the final product that are going to be freaking sweet. ๐Ÿ˜‰