mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	Eliminate the broken tpi system for a simple drive/format type field.
This commit is contained in:
		| @@ -80,13 +80,14 @@ public: | ||||
|                     /* 5.25" with quarter stepping. */ | ||||
|                     _extraConfig.mutable_drive()->set_tracks(160); | ||||
|                     _extraConfig.mutable_drive()->set_heads(1); | ||||
|                     _extraConfig.mutable_drive()->set_head_width(4); | ||||
|                     _extraConfig.mutable_drive()->set_tpi(48 * 4); | ||||
|                     _extraConfig.mutable_drive()->set_drive_type( | ||||
|                         DRIVETYPE_APPLE2); | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     /* 3.5". */ | ||||
|                     _extraConfig.mutable_drive()->set_tpi(135); | ||||
|                     _extraConfig.mutable_drive()->set_drive_type( | ||||
|                         DRIVETYPE_80TRACK); | ||||
|                 } | ||||
|  | ||||
|                 Bytes stream = findChunk("STRM"); | ||||
|   | ||||
| @@ -39,8 +39,8 @@ public: | ||||
|  | ||||
|         _extraConfig.mutable_drive()->set_rotational_period_ms( | ||||
|             _proto.rotational_period_ms()); | ||||
|         if (_proto.has_tpi()) | ||||
|             _extraConfig.mutable_drive()->set_tpi(_proto.tpi()); | ||||
|         if (_proto.has_drive_type()) | ||||
|             _extraConfig.mutable_drive()->set_drive_type(_proto.drive_type()); | ||||
|     } | ||||
|  | ||||
| public: | ||||
|   | ||||
| @@ -42,8 +42,9 @@ public: | ||||
|             (_header.file_id[2] != 'P')) | ||||
|             error("input not a SCP file"); | ||||
|  | ||||
|         int tpi = (_header.flags & SCP_FLAG_96TPI) ? 96 : 48; | ||||
|         _extraConfig.mutable_drive()->set_tpi(tpi); | ||||
|         _extraConfig.mutable_drive()->set_drive_type( | ||||
|             (_header.flags & SCP_FLAG_96TPI) ? DRIVETYPE_80TRACK | ||||
|                                              : DRIVETYPE_40TRACK); | ||||
|  | ||||
|         _resolution = 25 * (_header.resolution + 1); | ||||
|         int startSide = (_header.heads == 2) ? 1 : 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user