mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-24 11:11:02 -07:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93e0251bab |
@@ -133,6 +133,7 @@ choices because they can store multiple types of file system.
|
||||
| [`n88basic`](doc/disk-n88basic.md) | N88-BASIC: PC8800/PC98 5.25" 77-track 26-sector DSHD | 🦄 | 🦄 | |
|
||||
| [`northstar`](doc/disk-northstar.md) | Northstar: 5.25" hard sectored | 🦄 | 🦄 | |
|
||||
| [`psos`](doc/disk-psos.md) | pSOS: 800kB DSDD with PHILE | 🦄 | 🦄 | PHILE |
|
||||
| [`q1`](doc/disk-q1.md) | Q1: Q1ish | 🦖 | | |
|
||||
| [`rolandd20`](doc/disk-rolandd20.md) | Roland D20: 3.5" electronic synthesiser disks | 🦄 | 🦖 | ROLAND |
|
||||
| [`rx50`](doc/disk-rx50.md) | Digital RX50: 400kB 5.25" 80-track 10-sector SSDD | 🦖 | 🦖 | |
|
||||
| [`smaky6`](doc/disk-smaky6.md) | Smaky 6: 308kB 5.25" 77-track 16-sector SSDD, hard sectored | 🦖 | | SMAKY6 |
|
||||
|
||||
@@ -17,6 +17,7 @@ proto(
|
||||
"./micropolis/micropolis.proto",
|
||||
"./mx/mx.proto",
|
||||
"./northstar/northstar.proto",
|
||||
"./q1/q1.proto",
|
||||
"./rolandd20/rolandd20.proto",
|
||||
"./smaky6/smaky6.proto",
|
||||
"./tids990/tids990.proto",
|
||||
|
||||
38
arch/q1/decoder.cc
Normal file
38
arch/q1/decoder.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "lib/globals.h"
|
||||
#include "lib/fluxmap.h"
|
||||
#include "lib/decoders/fluxmapreader.h"
|
||||
#include "lib/decoders/decoders.h"
|
||||
#include "lib/sector.h"
|
||||
#include "arch/q1/q1.h"
|
||||
#include "lib/bytes.h"
|
||||
#include "lib/decoders/decoders.pb.h"
|
||||
#include "fmt/format.h"
|
||||
|
||||
static const FluxPattern ADDRESS_RECORD(32, Q1_ADDRESS_RECORD);
|
||||
static const FluxPattern DATA_RECORD(32, Q1_DATA_RECORD);
|
||||
|
||||
const FluxMatchers ANY_RECORD_PATTERN({&ADDRESS_RECORD, &DATA_RECORD});
|
||||
|
||||
class Q1Decoder : public Decoder
|
||||
{
|
||||
public:
|
||||
Q1Decoder(const DecoderProto& config): Decoder(config), _config(config.q1())
|
||||
{
|
||||
}
|
||||
|
||||
/* Search for FM or MFM sector record */
|
||||
nanoseconds_t advanceToNextRecord() override
|
||||
{
|
||||
return seekToPattern(ANY_RECORD_PATTERN);
|
||||
}
|
||||
|
||||
void decodeSectorRecord() override {}
|
||||
|
||||
private:
|
||||
const Q1DecoderProto& _config;
|
||||
};
|
||||
|
||||
std::unique_ptr<Decoder> createQ1Decoder(const DecoderProto& config)
|
||||
{
|
||||
return std::unique_ptr<Decoder>(new Q1Decoder(config));
|
||||
}
|
||||
9
arch/q1/q1.h
Normal file
9
arch/q1/q1.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef Q1_H
|
||||
#define Q1_H
|
||||
|
||||
#define Q1_ADDRESS_RECORD 0x55424954
|
||||
#define Q1_DATA_RECORD 0x55424955
|
||||
|
||||
extern std::unique_ptr<Decoder> createQ1Decoder(const DecoderProto& config);
|
||||
|
||||
#endif
|
||||
6
arch/q1/q1.proto
Normal file
6
arch/q1/q1.proto
Normal file
@@ -0,0 +1,6 @@
|
||||
syntax = "proto2";
|
||||
|
||||
import "lib/common.proto";
|
||||
|
||||
message Q1DecoderProto {}
|
||||
|
||||
2
build.py
2
build.py
@@ -136,6 +136,7 @@ cxxlibrary(
|
||||
"./arch/mx/decoder.cc",
|
||||
"./arch/northstar/decoder.cc",
|
||||
"./arch/northstar/encoder.cc",
|
||||
"./arch/q1/decoder.cc",
|
||||
"./arch/rolandd20/decoder.cc",
|
||||
"./arch/smaky6/decoder.cc",
|
||||
"./arch/tids990/decoder.cc",
|
||||
@@ -168,6 +169,7 @@ cxxlibrary(
|
||||
"arch/victor9k/victor9k.h": "./arch/victor9k/victor9k.h",
|
||||
"arch/rolandd20/rolandd20.h": "./arch/rolandd20/rolandd20.h",
|
||||
"arch/micropolis/micropolis.h": "./arch/micropolis/micropolis.h",
|
||||
"arch/q1/q1.h": "./arch/q1/q1.h",
|
||||
"arch/c64/data_gcr.h": "./arch/c64/data_gcr.h",
|
||||
"arch/c64/c64.h": "./arch/c64/c64.h",
|
||||
"lib/a2r.h": "./lib/a2r.h",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "arch/micropolis/micropolis.h"
|
||||
#include "arch/mx/mx.h"
|
||||
#include "arch/northstar/northstar.h"
|
||||
#include "arch/q1/q1.h"
|
||||
#include "arch/rolandd20/rolandd20.h"
|
||||
#include "arch/smaky6/smaky6.h"
|
||||
#include "arch/tids990/tids990.h"
|
||||
@@ -49,6 +50,7 @@ std::unique_ptr<Decoder> Decoder::create(const DecoderProto& config)
|
||||
{DecoderProto::kMicropolis, createMicropolisDecoder },
|
||||
{DecoderProto::kMx, createMxDecoder },
|
||||
{DecoderProto::kNorthstar, createNorthstarDecoder },
|
||||
{DecoderProto::kQ1, createQ1Decoder },
|
||||
{DecoderProto::kRolandd20, createRolandD20Decoder },
|
||||
{DecoderProto::kSmaky6, createSmaky6Decoder },
|
||||
{DecoderProto::kTids990, createTids990Decoder },
|
||||
|
||||
@@ -13,6 +13,7 @@ import "arch/macintosh/macintosh.proto";
|
||||
import "arch/micropolis/micropolis.proto";
|
||||
import "arch/mx/mx.proto";
|
||||
import "arch/northstar/northstar.proto";
|
||||
import "arch/q1/q1.proto";
|
||||
import "arch/rolandd20/rolandd20.proto";
|
||||
import "arch/smaky6/smaky6.proto";
|
||||
import "arch/tids990/tids990.proto";
|
||||
@@ -21,7 +22,7 @@ import "arch/zilogmcz/zilogmcz.proto";
|
||||
import "lib/fluxsink/fluxsink.proto";
|
||||
import "lib/common.proto";
|
||||
|
||||
//NEXT: 32
|
||||
//NEXT: 33
|
||||
message DecoderProto {
|
||||
optional double pulse_debounce_threshold = 1 [default = 0.30,
|
||||
(help) = "ignore pulses with intervals shorter than this, in fractions of a clock"];
|
||||
@@ -48,6 +49,7 @@ message DecoderProto {
|
||||
MicropolisDecoderProto micropolis = 14;
|
||||
MxDecoderProto mx = 15;
|
||||
NorthstarDecoderProto northstar = 24;
|
||||
Q1DecoderProto q1 = 32;
|
||||
RolandD20DecoderProto rolandd20 = 31;
|
||||
Smaky6DecoderProto smaky6 = 30;
|
||||
Tids990DecoderProto tids990 = 16;
|
||||
@@ -68,4 +70,3 @@ message DecoderProto {
|
||||
optional bool skip_unnecessary_tracks = 29 [default = true,
|
||||
(help) = "don't read tracks if we already have all necessary sectors"];
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ formats = [
|
||||
"n88basic",
|
||||
"northstar",
|
||||
"psos",
|
||||
"q1",
|
||||
"rolandd20",
|
||||
"rx50",
|
||||
"shugart_drive",
|
||||
|
||||
42
src/formats/q1.textpb
Normal file
42
src/formats/q1.textpb
Normal file
@@ -0,0 +1,42 @@
|
||||
shortname: 'Q1'
|
||||
comment: 'Q1ish'
|
||||
read_support_status: DINOSAUR
|
||||
|
||||
documentation:
|
||||
<<<
|
||||
Q1 text here
|
||||
>>>
|
||||
|
||||
drive {
|
||||
high_density: true
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "q1.img"
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
format_type: FORMATTYPE_80TRACK
|
||||
tracks: 77
|
||||
sides: 1
|
||||
layoutdata {
|
||||
sector_size: 256
|
||||
physical {
|
||||
start_sector: 1
|
||||
count: 26
|
||||
}
|
||||
}
|
||||
layoutdata {
|
||||
track: 0
|
||||
side: 0
|
||||
sector_size: 128
|
||||
}
|
||||
}
|
||||
|
||||
decoder {
|
||||
q1 {}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user