Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > IDE64 fixing the game Moonfall
2012-02-25 00:55
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
2012-02-26 07:35
soci

Registered: Sep 2003
Posts: 474
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.
2012-02-26 09:33
Flavioweb

Registered: Nov 2011
Posts: 447
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?
2012-02-27 19:58
soci

Registered: Sep 2003
Posts: 474
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.
2012-02-28 13:53
cadaver

Registered: Feb 2002
Posts: 1153
This is very sweet (ninja) information. Thanks!
2012-02-29 10:24
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.
2012-03-01 22:40
soci

Registered: Sep 2003
Posts: 474
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.
2012-03-01 23:20
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! :-)
2012-03-02 21:12
soci

Registered: Sep 2003
Posts: 474
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.
2012-03-02 22:46
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Didi/Laxity
celticdesign/G★P/M..
Guests online: 101
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.039 sec.