Star Avenger

Playing games on the MZ.
User avatar
mz-80a
Posts: 403
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

Re: Star Avenger

Post by mz-80a »

For anyone interested, I disassembled the loader for Star Avenger:
Star Avenger Disassemble.png
Star Avenger Disassemble.png (50.7 KiB) Viewed 2569 times
The reason for this is that I think there is some sort of primitive copy protection happening with it. I have the original tape (finally a working one) now and was trying to read it into MZF Studio but only the loader would load in. Not the main program. So I tried on my MZ-80A with Supertape 3 and found that after the loader program the 2nd data file just seems to be called "." with all of the tape header values set to $0000 so even Supertape 3 won't load that program in. Anyone know what the memory location $1194 is?
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
https: //mz-sharpworks.co.uk/
User avatar
mz-80a
Posts: 403
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

Re: Star Avenger

Post by mz-80a »

The plot thickens. I just noticed this in the loader file's header (first file on the tape with the title screen in) residing in the comments field from $1108:
Star Avenger Tape Header Comments.png
Star Avenger Tape Header Comments.png (50.81 KiB) Viewed 2557 times
Unsure what's going on now. It's an interesting puzzle. I probably shouldn't be trying to copy the tape or read the tape on my MZ-80A anyway but I found that the game will load on my MZ-80A (but won't run obviously as it's a 700 game) if I load the tape from the beginning. However, if I try to load only the 2nd file on the tape without loading the 1st file then the machine refuses (tape stops). Will be experimenting more on the MZ-700 now, I think, rather than the 80A (it's just convenient for me on the 80A at the moment).
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
https: //mz-sharpworks.co.uk/
User avatar
mz-80a
Posts: 403
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

Re: Star Avenger

Post by mz-80a »

Well, I've just successfully loaded my original Star Avenger tape on my MZ-700 so I've proven my tape is good. I then decided to try and circumvent the 1st 'loader' program and only load the 2nd one. I got the same result as I did on my 80A in SuperTape, the MZ says it's loading a file called "." and immediately stops. So at least I know it wasn't my 80A doing something strange. This actually does look like some neat copy protection now. Will be fun to try and work out what's going on.
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
https: //mz-sharpworks.co.uk/
User avatar
mz-80a
Posts: 403
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

Re: Star Avenger

Post by mz-80a »

Ok this is pretty interesting, different results from disassembling the loader when I do so on the MZ-700:
Star Avenger Loader 700.png
Star Avenger Loader 700.png (56.22 KiB) Viewed 2549 times
Pretty odd to suddenly have a different result than when I did this on the 80A. But this gets me a lot further, this is more like what I expected. This is priming the tape header memory locations with proper data to load the main part of the program. This will be easy to crack now :)
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
https: //mz-sharpworks.co.uk/
User avatar
mz-80a
Posts: 403
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

Re: Star Avenger

Post by mz-80a »

I successfully rescued the complete game last night. However, the loading screen part failed to execute the main game. Very strange, so still more to work out on this one. I can load the main game on its own though (which you can't from the tape due to the primitive copy protection) because I altered the MZF header in a hex editor to remove the $0000 addresses (which the loader should be inserting) and put the correct values in manually. I may alter the "JP NC,$1AD0" in the loader to just a straight "JP $1AD0" and see if that helps (could be an emulator problem perhaps).
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
https: //mz-sharpworks.co.uk/
S_U_C
Posts: 69
Joined: Sun Feb 17, 2019 6:41 pm

Re: Star Avenger

Post by S_U_C »

Hi,
$1172 is part of the screen XY co-ordinates
$1194 is the tab counter
I think
Ist listing is from the preloader
2nd listing is from the program that the preloader loads
which load another header
modifies it
and then loads the program data.

Try writting a program that just looks for headers and display the header contents to test if the Star Avenger has 3 headers
User avatar
mz-80a
Posts: 403
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

Re: Star Avenger

Post by mz-80a »

OK. Here it is, Star Avenger in MZF format :)
STAR AVENGER.zip
(14.6 KiB) Downloaded 458 times
I could not get it to work in the emulator with the -real- CMT header values in the main program file (i.e. all zeroes). I had to put the real values into the header even though the loader program modifies the CMT header and inserts the correct values. So strange (but at least that circumvents the 'copy protection') and at least I got the game off the tape and into a playable form.
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
https: //mz-sharpworks.co.uk/
User avatar
mz-80a
Posts: 403
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

Re: Star Avenger

Post by mz-80a »

Ah, just seen your message, thanks :) I didn't realise $1194 is the tab counter.
S_U_C wrote: Thu Apr 20, 2023 11:43 am Hi,
$1172 is part of the screen XY co-ordinates
$1194 is the tab counter
I think
Ist listing is from the preloader
2nd listing is from the program that the preloader loads
which load another header
modifies it
and then loads the program data.

Try writting a program that just looks for headers and display the header contents to test if the Star Avenger has 3 headers
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
https: //mz-sharpworks.co.uk/
Post Reply