1
1
mirror of https://github.com/wader/fq.git synced 2024-10-26 20:06:29 +03:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Michael R. Cook
2ce29eb5ff
Merge ee404b2bcf into cdba38d067 2024-08-02 23:52:30 +02:00
Michael R. Cook
ee404b2bcf all: re-run the test --update 2024-08-02 23:52:09 +02:00
Michael R. Cook
90de619918 tap: add a read_one_block test 2024-08-02 23:51:12 +02:00
Michael R. Cook
113ca632ab tap: add DefaultInArg 2024-08-02 23:50:00 +02:00
3 changed files with 18 additions and 1 deletions

View File

@ -29,7 +29,6 @@ $ fq -n _registry.groups.probe
"pcap",
"pcapng",
"png",
"tap",
"tar",
"tiff",
"tzif",

View File

@ -22,7 +22,11 @@ func init() {
&decode.Format{
Description: "TAP tape format for ZX Spectrum computers",
DecodeFn: tapDecoder,
DefaultInArg: format.TAP_In{
ReadOneBlock: false,
},
})
interp.RegisterFS(tapFS)
}

View File

@ -0,0 +1,14 @@
$ fq -d tap -o read_one_block=true dv basic_prog1.tap
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: basic_prog1.tap (tap) 0x0-0x3f (63)
0x00|13 00 |.. | length: 19 0x0-0x2 (2)
| | | header{}: 0x2-0x15 (19)
0x00| 00 | . | flag: "standard_speed_data" (0) 0x2-0x3 (1)
0x00| 00 | . | data_type: "program" (0) 0x3-0x4 (1)
0x00| 66 71 54 65 73 74 50 72 6f 67 | fqTestProg | program_name: "fqTestProg" 0x4-0xe (10)
0x00| 26 00| &.| data_length: 38 0xe-0x10 (2)
0x10|0a 00 |.. | auto_start_line: 10 0x10-0x12 (2)
0x10| 26 00 | &. | program_length: 38 0x12-0x14 (2)
0x10| 01 | . | checksum: 0x1 0x14-0x15 (1)
0x10| 28 00 ff 00 0a 14 00 20 f5 22 66| (...... ."f| gap0: raw bits 0x15-0x3f (42)
0x20|71 20 69 73 20 74 68 65 20 62 65 73 74 21 22 0d|q is the best!".|
0x30|00 14 0a 00 ec 31 30 0e 00 00 0a 00 00 0d b6| |.....10........||