Monthly Archives: February 2008

Shredz64 – Added Score Saving

Implemented figuring out if you made it into the high scores or not, allowing you to enter name by pressing up/down to select letter, green to advance, red to erase, yellow to save. Saves to memory, then to disk. Still has some bugs though, to be squashed in the next couple days.

Shredz64 – Added CIA Timer Interrupts

I realized while rocking out at 1AM this morning to a Ghostbusters SID theme, playing along on a plastic Playstation guitar hooked up to a Commodore 64 that I could be considered, by some, to be a nerd. ๐Ÿ˜‰ But I don’t care, it was awesome.

Lots of progress tonight. I started adding a few more SIDs in yesterday, and realized some of them weren’t playing at the correct speed. After investigating more, I realized that these SIDs were setup to use custom controlled CIA timer interrupts as opposed to fixed raster interrupts. While the PSID file does specify whether the song uses rasters or timer interrupts, I wasn’t reading that, I was making every sid use rasters. Well, I ran into a particularly awesome song that I definitely wanted in the game that used Timer interrupts, and it was playing at 1/5th the normal speed. So I wrote timer interrupt code as well as the code to detect what kind of interrupt the SID uses when it loads it in. Now it will play both kinds of SIDs at the correct speed (well, there’s still the PAL SID playing too fast on NTSC and vice versa, more on that someother time).

Anyway, got the timer interrupts working, also implemented code that allows me to slow the song down for when recording notes onto a new SID file. I need to make the editor more robust though, its just too difficult to do any major note editing with right now. But for now it serves its purpose.

Also added a “YOU LOSE”/”YOU WIN” screen. A lose condition is where your crowd meter falls to 0 before the end of the song. A win condition is when you hit the end of the song without your crowd meter hitting 0. Pretty simple, just like Guitar Hero/Rock band. The Lose screen allows you to play the song again or return to the main menu. The win screen WILL allow you to record your name into the scores table, but I haven’t done that yet. I did however insert default names into the code if there is no score file found. Before it was just printing blanks with 0 for a score. I added a few more characters to the menu set to spruce things up as well, though nothing major. I also fixed up a really dumb mistake that was causing a certain portion of memory from getting overwritten.

So, I currently have 6.8K of memory left (on the heap) for the game, which I think in itself will be enough, but I also think I can free up about a K as well. I already have memory reserved for the better graphics on the game play screen, so no worries there, this 6.8K is pretty much for just code, and there honestly isn’t a lot left to code. Save scores, alter shredocity meter (and activate ‘star power’ or whatever it will be called), a few extra lines of code for the better graphics, and then really additions to the editor screen. Past that, we’re good to go I think. More to come…

Shredz64 – Loading Screen

I’m tired so excuse this entry if its choppy. Finished up the final loading screen (well, final for now, I like it and I’m done spending time on it right now). Here it is:

The very first thing Shredz64 does after reconfiguring RAM and copying the kernel is loading this screen. While this screen is being shown, the floppy is scanned for all sid files, the filenames are cached, each file is scanned for its title and author and scores, which are all cached. The screen is then blanked out, and custom character sets are loaded in. Allowing this is the character set loader I wrote – quick and easy. I found some nice character sets on the web and loaded in one that looks a bit better than the default C64 charrom. Then I found this great windows program called Cuniform by Kevin Schuetz. I booted it up in Wine, its basically a C64 character set editor, but its got lots of features, and most importantly imports BMP files, which is great. I did a quick “MAIN MENU” kind of thing in GIMP in a nice looking font, popped it into Cuniform, pasted it onto the edge of the character set I’m using for the menu system, and voila, great looking fonts at no cost.

Speaking of graphics, I’m loading the multicolored hires bitmap into Bank 0 in the same area that I later load SID files into. The first 16K of memory now is pretty much reserved for SIDs and graphics. However, I don’t think I’ll be using bitmaps for the main game screen, as one I would be sacrificing a lot of SID space which could keep a lot of cool songs from being played. Also, they’re just too slow to work with. But I will be implementing a more 3d-ish board using a custom character set – while the menu charset resides at the 12K mark, I still have 2K left before the end of Bank 0 at the 14K mark, where I can put a gameplay character set. All will be good.

Anyway – reiterating whats left to do – I’m done playing around with graphics until the end, I got my fix for now. Next is the Win/Fail screens and score entering/saving functionality.