| |
Mr. D
Registered: Jan 2006 Posts: 4 |
IDE64 fixing the game Moonfall
Hi Everyone!
I wanted to play my old favorite game, Moonfall on IDE64. But i couldn't find an IDE64 fix. I tried to do it myself, but haven't succeeded yet. Maybe someone will be so kind to help me and save me (or other wannabe fixers) some weeks of suffering :)
Actually this game is a one-filer, but you can save game to tape or disk. I intended to change the tape save to IDE64. Okay, i've read the guide, not to use fixed device numbers, but in this case you can switch between tape or disk, and i will be happy with device 12 instead of tape.
I write down here the things i figured out so far.
Least importantly $cc2a is the "TAPE" caption. I changed it to 08 03 21 1f. "ID64"
At $3725 we set the device number for the tape mode. I think LDA #$01 should be changed for LDA #$0c ?
$cc4c - $ce11 seems to be the save game data.
From $cc36 there is the file name. And $ceb7 is the device number.
$cf84 - setlfs and setnam
$cee5 is the call for save ($ffd8), but if i'm right, it returns $05 - device not found for $0c device.
Could someone comment on how to carry on? Thanks in advance!
D |
|
| |
soci
Registered: Sep 2003 Posts: 480 |
Probably the vector table at $314-$333 was restored to the original kernal table, make sure it's preserved
(skip the restore which is usually jsr $fd15 or $ff8a, or save and restore it when needed). Also if you self
modify on program start the device number based on $ba, then it'll use the same device for the save files
where it was loaded from, not just the hardcoded 12.
|
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
Quote: Probably the vector table at $314-$333 was restored to the original kernal table, make sure it's preserved
(skip the restore which is usually jsr $fd15 or $ff8a, or save and restore it when needed). Also if you self
modify on program start the device number based on $ba, then it'll use the same device for the save files
where it was loaded from, not just the hardcoded 12.
also i'm interested in this.
What about zero page value?. What locations must be preserved? |
| |
soci
Registered: Sep 2003 Posts: 480 |
I've made an update in "The Manual" for this topic now. I'm not going to blow up the page layout here, so
please see chapter 13.3.4 on page 166-169 for details ;)
http://singularcrew.hu/idedos/beta/IDE64_users_guide_beta.pdf (~1.3 MB)
In short the answer is most likely 90-91, 93-95, 98-9a, 9d, a3, a4, ac-af, b7-bc, c1-c2, 259-276, 31a-333.
But it depends on the use case.
|
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
This is very sweet (ninja) information. Thanks! |
| |
Mr. D
Registered: Jan 2006 Posts: 4 |
Thanks Soci for the answer! I'll keep on trying. But if anyone more experienced feels so, please give it a try and if you succeed, please write down the missing steps in a comment. |
| |
soci
Registered: Sep 2003 Posts: 480 |
I couldn't really figure out how to trigger load or save in this game for testing ;( At least not before I got bored with trying.
|
| |
Mr. D
Registered: Jan 2006 Posts: 4 |
:-) At least i can help with that. You have to land on a base first. You see that blinking rectangle on the ground in front of you at start. You have to land on that. Space and C= keys for controlling speed, and joy2 for directions. Then you have to walk into that rhombus and then select 6.clone. This is the save menu. You can change the upper options with joy, then type a filename and return.
I hope this helps. And thanks again for your efforts! :-) |
| |
soci
Registered: Sep 2003 Posts: 480 |
Thanks, the hard part reaching the disk menu is solved then ;) Then back to the fix. I took the Chromance
version from this site. After removing the intro there's a few lines of code at $900, that one I leave it as
it was (probably there was some reason it's there), but before starting the game at $84ad a patch is added
to update the built in vector table and the hardcoded device number for the disk. The patch:
*= $900
.binary "original",2
*= $900
stx $bb
sty $bc
sta $b7
lda #$01
sta $b9 ; as it was
ldx #$19
- lda $31a,x
sta $af7b,x ; copy vectors
dex
bpl -
lda $ba ; last device
cmp #31
bcs def ; range check 8-30
cmp #8
bcs ok
def lda #8
ok sta $3723 ; disk number if selected
sta $ceb7 ; default
jmp $84ad ; start
Should work with any drive now. I've uploaded a test version to:
http://singularcrew.hu/ide64warez/moonfall-test.prg
It seems to load/save ok, but I haven't played the game to verify if it's ok.
|
| |
Mr. D
Registered: Jan 2006 Posts: 4 |
I've just made a quick test, and it seems to be working great for me, too! Thank you, Soci! Nice one again. :-)
(Maybe you could put in the caption change before releasing it, if you'd like to waste a little more time with this.)
http://dagobah.net/flash/thank_you.swf
|