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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Sep 23, 2012 1:28 pm 
Offline
 Profile

Joined: Sun Sep 23, 2012 1:20 pm
Posts: 7
If I use the Read Data Multi-Sector command (&53) with OSWORD 7F when the Tube is enabled, no matter which buffer address I specify, the data is always returned to 0x130A in the second processor.

Is it possible to specify another buffer address ? If not any suggestions would be gratefully received on how to replicate this command :D


Top
 
PostPosted: Wed Oct 10, 2012 1:55 am 
Offline
 Profile

Joined: Sat Aug 22, 2009 7:45 pm
Posts: 34
s1paulr wrote:
If I use the Read Data Multi-Sector command (&53) with OSWORD 7F when the Tube is enabled, no matter which buffer address I specify, the data is always returned to 0x130A in the second processor.
That would only happen if you actually specify &130A as the data address. Are you filling the control block correctly:
Code:
Control block
XY?&00    Drive    
XY!&01    Data address    
XY?&05    Number of parameters (n)    
XY?&06    Command    
XY+7...   Parameters    
XY?(7+n)  Result

Try using the code on the BeebWiki:
Code:
   REM Set up a global control block early in the program:
   DIM ctrl% 31:X%=ctrl%:Y%=X%DIV256
   ...
   DEFFNdisk(addr%,cmd%,drv%,trk%,sec%,num%,den%):LOCAL fs%
   fs%=FNfs:IF fs%<>4:*FX143,18,4
   REPEAT
     X%?0=drv%+den%*24+8:X%!1=addr%:X%?5=3-7*(cmd%>127)
     X%?6=cmd%:X%?7=trk%:X%?8=sec%:X%!9=num%OR&1E20
     A%=127:CALL&FFF1:A%=X%?(X%?5+7)
   UNTIL A%<>&10:IF fs%<>4:OSCLI"FX143,18,"+STR$ fs%
   =A%
   DEFFNfs:LOCAL A%,E%,Y%:=(USR&FFDA)AND&FF
result%=FNdisk(address, &53, drive, track, sector, count, 1) will read 'count' sectors into memory at 'address'.


Top
 
PostPosted: Thu Oct 11, 2012 1:47 pm 
Offline
 Profile

Joined: Sun Sep 23, 2012 1:20 pm
Posts: 7
Thanks John,

No matter what buffer address I specify in the parameter block, the data is returned to 0x130A in the second processor. If I disable the Tube, then the code returns the data to the address specified as expected. When I get some time I will try the other method. In the mean time, I just explicitly set the buffer to 130A and PAGE to 1900 which of course means that the code operates identically with the tube enabled or disabled.

Many thanks again,

Paul


Top
 
PostPosted: Sat Oct 13, 2012 10:45 am 
Offline
 Profile

Joined: Sun Sep 23, 2012 1:20 pm
Posts: 7
Hi John,

I tried this code and get exactly the same result as I did with my own code. With the Tube disabled, the data is returned to the correct address, but with the Tube enabled it is always returned to 0x130A in the 2P.

Very odd indeed. Either I have discovered an anomaly or maybe there is a bug in the Turbo MMC DFS?

Commercial 2P program's such as Hi-View etc. all run flawlessly, so I doubt that there is anything wrong with my hardware. Also all programs I write work as expected aside from this one issue.

As an aside I am using John Kortink's FPGA 2P on a Terasic DE0, but I cannot see how this could make any difference to a single OSWORD call.

Paul


Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

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