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: 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.
2012-02-26 09:33
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?
2012-02-27 19:58
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.
2012-02-28 13:53
cadaver

Registered: Feb 2002
Posts: 1160
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: 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.
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: 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.
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
Scrap/Genesis Project
Dr. Doom/RAD
Guests online: 97
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

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