Adding paddle support to Spacesnake?

Basic and Machine Language

Moderator: Moderators

User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

^
I haven't looked at the code but I always understood that it was done in Basic. I had no idea that ML was used at all...

As for the sensitivity of the controls: I don't really know how good it would be with paddles. It's just something that's been in my head since about 1985! :)
Leeeeee
soldering master
Posts: 396
Joined: Fri Apr 23, 2004 8:14 am

Post by Leeeeee »

nippur72 wrote:Also, Lee mentioned Space Snake being mix of basic and ML, but the version I've downloaded seems to be entirely in ML (it has a single SYS). What is the correct version?
They are both the same game program but the one you have has an extra layer of obfuscation hiding the BASIC part and is missing the disable memory expansion program that makes the original able to load and run correctly whatever memory expansion is fitted.

Lee.
Leeeeee
soldering master
Posts: 396
Joined: Fri Apr 23, 2004 8:14 am

Post by Leeeeee »

If anyone wants to look at the inner workings of spacesnake it's here.

It's not a brilliant program, fixing the bugs would help some. The best part of it, programming wise, was the loader program from the .tap version.

Lee.
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Post by nippur72 »

Leeeeee wrote:If anyone wants to look at the inner workings of spacesnake it's here
thank you, I'll have a look.

BTW, have you dissassembled it yourself ? and does the disassembly compile back to the original version ?
Leeeeee
soldering master
Posts: 396
Joined: Fri Apr 23, 2004 8:14 am

Post by Leeeeee »

Yes I disassembled it myself but it won't rebuild to the original without extra work.

You would need to remove all my comments and reassemble the lines that I've split into separate statements. The resulting BASIC source would need to be tokenised by some other tool as a lot of the resulting lines are too long to be input directly on a Vic.

If you wanted to make changes to the machine code parts other tools would be needed to assemble the machine code parts and produce the new hex code for the BASIC data statements.

It's also missing the loader program that disables any memory expansion as far as BASIC is concerned and the second loader that fixes the NMI vector to nuke the code and reset the machine.

Think of it more like an autopsy, you can't remake the thing from these parts but you can see how the thing was made.

Lee.
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Post by nippur72 »

Leeeeee wrote:Yes I disassembled it myself but it won't rebuild to the original without extra work. You would need to [...]
Ok, it seems perfect for testing my assembler preprocessor tool that lets me mix basic and ML together. My only doubt is: is there any need for the loader/extra stuff, or can I simply skip that?
Leeeeee
soldering master
Posts: 396
Joined: Fri Apr 23, 2004 8:14 am

Post by Leeeeee »

All the first loader did was to make sure all BASIC's settings were the same as they would be with no expansion RAM installed and then load the second loader. This then checked that it had been loaded by the first loader before boobytrapping NMI and loading the game.

So no, you don't really need it.

Lee.
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

Wow. This is so out of my league... :) I don't think I'll be adding alternative controller support in a hurry! :)
Leeeeee
soldering master
Posts: 396
Joined: Fri Apr 23, 2004 8:14 am

Post by Leeeeee »

I don't think I'll be adding alternative controller support in a hurry!
But all you need to do is rewrite the code from LAB_038B on in the second block of assembly code. You couldn't do much worse than it already is. 8^)=

Lee.
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

Leeeeee wrote:
I don't think I'll be adding alternative controller support in a hurry!
But all you need to do is rewrite the code from LAB_038B on in the second block of assembly code. You couldn't do much worse than it already is. 8^)=

Lee.
See? You lost me at 'LAB'... :P
Post Reply