Category Archives: Shredz64

Shredz64 – Reading SID Info

Added in functionality to read in artist and track name from the SID file and display it on the song selection screen. Also added in functionality to read length of song and display that as well. Next will be saving and displaying scores for each song. The program started randomly crashing tonight for the first time, so I think I may be running out of memory (which isn’t surprising, I’ve been a bit liberal with allocating space for song information). I’ll have to pare it down and see how it goes.

Shredz64 – Scanning Disk for SIDs

Tonight I found a cc65 implementation (e.g. uses cbm.h) of the POSIX routines for reading in the directory structure on a C64 disk (need to investigate who wrote it originally to give credit, its just a quick segment of code). Hacked it a bit to fit what I was doing – now from the main menu, you can choose to play or edit a song. Once choosing either, it will present you with a song selection screen – it automatically scans the disk for any files ending in “.sid” and displays them as selections. If you edit them, it will save an according “.not” file with the same filename base. If you play it it will load the correct “.not” file. Now if people want to add their own sids, all they have to do is drop it onto the disk with a .sid ending! (And make sure the SID is one that executes in the first 10K of memory, which most do). This makes the program a lot easier to test (and more fun!).

Shredz64 – Mini Note Editor Done

The majority of the note recorder is done, properly records and writes to file, worked out some bugs from before. Changed ending the song from an empty strum to pressing the whammy bar, just in case an empty strum is accidentally hit. Also created a main menu that uses the guitar to select options. Added a credits screen. Next up is detecting all songs on disk, displaying them for selection with title and artist, showing scores, and saving scores after playing. I’m pushing development up a notch, I’d like to get this done soon.

Shredz64 – Mini Note Editor

Just a quick update – holiday season took over my life! Things have settled down now – got some code done on the note editor – looking good so far. Plays song and allows user to press buttons and strum, recording what buttons are pressed at what time when strumming. These values are saved in a buffer, and then written to a standard note file when the strum bar is pressed without any buttons.

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. ๐Ÿ˜‰

Shredz64 – Still Alive!

Just a quick note to everyone taking an interest in this project – I am still indeed working on it, I’ve just been sidetracked (until mid July) on a big side project (IE paying the bills). Expect more updates in a few weeks! Thanks!

Shredz64 – Reading Note Data

Lots of very promising progress tonight (and a few nights ago). First off, I implemented code that will read both note data for fret buttons and music data from SID files off of floppy disk. I also wrote some quick utilities on my Linux box to generate note files for testing. So all the static values are out of the program and its reading off files now. More importantly though, I implemented a good portion of the SID -> Shredz64 converter tonight – this sounds much fancier than it actually is. The issue is normal SID files are big blocks of 6502 machine code that have been ripped (or created), but they contain code for manipulating the processor, memory, etc as opposed to just being music data. Not only does this waste CPU time, but its also difficult to switch back and forth between executing Shredz64 code and executing SID code. My solution for now was to hack the libsidplay library on my Linux box, and intercept any memory writes to the virtual SID chip (0xD4XX) and dump the address and the value to a binary file, along with the relative time the memory write was made. E.g. I play a SID file on my computer, and in addition to playing it it dumps all the SID chip data to a file. Shredz64 then uses that file as its music data. Actually, I didn’t implement the timing tonight, but I did manually set the timing inside the game just to test it out, and it played the music pretty accurately! Very promising for first try. I do need to compress the files somehow, at least look for repeating sequences, since they get pretty big. Hopefully filesize won’t end up being an impossible issue. But hearing music out of the game for the first time tonight sure was awesome!

Shredz64 – Additions to Game Screen

I added the applause meter tonight that shows how well you’re doing overall and how close you are to failing. As can be seen, its a vertical bar separated into three sections, filling from bottom to top. When doing well, the bar fill is green, when okay its yellow, and when bad its red. When empty its game over! (Though I don’t have a game over yet). Your applause increases when you correctly strum a note, and decreases if you miss a note or incorrectly strum. I also fixed up some bugs recognizing correct strumming, and separated the code out into multiple files now that things are getting bigger. Next up is reading note and song data from files, and then the SID converter plugin!