It is currently Mon Oct 20, 2014 5:43 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 141 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8  Next
Author Message
PostPosted: Tue Oct 14, 2008 4:22 pm 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
Hi guys,

YEEEEEEEEEEHHHHHAAAAAAAAAAAA!


oh sry to american.....

'Well done lads. Couldn't have done it without you'
(which move was that again....)

It works!
I tried FR1 version (the one that showed no extra white blocks befor the north, west etc...) and used LSB=134 and MSB=3 from quill to call the util at &380
Why did you take &380 Martin?

I'll send you de corrected version from Frances.

Code:
   10 REM Direction Util for 'Quill'
   20 REM When loaded into RAM, Quill can access
   30 REM it, and will display the possible
   40 REM directions in the adventure.
   50 REM
   60 REM original by Quill author
   70 REM extended/altered version by Francis G Loch
   80 REM Version 2.0
   90 :
  100 MODE6
  110 FOR N%=0 TO 3 STEP 3
  120 P%=&B00
  130 [
  140 OPT N%
  150 .START:LDA &350A:STA &70:LDA &350B:STA &71:LDX #0
  160 .START1:CPX &502:BEQ START2:LDY #0:LDA(&70),Y
  170 CLC:ADC &70:STA &70:LDA &71:ADC #0:STA &71:INX:JMP START1
  180 .START2:LDY #0:.S2_LOOP:LDA S2_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S2_LOOP
  190 LDY #1:STY &72
  200 .START3:LDY &72:LDA (&70),Y:CMP #255:BNE START0
  210 JSR &FFE7:JSR &FFE7:RTS
  220 .START0:CMP #0:BNE START5:LDY #0:.S0_LOOP:LDA S0_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S0_LOOP
  230 .START4:INC &72:INC &72:JMP START3
  240 .START5:CMP #1:BNE START6:LDY #0:.S5_LOOP:LDA S5_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S5_LOOP
  250 JMP START4
  260 .START6:CMP #2:BNE START7:LDY #0:.S6_LOOP:LDA S6_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S6_LOOP
  270 JMP START4
  280 .START7:CMP #3:BNE START8:LDY #0:.S7_LOOP:LDA S7_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S7_LOOP
  290 JMP START4
  300 .START8:CMP #4:BNE START9:LDY #0:.S8_LOOP:LDA S8_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S8_LOOP
  310 JMP START4
  320 .START9:CMP #5:BNE START10:LDY #0:.S9_LOOP:LDA S9_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S9_LOOP
  330 JMP START4
  340 .START13:CMP #11:BNE START4:LDY #0:.S13_LOOP:LDA S13_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S13_LOOP
  350 JMP START4
  360 .START10:CMP #8:BNE START11:LDY #0:.S10_LOOP:LDA S10_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S10_LOOP
  370 JMP START4
  380 .START11:CMP #9:BNE START12:LDY #0:.S11_LOOP:LDA S11_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S11_LOOP
  390 JMP START4
  400 .START12:CMP #10:BNE START13:LDY #0:.S12_LOOP:LDA S12_TEXT,Y:JSR &FFE3:INY:CMP #0:BNE S12_LOOP
  410 JMP START4
  420 .S0_TEXT:EQUS "North, ":EQUB 0
  430 .S2_TEXT:EQUS "Visible exits : ":EQUB 0
  440 .S5_TEXT:EQUS "South, ":EQUB 0
  450 .S6_TEXT:EQUS "East, ":EQUB 0
  460 .S7_TEXT:EQUS "West, ":EQUB 0
  470 .S8_TEXT:EQUS "Up, ":EQUB 0
  480 .S9_TEXT:EQUS "Down, ":EQUB 0
  490 .S10_TEXT:EQUS "NorthEast, ":EQUB 0
  500 .S11_TEXT:EQUS "NorthWest, ":EQUB 0
  510 .S12_TEXT:EQUS "SouthEast, ":EQUB 0
  520 .S13_TEXT:EQUS "SouthWest, ":EQUB 0
  530 ]
  540 NEXT
  550 CLS
  560 PRINT"LSB=";START MOD 256
  570 PRINT"MSB=";START DIV 256
  580 PRINT'"Save code ? (Y/N)  ";:YN$=GET$
  590 IF YN$="Y" THEN PRINT"Ok. ":OSCLI"SAVE C.Quil-u2 B00 CFF":PRINT''"Saved as : C.Quil-u2"
  600 END


Cheers

Koen

EDIT :
I don't know either the difference for &250A and &350A. only that it the &250A is for the disc version of Quill and the &350A is the Tape version. And I'm using the cracked tape version (I thought Martin helped me too with that :) ) and we should the &350A.


Top
 
PostPosted: Tue Oct 14, 2008 11:24 pm 
Offline
User avatar
 Profile

Joined: Fri Apr 25, 2008 7:55 pm
Posts: 147
:o

Only just seen this Koen - I've been waiting all night for you to "make dinner and get the kid to sleep" :lol: You must have replaced that post about the same time so I just looked on the forum front page at the time of your last post and thought you hadn't been back on!

Good news then :D

Ok, we (probably I :( ) now need to rewind a bit and do some hard work...

1. Re-work the message selector/printer to use the character/phrase flags as discussed.
2. Join the above message code with the utility caller and locate them in a suitable place such as your beloved $0B00 ;)
3. For the utility caller, I need you to allocate me a Flag to use to identify at run-time the required utility of the four (?). I just picked $0530 because you hadn't mentioned any this high so it sounded safe!
4. Pick a SWR block other than 4 for the utilities since the message database is already in 4. I think they are 4-7 and maybe you need another for your original WindRam utility if you are using it for this adventure?
5. Collect all four (?) utilities, assemble them to their final SWR locations such as $8000, $8100, $8200 and $8300 if they are all <256 bytes else $8000, $8200, $8400 etc. The latter would require a change to the caller if we still want to id the utilities just as 0-3.
6. Anything else you can (and will) think of ;)
7. Get some sleep....

I use $0380 just because I can but also it tends not to clash when everyone else uses $900 onwards!

Ok project manager - Manage! :lol:

Martin


Top
 
PostPosted: Wed Oct 15, 2008 12:39 am 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
Hi Koen,

Glad it's working for you. :)

Hopefully sometime next week I'll get some time to sit down and look at the problem I'm having with the fade routine.

Kind regards,

Francis


Top
 
PostPosted: Wed Oct 15, 2008 8:33 pm 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
Hi francis and Martin,

Francis
If you can't fix the util in the way you want to make it, I can stay with the default colour palette and then the routine is (i guess) finished. But if you want to spend some more time, it would be GRAND!

Martin
Ok, Martin, try to answer most of your points :
1. think you do that?
2. hmm don't think me either... ;)
3. The flag you can use is &508
4. indeed 4-7 are free. So you can use 4 & 5 and I'll keep the 6 & 7 for thw window util and extra characters.
5. I collect them and send them to you.
As for nou there are 4 utils : 1 - your message util (don't know the size) ; 2 - the direction util (8000 - 817A) ; 3 - colour switch from colour 0 and 3 (B00 - B15) ; 4 - fade util (don't know the size).
The last one is still in development, so could be the last. Easy to add then.

You want me to relocate the utils to 8000 and above?
The biggest for now is the direction util so I think it's going to be 8000, 8200 etc.
But the fade routine can change this.

Did you receive my disc image by mail, with the question about the problem I have?

Cheers

Koen


Top
 
PostPosted: Wed Oct 15, 2008 9:47 pm 
Offline
User avatar
 Profile

Joined: Fri Apr 25, 2008 7:55 pm
Posts: 147
Hi again :)

Yes, now I've looked again I did get the email and I'll investigate the problem, it'll be something simple.

The message util CANNOT be moved to SWR - as I said, it pages in the SWR block containing the text messages and in doing this, if the util itself was in another SWR block then it would switch itself out and crash! Thus, this util and the recent routine to call Francis' direction utility need to both live in ram. They can be pushed together and located at $B00 or similar and there would be two calling addresses to enter either one.

So, we'll just have three actual utils in SWR then and yes, we can go to 512 bytes per routine @ $8000, $8200 and $8400. The colour switch and direction utils are less than 512 so with only three it doesn't matter if the fade goes over 512 provided we make it the last @ $8400.

Ok, will use $508 as the flag - you will then set this to 0, 1 or 2 and call the selector at it's location+6 to run one of the three SWR utils.

If you want to relocate them that's fine - are you familiar with using P% and O% to assemble non-relocatable code to an address in rom? If not, you possibly have some examples where I've relocated Francis' direction util.

You'll have to bear with me on this stuff - it's clashing with my hardware projects a bit :( so I'll try and mix your stuff in over the next few days or so.

Finally, why is Francis' to-do list so much shorter than mine...? :lol:

Martin


Top
 
PostPosted: Wed Oct 15, 2008 11:32 pm 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
MartinB wrote:
Finally, why is Francis' to-do list so much shorter than mine...? :lol:

My to-do list is big enough as it is between my various projects! ;)

Kind regards,

Francis


Top
 
PostPosted: Wed Oct 15, 2008 11:39 pm 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
Yrrah2 wrote:
Francis
If you can't fix the util in the way you want to make it, I can stay with the default colour palette and then the routine is (i guess) finished. But if you want to spend some more time, it would be GRAND!

I want to get it working as I feel it is something that I should be able to do and it is annoying me that the solution is being a bit elusive.

I was thinking about the problem today and I may have the beginnings of a possible solution, but I'll need to plan it out properly to see if it will work in practice.

Kind regards,

Francis


Top
 
PostPosted: Thu Oct 16, 2008 9:36 am 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
Hi there,

Quote:
The message util CANNOT be moved to SWR - as I said, it pages in the SWR block containing the text messages and in doing this, if the util itself was in another SWR block then it would switch itself out and crash! Thus, this util and the recent routine to call Francis' direction utility need to both live in ram. They can be pushed together and located at $B00 or similar and there would be two calling addresses to enter either one.

Ah sry, my mistake had forgotten that.
Yes indeed then. 3 utils to fit in one SWR.

Quote:
Ok, will use $508 as the flag - you will then set this to 0, 1 or 2 and call the selector at it's location+6 to run one of the three SWR utils.

Ok. Send me the basic version when ready.

Quote:
If you want to relocate them that's fine - are you familiar with using P% and O% to assemble non-relocatable code to an address in rom? If not, you possibly have some examples where I've relocated Francis' direction util.

Well I understand the P% is the place where it should go.
But the O% is not clear for me. I saw B00 in one of the utils. Is that the place where it originally written as sort of reference?

I'll have a go at it to try and relocate it. (then I learn again something ;) )

Cheers

Koen


Top
 
PostPosted: Sat Oct 18, 2008 3:40 am 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
Yrrah2 wrote:
But the O% is not clear for me. I saw B00 in one of the utils. Is that the place where it originally written as sort of reference?

O% isn't really clear for me either. I've seen it used in the Advance User Manual just after a P%=&8000, but was never 100% sure why it was there.

An explanation would be nice. ;)

Kind regards,

Francis


Top
 
PostPosted: Sat Oct 18, 2008 10:06 am 
Offline
User avatar
 Profile

Joined: Fri Apr 25, 2008 7:55 pm
Posts: 147
Hi.

Francis will know this first bit but..... Any code which references absolute addresses within it's own confines is classed as non-relocatable. The simplest examples are where we might have a JSR nnnn to a subroutine within our piece of code or where we JMP to a target also within our code, When assembled to a specific address, these assembled instructions now contain absolute addresses so we can't just load the code somewhere else because at the first JSR or JMP we would leap out to the wrong address. So, if we want take a piece of non-relocatable code currently assembled to say $0B00 and move it $8000 then we have to re-assemble it to live at $8000.

The problem is, if we simply set P% to $8000, the object code will be written at assembly directly to $8000 and since this is normally rom (Basic), the object code will simply be lost. Therefore, we use O% to tell the assembler to produce code for final location at P% but to actually write the object code to a ram address, O%. Then, after assembly, we can save the code from ram at O% but later load it at $8000 or wherever the target address P% was set to.

To activate the use of O%, there is an extra bit used in OPT%, bit 3, and if this is set, the O% offset will be used. Basically then, where we say OPT%=0 to 3, use OPT%=4 to 7.

So, for example, if we have one page of code to run at $8000 but we want to temporarily assemble it to $0B00, we set P% to $8000, O% to $0B00 and loop OPT% from 4 to 7 (if you want a listing).
Then we do a save, *SAVE CODE 0B00+100 8000 8000 which woul create the object code file CODE and set its load and run addresses to $8000.

Hope this explains ok.

Martin


Last edited by MartinB on Sat Oct 18, 2008 9:26 pm, edited 1 time in total.

Top
 
PostPosted: Sat Oct 18, 2008 10:50 am 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
Thanks Martin, that explains it quite nicely. :)

Kind regards,

Francis


Top
 
PostPosted: Sat Oct 18, 2008 6:52 pm 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
I think I understand it too.


Top
 
PostPosted: Sun Oct 19, 2008 12:43 am 
Offline
User avatar
 Profile

Joined: Fri Apr 25, 2008 7:55 pm
Posts: 147
Hi.
Quote:
I think I understand it too.

Hmmm.. you don't sound convinced - if there's something still not clear just say :)

Anyway, first job done from my list. I've fixed the message conversion problem - had my head stuck in real Hex mode so forgot that Ascii decimal numbers get one character longer much quicker than Ascii Hex numbers. We would have got in even more of a tangle after message 100 :shock:

Here's the changes you need to make to your pretty version of my version (!) of QCONV :

Code:
965 I%=LEN(MN$)-1
970 MN%=VAL(LEFT$(MN$,I%))
1010 BPUT#W%,(J%-I%)

(The large print isn't an insult, it's just that the % symbol is tricky to read in the default 'code' size.)

I shall attend to the rest of my list in due course ;)

Martin


Top
 
PostPosted: Mon Oct 20, 2008 8:46 pm 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
Hi there

Sorry for the long delay before answering. Been sick.

Quote:
Hmmm.. you don't sound convinced - if there's something still not clear just say :)

Well I'm not shure yet. Have to try and see. Could be my english for not understanding ;)
But I'll shout :)

The lines you gave me to change, are that the line numbers in the version I send you?
That would be :
Code:
965 I%=LEN(MN$)-1  <--- new line
970 MN%=VAL(LEFT$(MN$,I%))  <--- replaces -->   970 REPEAT
1010 BPUT#W%,(J%-I%) <--- replaces -->  1010 MN%=VAL(LEFT$(MN$,LEN(MN$)-1))

But at line 1000 is an UNTIL for the repeat at line 970.. :?:
and after replacing the REPEAT is gone.
And at 1010 you give an BPUT (the new line) that also is at line 1040 and 1050.

Should your new line 970 be at 1010 from my version
And should your line 1010 not be in place of 1050 in my version?
And where is 965 going to be then.

More confusing :shock:

To make no mistakes at this, I'll send you the disk image again. So that the lines are the same you check to see.

Cheers

Koen


Top
 
PostPosted: Mon Oct 20, 2008 9:37 pm 
Offline
User avatar
 Profile

Joined: Fri Apr 25, 2008 7:55 pm
Posts: 147
Hi Koen.

Sorry, my fault this time, I must have been using an older version of your program. Here's the three lines again and to your program this means 1 new line and 2 replacement lines. The code for each line is the same as my last post but I have corrected the line numbers :
Code:
1005 I%=LEN(MN$)-1
1010 MN%=VAL(LEFT$(MN$,I%))
1050 BPUT#W%,(J%-I%)

The format of the created SWR binary file was fine, as is the assembler message retrieve and print routine. However, the byte in each SWR message which points to the next message was 1 too large after 10 and would have been 2 too large after 100. During the binary file creation I was only stripping off one character from each ASCII source message number when of course it should be two from 10-99 and three from 100-255. The 'unstripped' characters were not (correctly) included in the message but were corrupting the next message pointer.

I'm well on with the rest of my stuff so watch this space ;)

Martin


Top
 
PostPosted: Tue Oct 21, 2008 9:05 am 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
Hi Martin,

Have seen your update :)
But send you a mail back with some error again :( (sry to bother you with this)

Quote:
I'm well on with the rest of my stuff so watch this space ;)

Great :D

Cheers

Koen


Top
 
PostPosted: Tue Oct 21, 2008 11:33 am 
Offline
User avatar
 Profile

Joined: Fri Apr 25, 2008 7:55 pm
Posts: 147
Hi Koen.

I believe all my stuff is now working fine but....

There's a strange character appearing in you test text source file. It shows in PC text editors as a '' (usual for most non-printing characters) and if I look at the file in a hex editor it has the code $1A. You can see from the snippet below where the character appears in two places.
Code:
#11
This is the first message
#12
This message is a long message
with no RETURN in it, but these
RETURNs aremade later when I was
finished writing.
#13
This message (number 13),
contains a RETURN
#0
The End
#

The problem is, when this character is then printed on the Master, it actually performs a 'cursor home' and resets the print position to the top left of the screen and hence the text output stream falls apart.

You'll have to look where this character is getting in - must be some sort of control character that View uses although I thought when I'd tried using it there was a text only option (spool or something?) that kept control characters out.

Martin


Top
 
PostPosted: Tue Oct 21, 2008 12:03 pm 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
Hi Martin,

Just had a look at it in the Editor from the master (*EDIT)
And there are the 2 characters that do not belong there. Had removed them and it all works fine!
Going to have a look at it and what causes the trouble.
I think it must been put there while editing the file. (not the view file, but the spooled file from view.) I must have made a mistake somewhere. :?

Cheers

Koen


Top
 
PostPosted: Tue Oct 21, 2008 12:54 pm 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
Yes was my mistake. Made an error by editing a SPOOLed text in View.
Sry.
I even tried to make messages from 1->15 skip a lot make a message 99.
Even That works. So I don't have to make 16 -> 98 empty messages.
GREAT!

Cheers

Koen


Top
 
PostPosted: Tue Oct 21, 2008 2:30 pm 
Offline
User avatar
 Profile

Joined: Fri Apr 25, 2008 7:55 pm
Posts: 147
Ok, things are looking good then :D
Quote:
I even tried to make messages from 1->15 skip a lot make a message 99.
Even That works. So I don't have to make 16 -> 98 empty messages.

That's no accident! I designed the SWR message format around linked pointers where the message number is just a data item to id the message being searched for. Therefore, the order of the messages doesn't matter and message slots can be missing as you have found. I thought I'd mentioned that in the early days so sorry if you've wasted any effort creating blank messages.

The only CRUCIAL thing is that there is a message #0 and that it is the last message in the image. It's absence would at best cause random garbage to be printed and at worst cause a crash. If it's there but not last, any messages after it would be ignored.

Martin


Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 141 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 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