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, 2, 3, 4, 5, 6 ... 8  Next
Author Message
PostPosted: Wed Sep 10, 2008 12:05 am 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
MartinB wrote:
I was going to suggest that parameters could be passed via this memory but it sounds like Francis has thought of a better solution.

Well, I'll need to try what I have in mind and see if it works first. If it doesn't I may need to fall back to passing parameters or just stick with the standard palette.

Kind regards,

Francis.


Top
 
PostPosted: Wed Sep 10, 2008 8:55 am 
Offline
 Profile

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

I think you answered my question. But as you read the manual I think you found it yourself (or am I wrong)

As for your question, In Quill I can set flags. These flags can have any number I want (well almost any number)
You can read out these falgs from &500 - &540
A little change is there then before.
To display a text from SWR from the util you have written there are 2 flags needed (instead of 1 as before).
&50A has number that can be 11 to 25. The 11 to 25 are flag numbers that contain the number for the util to diplay the correct text.
Example :
&50A = 14 (14 is in my case Simon, a character in the Adventure)
14 is equal to flag location in the memory at &50E
&50E = 32 (32 is the text number to be displayed, so Simon says message 32 from the SWR)

Hope this is hat you wanted to know and that the extra flag is not a pain in the ass to add in the util.

For the util from Francis, there is no flag needed to readout.
If you want Francis I can reserve 4 flags for the 4 colours of the palette of mode 1 colours.
So you don't have to calculate what palette is used.
Like you can read out 0,2,4,7. That would be : 0 (colour set for colour 0) and 2 (colour set for colour 1) and 4 (colour is set for colour 2) and 7 (colour is set for colour 3)

Cheers

Koen


Top
 
PostPosted: Tue Sep 16, 2008 11:19 pm 
Offline
User avatar
 WWW  Profile

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

I've got a test program up and running (in assembler) which is working as expected, although I haven't implemented the fade routines as yet.

In its present design, from your end you would need to do something along the lines of this:

1. Set up colour palette (or just leave as default)
2. Call initialisation routine*
3. Load in image
4. Call fade in routine*
5. Wait for a bit (however you are going to handle this)
6. Call fade out routine*

The steps appended with the * are parts handled by my routines.

I have assumed that the routines will only need to work with Mode 1 screens so other modes (other than Mode 5) are not catered for. If this will be a problem then let me know.

Kind regards,

Francis.


Top
 
PostPosted: Sun Sep 21, 2008 1:40 pm 
Offline
 Profile

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

Sorry for not replying sooner. Was away for a while to Poland.
About the routine you discribe, sounds good!

1. The colour palette is just by setting the VDU 19,.... etc?
Or do you refer to the colour palette I can make with the flags I can set within Quill?
2. What does the initialisation routine? - Is this loading the machine code and set all to black?
3. yes indeed load an image
4. call the fade in routine
5. Then people play a bit in the adventure
6. call the fade out routine (when a certain point is reached in the game)

The fade in and out routines should be called with separated commands.
This because you have to play a bit before you get a fade-out.
Maybee you can split the fade routine up in 2 programs? One for the fade in and one for the fade out. Then it is also easier for Martin to convert it to SWR and easier to call it from Quill.

Cheers

Koen


Top
 
PostPosted: Mon Sep 22, 2008 9:34 am 
Offline
User avatar
 WWW  Profile

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

As long as the screen is set up for your desired palette you can use any method you like.

What the initialisation routine does is examine the screen's current palette (hence why this should be set up before calling this) and stores this information. The routine then sets all the colours to black prior to loading your picture.

The way I have designed the fade routines is that you have a 'code base' (the memory location where the code is loaded to) with an offset for each routine. To call a routine you would effectively call the code base + the routine's offset. Something like 'CALL initfade' would translate to something like 'CALL &8000+&A' (or just use 'CALL &800A'). My program will let you know the offsets for each of the important calls after the code is assembled.

Kind regards,

Francis.


Top
 
PostPosted: Mon Sep 22, 2008 1:33 pm 
Offline
 Profile

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

This sounds lovely!!!!
Let me know when the code is ready to test and collect it together with the other routines. So Martin can make a SWR system to it.
(or did you send it to Martin already)

I'll post one of the other routines described in the forum soon, so the can be reprogrammed to assembly aswel.
Can't wait to test this with Quill :D :D :D

Cheers

Koen


Top
 
PostPosted: Mon Sep 22, 2008 3:25 pm 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
The actual fade routines are not ready yet. I was hoping to work on them over the weekend, but my wife became ill which hindered things a bit.

Kind regards,

Francis.


Top
 
PostPosted: Mon Sep 22, 2008 4:03 pm 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
No problem.
Family first ;)

Cheers


Top
 
PostPosted: Mon Oct 06, 2008 9:42 pm 
Offline
 Profile

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

It has been a little while before I could do something again (famely and writing the adventure in my note book ;) ), but here I am again with a disk image with the other 2 utils I described in this forum.

Util 1:
I think this is a simple util. It only has to switch to colour 0 and back to colour 3 with 2 separate commands. See the REM lines in the util.

Util 2:
This is already a small machine util that has to be extended a little further. There is a little description what I would like within the program.

Both Utils have to be (like Martin already mentioned earlier in this forum) set at &8000 when final.
But before the final version, please make it at &B00 with LSB and MSB values, so I can test it with Quill.

Hope someone can help me out.

Cheers

Koen


Attachments:
util2.dsd.zip [2.46 KiB]
Downloaded 6 times
Top
 
PostPosted: Tue Oct 07, 2008 9:40 am 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
Here is some code for your first utility:

Code:
   10 DIM code% 512
   20
   30 FOR opt%=0 TO 3 STEP 3
   40 P%=code%
   50
   60[OPT opt%
   70
   80 \ Set colour to 0
   90
  100.col_0      LDA #17
  110            JSR &FFEE
  120            LDA #0
  130            JSR &FFEE
  140            RTS
  150
  160 \ Set colour to 3
  170
  180.col_3      LDA #17
  190            JSR &FFEE
  200            LDA #3
  210            JSR &FFEE
  220            RTS
  230]
  240 NEXT
  250
  260 PRINT "Code base = &";~code%
  270 PRINT "'col_0' offset = &";~(col_0-code%);" (&";~col_0;")"
  280 PRINT "'col_3' offset = &";~(col_3-code%);" (&";~col_3;")"


Just run this program and then you can do a CALL col_0 for the equivalent of COLOUR 0 and CALL col_3 for the equivalent of COLOUR 3.

Kind regards,

Francis.


Top
 
PostPosted: Tue Oct 07, 2008 8:38 pm 
Offline
 Profile

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

GREAT!!!
Changed some lines (see listing) and tested it with Quill, and guess what......
IT WORKS!!!
Code:
   10  DIM code% 512
   30  FOR opt%=0 TO 3 STEP 3
   40 P%=&B00
   60 [OPT opt%
   80  \ Set colour to 0
  100 .col_0      LDA #17
  110             JSR &FFEE
  120             LDA #0
  130             JSR &FFEE
  140             RTS
  160  \ Set colour to 3
  180 .col_3      LDA #17
  190             JSR &FFEE
  200             LDA #3
  210             JSR &FFEE
  220             RTS
  230 ]
  240  NEXT
  260  PRINT "Code base = &";~code%
  270  PRINT "'col_0' offset = &";~(col_0-code%);" (&";~col_0;")"
  280  PRINT "'col_3' offset = &";~(col_3-code%);" (&";~col_3;")"
  400 PRINT"LSB=";col_0 MOD 256
  410 PRINT"MSB=";col_0 DIV 256
  420 PRINT"LSB=";col_3 MOD 256
  430 PRINT"MSB=";col_3 DIV 256

I needed the LSB/MSB lines for Quill to call the Util with a JSR command.

Martin needs it to be at page &8000 (discribed somewhere in this forum)
Is that easy by setting P%=&8000 or is it a bit mor complicated?
If it is that easy, I can send it to Martin otherwise, would you like to do that for me?

Thanks a lot.

Cheers

Koen


Top
 
PostPosted: Tue Oct 07, 2008 8:47 pm 
Offline
User avatar
 WWW  Profile

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

Line 10 isn't required if you are setting the memory location manually. All it does is reserves 512 bytes of memory for the assembled code. It also means that anything else with the code% variable (i.e. lines 260-280) is meaningless.

And yes, you can just set the page by using P%=&8000.

Kind regards,

Francis.


Top
 
PostPosted: Tue Oct 07, 2008 9:08 pm 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
Ok, I'll send it to Martin then.
How is de the fade routine doing?

Cheers

koen


Top
 
PostPosted: Tue Oct 07, 2008 9:11 pm 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
I may need to get help with the fade routine as there is a bit I'm not sure how to do and I'm not really getting the time just now to look at it properly.

Kind regards,

Francis.


Top
 
PostPosted: Wed Oct 08, 2008 12:21 pm 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
I've posted my query regarding the fade routine here.

Kind regards,

Francis.


Top
 
PostPosted: Thu Oct 09, 2008 9:17 am 
Offline
User avatar
 WWW  Profile

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

Here is some code for your second utility:

Code:
   10FORN%=0 TO 3 STEP 3
   20P%=&B00
   30[
   40OPT N%
   50.START:LDA &250A:STA &70:LDA &250B:STA &71:LDX #0
   60\ &350A and &350B for casette version
   70.START1:CPX &502:BEQ START2:LDY #0:LDA(&70),Y
   80CLC:ADC &70:STA &70:LDA &71:ADC #0:STA &71:INX:JMP START1
   90.START2:BRK
  100LDY #1:STY &72
  110.START3:LDY &72:LDA (&70),Y:CMP #255:BNE START0
  120JSR &FFE7:JSR &FFE7:RTS
  130.START0:CMP #0:BNE START5:BRK
  140EQUB 255:EQUS "North, ":EQUB 0
  150.START4:INC &72:INC &72:JMP START3
  160.START5:CMP #1:BNE START6:BRK
  170EQUB 255:EQUS "South, ":EQUB 0
  180JMP START4
  190.START6:CMP #2:BNE START7:BRK
  200EQUB 255:EQUS "East, ":EQUB 0
  210JMP START4
  220.START7:CMP #3:BNE START8:BRK
  230EQUB 255:EQUS "West, ":EQUB 0
  240JMP START4
  250.START8:CMP #4:BNE START9:BRK
  260EQUB 255:EQUS "Up, ":EQUB 0
  270JMP START4
  280.START9:CMP #5:BNE START10:BRK
  290EQUB 255:EQUS "Down, ":EQUB 0
  300JMP START4
  310.START13:CMP #11:BNE START4:BRK
  320EQUB 255:EQUS "SouthWest, ":EQUB 0
  330JMP START4
  340.START10:CMP #8:BNE START11:BRK
  350EQUB 255:EQUS "NorthEast, ":EQUB 0
  360JMP START4
  370.START11:CMP #9:BNE START12:BRK
  380EQUB 255:EQUS "NorthWest, ":EQUB 0
  390JMP START4
  400.START12:CMP #10:BNE START13:BRK
  410EQUB 255:EQUS "SouthEast, ":EQUB 0
  420JMP START4
  430]
  440NEXT
  450PRINT"LSB=";START MOD 256
  460PRINT"MSB=";START DIV 256


You can try it and let me know if it works.

Kind regards,

Francis


Top
 
PostPosted: Thu Oct 09, 2008 6:40 pm 
Offline
User avatar
 Profile

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

I've been keeping an eye on developments and you (Francis) are doing a stirling job :D I may need to quiz you if any complications arise from the relocation to SWR but I think it'll be ok.

I've emailed you (Koen) so you can start sending stuff to me and I'll start work on relocating the routines to SWR and coding a calling routine.

Martin


Top
 
PostPosted: Thu Oct 09, 2008 7:43 pm 
Offline
 Profile

Joined: Mon Jul 07, 2008 6:58 pm
Posts: 64
Yes!!!
Francis is helping mee veeeeeerrrrrrryyyyyy much. Thanks again :)

Got the mail Martin. Gonna figure out some stuf here first then I'll send you some.

Cheers

Koen


Top
 
PostPosted: Thu Oct 09, 2008 8:50 pm 
Offline
 Profile

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

Just imported the extended version of the util, and saw that I have forgotten a line in the machine code. But after adding this line it all worked!!!!!!!!
GREAT! :D :D :D

Let's see wat others say about your fade util :)

thanks again!!

Cheers

Koen


Top
 
PostPosted: Thu Oct 09, 2008 9:44 pm 
Offline
User avatar
 Profile

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

Just looking at the "Up", "Down" etc. code, I notice you are using the BRK,$FF,<string>,0 technique to print the direction. Do you know if this method is a feature of BASIC or of the OS? If it's BASIC, I don't think this code can be run in SWR since BASIC will be switched out when the code is executed. If it's a function of the OS then it's fine - I've used it myself many times but I have never actually looked to see how the BRK vector gets set up.

Martin


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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