It is currently Thu Mar 28, 2024 7:07 am

All times are UTC - 5 hours




 Page 1 of 1 [ 9 posts ] 
Author Message
 Post subject: ATR File help - Karateka & Bandits
PostPosted: Sun Sep 12, 2004 4:51 pm 

Joined: Sun Aug 31, 2003 9:50 am
Posts: 52
Location: Lansing MI
Hello,
I've spent the better part of a day creating Maxflash images from .ATR files with a 1MB cart. Most of the ones I tried worked, but the two that did not work are Karateka and Bandits.

In the case of Karateka, the title screen and story scroll and all animations prior to the game work fine. Hitting the START button does nothing, but hitting the joystick button will send it to a blank screen.
If I let it go to the end of the animation, it appears as if the game is working, but there are graphical problems. The game will play itself until your character gets to three life bars left and will lock up. Hitting the button will go to the black screen.
I booted my up disk version, and hitting the button starts the game loading from the disk, so I'm guessing that is the problem.

In the case of Bandits, all I get is a black screen.

I've tried it with and without -Osb switch.
Perl Maxflash.pl –diskpacker –osb –flasher

Both of the images I am using come from "Yet another ATR Game Archive" off this website. I'm using both the XEGS and the 800. Actually, I've not gotten a single Maxflashed ATR file to work on the 800. The XEGS has faired better.

Has anybody had any better luck with these two games?

Thanks,
Randy

(PS - I'm also having trouble getting Koronis Rift to work, but I'm more concerned with the other two. Koronis Rift will only get as far as the LucasFilm title screen.)


Offline
 Profile  
 
 Post subject:
PostPosted: Sun Sep 12, 2004 9:45 pm 

Joined: Sat Sep 13, 2003 12:21 am
Posts: 251
Your problems are probably related.

The flashcart kit uses the RAM under the OS in the XL/XE series computers. The 800 doesn't have that, so ATR flashcart images will not work.

Some games fool with PORTB ($D301), which is the memory config control bits on the XL/XE series. This may switch the OS area back to ROM, losing all the patches that Steve has overlaid on the OS to intercept calls to SIO D1 to redirect to cartridge.

Also, some games use their own loading routines and completely bypass the OS. Ballblazer has some of its own loading routines to support playing music in the intro during game load.


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Sep 13, 2004 5:03 am 
ERROR AT LINE 0
User avatar

Joined: Tue Aug 05, 2003 9:55 am
Posts: 1042
Location: Cleveland, Ohio
I took a look at the bandits.atr I have here and it has one of those obnoxious pirate bootloaders that try to re-initialize the machine.

I've nop'ed out a few instructions and it seems to work OK for me now. Give it a try with or without -osb.

Steve


There are images and/or files attached to this posting. You must be logged-in to view or download this content.


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Sep 13, 2004 5:12 am 
ERROR AT LINE 0
User avatar

Joined: Tue Aug 05, 2003 9:55 am
Posts: 1042
Location: Cleveland, Ohio
Kareteka appears to intentionally overwriting the OS. I cant promise anything but ill take a closer look at it.

Steve


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Sep 13, 2004 6:02 am 
ERROR AT LINE 0
User avatar

Joined: Tue Aug 05, 2003 9:55 am
Posts: 1042
Location: Cleveland, Ohio
Ok heres the deal with Karateka. It does intentionally try to overwrite the OS by loading disk sectors onto it. This breaks any soft OS like a translator disk or the patched OS the flash cart is using.

So I tracked down the pointers to the disk load tables and was able to fix the thing, but Karateka has all its disk sectors hashed with a table that changes for every sector, so just applying a patch to the ATR wont work.

The right way to fix it would be to decrypt the whole thing, rebuild the loaders and make a truely unprotected/unencrypted version, but its not worth the time for just one game.

Since we already have our own code in RAM getting called while these sectors are decrypted, we can hot patch the offending table from our code while Karateka is running.

Open the softdisk.a65 file and go down to the end until you find these lines:

   sta $d207

#IFDEF INTOFF


Change that to read:

   sta $d207

#IFDEF KARATEKA
   lda $a83
   ora $a85
   ora $a87
   cmp #$74
   bne _kar0
   lda #$18
   sta $a87
_kar0   nop
#ENDIF

#IFDEF INTOFF


Then save the softdisk.a65 and rebuild the disk image using these options:

maxflash.pl -diskpacker -karateka -flasher karateka.atr

It results in a working flash cart image here. I didn't play it a long time, let me know how it works for you. :)

Steve


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Sep 13, 2004 10:03 pm 

Joined: Sun Aug 31, 2003 9:50 am
Posts: 52
Location: Lansing MI
First of all, thank you very much for taking the time! It is appreciated.

I got Bandits to work perfectly! Thanks!

However, I am having trouble with Karateka.

I opened Softdisk.a65 but in the one I had with my 1MB version, there is no line: sta $d207.

#IFNDEF FLICKER
_flick lda $D40B
cmp #$70
bne _flick
#ENDIF

#IFDEF INTOFF
lda nmien
pha
and #$7F
sta nmien
sta wsync
#ENDIF

ldy #$00
_cpmem sta bankbas,x
lda (bufsrc),y
sta cartoff
sta (bufptr),y
#IFDEF COLORS
sta clrreg
#ENDIF
iny
bpl _cpmem

#IFDEF INTOFF
pla
sta nmien
#ENDIF


But, when I opened the file that came with the 8MB version, it was there.

I added it like this:

sta $d205
sta $d207

#IFDEF KARATEKA
lda $a83
ora $a85
ora $a87
cmp #$74
bne _kar0
lda #$18
sta $a87
_kar0 nop
#ENDIF

#IFDEF INTOFF
pla
sta nmien
#ENDIF

But, when I run the ...
perl maxflash.pl -diskpacker -karateka -flasher karateka.atr

...I get all sorts of errors. They scroll by way too fast to see most of them, but there are ...

Label not found (ora, cmp, lda, bne, sta…)
Label value misalligned
Unrecognized directive

I made a copy of the softdisk.a65 from the 8MB folder and pasted it over to the 1 MB folder, then tried running it. I also tried using the 8MB software with the same result. Something like 229 errors.

Whatdya think? Am I doing something wrong?

Thanks,
Randy


Offline
 Profile  
 
 Post subject:
PostPosted: Tue Sep 14, 2004 3:22 am 
ERROR AT LINE 0
User avatar

Joined: Tue Aug 05, 2003 9:55 am
Posts: 1042
Location: Cleveland, Ohio
Randy,

The 1mbit and 8mbit software is all in the same kit. I think you might just have an older version in your 1mbit folder. The one you have in your 8mbit folder sounds like its the current version so lets go with that.

The problem with your patch may be just formatting. TASM is extremely strict about intenting code. It thinks anything at the left edge is a label.

Make sure your code is indented like the rest of the code. Only the _kar0 label and the #IFDEF/#ENDIF directives should be at the left margin. All the other stuff (assembler instructions) has to be indented one level.

Steve


Offline
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2004 8:58 pm 

Joined: Sun Aug 31, 2003 9:50 am
Posts: 52
Location: Lansing MI
Shawn Jefferson wrote:
The flashcart kit uses the RAM under the OS in the XL/XE series computers. The 800 doesn't have that, so ATR flashcart images will not work.


Shawn,
Thanks for the information. I was starting to get frustrated...none of these dang carts are working on the 800!
I use the XEGS for the gaming system anyway, so this'll be just fine!

Thanks again,
Randy


Offline
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2004 9:10 pm 

Joined: Sun Aug 31, 2003 9:50 am
Posts: 52
Location: Lansing MI
classics wrote:
Randy,

The 1mbit and 8mbit software is all in the same kit. I think you might just have an older version in your 1mbit folder.


Yeah, I was an early adoptor, so I had the first version of the 1MBit kit. I honestly didn't realize that the 8MBit could be used for 1Mbit creation. I learned yet another new thing today! :)

classics wrote:
The problem with your patch may be just formatting. TASM is extremely strict about intenting code. It thinks anything at the left edge is a label.

Make sure your code is indented like the rest of the code.
Steve


That was it, exactly! This is brilliant! Karateka works perfectly now.
I'll go post the finished product in the 1MBit section.

Once again, thanks so much for the help! It is much appreciated.

Now that I have working games, I'll be buying some more carts soon. :D

Randy


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 49 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

cron