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 > Hacking Questreader to work from any drive number
2011-08-17 02:28
doctorfargo

Registered: Aug 2011
Posts: 20
Hacking Questreader to work from any drive number

Hello everyone,
I'm working on updating some of my old Questwriter text adventures. Questwriter is a Text Adventure Construction Set published on Loadstar #77.

While QuestWriter is used to make the games, a smaller one-file ML program called QuestReader is used. My question is this - like most older programs, QuestReader only works on drive #8 - would it be possible for someone who is ML savvy to hack/modify the program so that it will run from any drive number?

Here's one of my old QuestWriter games - the QuestReader file is on the disk:
http://gamebase64.com/game.php?id=19357&d=18&h=0
 
... 10 posts hidden. Click here to view all posts....
 
2011-08-19 10:56
Frantic

Registered: Mar 2003
Posts: 1648
Yeah, so that's what I thought. This is how I do it in some code somewhere btw:

	lda $ba
	and #%00001011 ;Restrict range of the current device number.
	ora #%00001000 ;Make sure it is at least $08 (i.e. in the range $08-$0b)
	sta $ba


In effect, if the current device number is between $8-$b, it will remain unaffected. If it is outside this range, it will be forced into this range. In the particular case that the current device number is set to $00 (typical when uninitialized), it will be forced to $08 instead, which is good, since $8 is the default device number in most circumstances of course.

Works good enough for my purposes and seems to be a simpler version of more or less the same thing that Krill's code does (well..). Does not solve issues like the "special cases" spelled out by Krill+J0x here, of course. Substitute "and #$b" for "and #$9" if you only want to allow device 8 and 9.
2011-08-21 08:37
Graham
Account closed

Registered: Dec 2002
Posts: 990
CMD drives also have device numbers 12-15.
Previous - 1 | 2 - Next
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
Holy Moses/Role
/Panor..
iAN CooG/HVSC
deetsay
DJ Space
Unicorn/TWA
t0m3000/hf^boom!^ibx
Guests online: 135
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 Censor Design  (9.3)
5 Triad  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.7)
4 Acidchild  (9.7)
5 Cash  (9.6)

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