doc/classes/D81.src/M000427.html in ripxplore-0.12.0 vs doc/classes/D81.src/M000427.html in ripxplore-0.13.0
- old
+ new
@@ -3,21 +3,16 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>get_sector (D81)</title>
+ <title>track_count (D81)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre><span class="ruby-comment cmt"># File lib/image_formats/D81.rb, line 50</span>
-<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_sector</span>(<span class="ruby-identifier">track_no</span>,<span class="ruby-identifier">sector_no</span>)
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">track_no</span>.<span class="ruby-identifier">between?</span>(<span class="ruby-value">1</span>,<span class="ruby-identifier">end_track</span>)
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">sector_no</span>.<span class="ruby-identifier">between?</span>(<span class="ruby-value">0</span>,<span class="ruby-constant">D81_SECTORS_PER_TRACK</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>)
- <span class="ruby-identifier">track_start</span>=<span class="ruby-constant">D81_BYTES_PER_SECTOR</span><span class="ruby-operator">*</span>(<span class="ruby-constant">D81_SECTORS_PER_TRACK</span><span class="ruby-operator">*</span>(<span class="ruby-identifier">track_no</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>))
- <span class="ruby-identifier">sector_start</span>=<span class="ruby-identifier">track_start</span><span class="ruby-operator">+</span>(<span class="ruby-constant">D81_BYTES_PER_SECTOR</span><span class="ruby-operator">*</span><span class="ruby-identifier">sector_no</span>)
-<span class="ruby-comment cmt"># puts "T %0d, S %0d, TRACK OFFSET=$%x, SECTOR OFFSET=$%x" % [track_no,sector_no,track_start,sector_start]
</span>
- <span class="ruby-identifier">file_bytes</span>[<span class="ruby-identifier">sector_start</span>,<span class="ruby-constant">D81_BYTES_PER_SECTOR</span>]
+ <pre><span class="ruby-comment cmt"># File lib/image_formats/D81.rb, line 33</span>
+<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">track_count</span>
+ <span class="ruby-identifier">file_bytes</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">/</span>(<span class="ruby-constant">D81_SECTORS_PER_TRACK</span><span class="ruby-operator">*</span><span class="ruby-value">256</span>)
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file