Sunday 22 February 2009

Lost in the Amazon!


22nd February 2009

Today I have been busy, programming a new front for a Psytronik software SEUCK game. I was given a .c64 image one of the games in the The Last Amazon series. Because I am not all that comfortable with CCS64, I decided to make a .tap of the Sideways Scrolling SEUCK game (Left version as there was no right scrolling version) and then save i to the .tap image.

After I saved the SEUCK game on to a .tap image, I loaded the .tap into WinVice which took some time to load - the stripes are strange? I thought SEUCK used multicoloured stripes like Novaload originally did.

After the game loaded, I filled unwanted data with zeroes (Between $6580-$b6c0) and edited $54EF from LDA $8000,y to LDA $5000,y so that the enemy bullets in the SEUCK game will fire on a random basis. I created a work disk and saved 2 separate files for the SEUCK game. From $0900-$6580 and $B6C0-$FFFF.

Next I loaded a disk with a few different files which Kenz supplied me. The disk contained the logo files, and loaded up the Vidcom paint image and saved the image as three separate files on to my work disk and I also saved the 2x1 charset on to the disk as well. Then I drew some sprites using Faces's Sprite Editor.



Now the next thing for me to do was to extract the title and game music by WAZ, from the very first Last Amazon game (Which was suggested by Kenz that I should use this music for the front end of this game). So I saved two separate music files in Voicetracker/Music Assembler format. Then I loaded up the Dutch USA Team Music Assembler and relocated the tunes to estimated possible locations for when I write my new front end for the game.


Once the music was saved, all I had to do was prepare my cross-assembly project, by making a new folder and put all the C64 data into that folder, along with the and also the ACME cross-assembler and also the brilliant Exomizer cruncher.

Now that all files were prepared, I opened Relaunch 64 and I did a test build of the game, by linking all C64 data into the source, using the !bin "filename.prg",,2 command. So as a small test I entered the two SEUCK files and compiled the source then used the Exomizer to compress the data down and tested it all in WinVice.

It seems that the SEUCK game worked, so now I linked all C64 files to possible locations in the source and got ready to program my new front end for the game.

The first thing which I had to do was make some source files for the scroll text and also the front end text. After that was done, I worked on a once at a time run routine. This is where defaults will be set on the title screen for the very first time after decompression had finished. Next I added a routine that turns off all interrupts and a delay routine, so when game is over, the title screen is delayed for a very short amount of time.


Next I added a colour and screen routine, for displaying the colour data for the title screen text and also the logo's colour data. Then I worked on with the main IRQ interrupt routines. Before I did this, I switched off the KERNAL by setting #$35 at $01. This allowed me to use higher memory after $a000-$ffff, except for memory between $d000-$e000, which obviously needs to be used as POKE storage lines anyway!

Now I programmed the raster interrupt init routine. Usually I use the KERNAL $0314-$0315, but this time I used something more complex, which was $FFFE and $FFFF. This made IRQs longer, but I did not need to use KERNAL.

I used 3 IRQs to make 3 raster splits. The first one was for the scroll text, the second was for the bitmap logo and the last one was for the still text. I had to fiddle around with the charset values, so that I could display a charset that was at $7000 while screen memory is at $7c00. I managed to succeed to display the logo and the static 2x1 text.

After the success of the splits, I was programming the 2x1 scroll text, until I came across a problem. After assembling and compressing the program, no scroll text displayed. There was a problem there. I was scratching my head wondering what was up with the routine. Well, the routine was correct, but the scroll text was being pasted at the wrong screen memory. I used the $0400-$07e8 screen RAM instead of the $7C00-$7FE8 screen RAM. Hahahaha, how dumb was that? :oD. After I changed the scroll's screen memory I got the text to tick along the screen. There was no smooth scroll, but I managed to fix this problem by updating the bottom split, so that $D016 was run by the scroll control code.

My next step was to add and position the sprites and expand the sprite positions. So I used the typical software sprite expansion mode which I used for many of my games and programs, by ROR-ing $D010 as usual. I got the sprites to display, so now it was time for me to do some functions for the sprites.

So my next job was to program the options routine. This had to be done where the joystick direction from either joystick port can choose the number of players or to choose music or sound effects, pressing fire will take the player to the game. This was done by creating some labels and routines, that could display the correct sprites that correspond to the option the player selects. There is more to it though, because as well as sprite options, I needed to program the functions for each option, by building some extra routines. Just simple pokes really.

Where I had to program the in game music function. I had to put BIT routines where the SEUCK was playing the sound memory for the game sound effects. I also had to add a poke that would initialize and play the in game music, without being interrupted by the sound effects. When I tried this, the routine unfortunately crashed. I found out where I went wrong here. I was POKEing the wrong address, which was somewhere in the SEUCK's IRQ memory. That was bad! I managed to fix the routine by using the correct address to POKE for initializing the in game music.

The sound effects bit was similar to the in game music method, but I had to restore the correct poke values for the where sounds originally had BIT next to them and should be replaced with STA only for sound effects. This worked successfully.

The only thing that was missing in the game options was the player options, so I added some routines to select between 1 or 2 players by using the standard SEUCK player mode pokes. This worked a treat, and I was happy with the final result.

To end it all, I added the typical Richard Bayliss colour wash routine on to the scroll text, so that there is something interesting going on in the front end. Hahahahaha.

Now all I had to do was have a quick test to see if the game is working. Well, seems it is working at the moment. After game was over, I decided to test the whole game to see if all works. Well fantastic news. The game works, no crashes or missing sprites. Fantastic!

Now I shall send it off to Kenz to look at and also pass to Alf to see what he thinks of the new front end bolted to his magnificent sideways SEUCK game.


No comments:

2023 at a glance

2024 is here, and 2023 has been a really quiet year on the production front due to everything that had gone back to normality. The year has ...