mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	Convert the MX decoder.
This commit is contained in:
		| @@ -3,9 +3,12 @@ | ||||
|  | ||||
| #include "decoders/decoders.h" | ||||
|  | ||||
| class MxInputProto; | ||||
|  | ||||
| class MxDecoder : public AbstractDecoder | ||||
| { | ||||
| public: | ||||
| 	MxDecoder(const MxInputProto&) {} | ||||
|     virtual ~MxDecoder() {} | ||||
|  | ||||
|     void beginTrack(); | ||||
|   | ||||
							
								
								
									
										4
									
								
								arch/mx/mx.proto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								arch/mx/mx.proto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| syntax = "proto2"; | ||||
|  | ||||
| message MxInputProto {} | ||||
|  | ||||
| @@ -12,6 +12,7 @@ | ||||
| #include "arch/ibm/ibm.h" | ||||
| #include "arch/macintosh/macintosh.h" | ||||
| #include "arch/micropolis/micropolis.h" | ||||
| #include "arch/mx/mx.h" | ||||
| #include "decoders/fluxmapreader.h" | ||||
| #include "record.h" | ||||
| #include "protocol.h" | ||||
| @@ -53,6 +54,9 @@ std::unique_ptr<AbstractDecoder> AbstractDecoder::create(const DecoderProto& con | ||||
| 		case DecoderProto::kMicropolis: | ||||
| 			return std::unique_ptr<AbstractDecoder>(new MicropolisDecoder(config.micropolis())); | ||||
|  | ||||
| 		case DecoderProto::kMx: | ||||
| 			return std::unique_ptr<AbstractDecoder>(new MxDecoder(config.mx())); | ||||
|  | ||||
| 		default: | ||||
| 			Error() << "no input disk format specified"; | ||||
| 	} | ||||
|   | ||||
| @@ -10,6 +10,7 @@ import "arch/fb100/fb100.proto"; | ||||
| import "arch/ibm/ibm.proto"; | ||||
| import "arch/macintosh/macintosh.proto"; | ||||
| import "arch/micropolis/micropolis.proto"; | ||||
| import "arch/mx/mx.proto"; | ||||
| import "lib/common.proto"; | ||||
|  | ||||
| message DecoderProto { | ||||
| @@ -33,6 +34,7 @@ message DecoderProto { | ||||
| 		MacintoshInputProto macintosh = 12; | ||||
| 		Apple2InputProto apple2 = 13; | ||||
| 		MicropolisInputProto micropolis = 14; | ||||
| 		MxInputProto mx = 15; | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -267,6 +267,7 @@ buildproto libproto.a \ | ||||
|     arch/ibm/ibm.proto \ | ||||
|     arch/macintosh/macintosh.proto \ | ||||
|     arch/micropolis/micropolis.proto \ | ||||
|     arch/mx/mx.proto \ | ||||
|     lib/common.proto \ | ||||
|     lib/config.proto \ | ||||
|     lib/decoders/decoders.proto \ | ||||
| @@ -359,6 +360,7 @@ READABLES="\ | ||||
|     ibm \ | ||||
|     macintosh \ | ||||
|     micropolis \ | ||||
|     mx \ | ||||
|     " | ||||
|  | ||||
| WRITABLES="\ | ||||
| @@ -420,7 +422,6 @@ buildlibrary libfrontend.a \ | ||||
|     src/fe-writeflux.cc \ | ||||
|     src/fluxengine.cc \ | ||||
|  | ||||
| #    src/fe-readmx.cc \ | ||||
| #    src/fe-readtids990.cc \ | ||||
| #    src/fe-readvictor9k.cc \ | ||||
| #    src/fe-readzilogmcz.cc \ | ||||
|   | ||||
| @@ -1,23 +0,0 @@ | ||||
| #include "globals.h" | ||||
| #include "flags.h" | ||||
| #include "reader.h" | ||||
| #include "fluxmap.h" | ||||
| #include "decoders/decoders.h" | ||||
| #include "mx/mx.h" | ||||
| #include "sector.h" | ||||
| #include "sectorset.h" | ||||
| #include "record.h" | ||||
|  | ||||
| static FlagGroup flags { &readerFlags }; | ||||
|  | ||||
| int mainReadMx(int argc, const char* argv[]) | ||||
| { | ||||
| 	setReaderDefaultSource(":t=0-79:s=0-1"); | ||||
| 	setReaderDefaultOutput("mx.img"); | ||||
|     flags.parseFlags(argc, argv); | ||||
|  | ||||
| 	MxDecoder decoder; | ||||
| 	readDiskCommand(decoder); | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
							
								
								
									
										27
									
								
								src/readables/mx.textpb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/readables/mx.textpb
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| input { | ||||
| 	disk { | ||||
| 		drive {} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| output { | ||||
| 	file { | ||||
| 		filename: "mx.img" | ||||
| 		img {} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| decoder { | ||||
| 	mx {} | ||||
| } | ||||
|  | ||||
| cylinders { | ||||
| 	start: 0 | ||||
| 	end: 79 | ||||
| } | ||||
|  | ||||
| heads { | ||||
| 	start: 0 | ||||
| 	end: 1 | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user