• Published on | Aug 18, 2015 | by FozzTexx

Bug fixes and new features for ninepin

Adventure games via Periscope Over the weekend I was having some fun with Periscope and having people join in while I played some old graphic text adventures. Remember graphic text adventures? They were text based adventure games but would show a picture above the text so you didn’t have to use your imagination as hard. You still have to type commands and read descriptions. Because of their slow pace I thought they would lend themselves well to a little bit of interaction while streaming over the internet.

I pulled out some of the Apple II disks I had as a kid and played three games: Transylvania, Mask of the Sun, and Mission Asteroid. The next day I thought I’d do the same thing on the Commodore 64, except that I don’t have C64 floppies from when I was a kid! Sure, I could have mastered some floppies but that seemed like a hassle so I hooked up my Pi and ninepin to the C64 instead.

The first problem I ran into was that some of the games need more than one disk and ninepin only supported one d64 image at a time. I quickly added a feature to ninepin so that I can swap between disks by pressing the Select button on my USB gamepad. Pushing Select by itself will simply do a swap between two “sides”, and I even made it so that it can swap between up to four disks by holding down Select and pushing one of the action buttons and then releasing Select.

Of course I quickly discovered that games and cracks like to manipulate the BAM and other things in interesting ways. One of them was that they would lie about how many sectors a file actually used. I had to fix a bug in ninepin to prevent it from trying to allocate a negative size buffer to hold a file in. Another thing they like to do is mess around with the listings. I did some work on getting directory listings to show up the way they should.

Unfortunately one of the most popular things that games seem to like to do is talk directly to the 6502 in the 1541 and install their own fast loader. Trying to deal with that right now is much too complicated. I don’t really want to build a 6502 emulator or 1541 emulator. Trying to do that would mean messing around with the kernel module I wrote and might require removing a lot of the separation of the hardware from the user space that I achieved with the IEC module. I really don’t think the kernel is an appropriate place to stick a 6502/1541 emulator.

I’ve pushed the bug fixes and features up to the github repo, so be sure to check them out. And if you’re interested in playing along the next time I play some games, be sure to follow me on Twitter!

Join The Discussion