Skip to content

Commit 00cab46

Browse files
authored
Merge pull request #596 from davidgiven/c64
Minor C64 changes.
2 parents c7677e5 + 7f7460f commit 00cab46

File tree

7 files changed

+103
-33
lines changed

7 files changed

+103
-33
lines changed

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ include tests/build.mk
159159
do-encodedecodetest = $(eval $(do-encodedecodetest-impl))
160160
define do-encodedecodetest-impl
161161

162-
tests: $(OBJDIR)/$1.encodedecode
163-
$(OBJDIR)/$1.encodedecode: scripts/encodedecodetest.sh $(FLUXENGINE_BIN) $2
162+
tests: $(OBJDIR)/$1$3.encodedecode
163+
$(OBJDIR)/$1$3.encodedecode: scripts/encodedecodetest.sh $(FLUXENGINE_BIN) $2
164164
@mkdir -p $(dir $$@)
165-
@echo ENCODEDECODETEST $1
166-
@scripts/encodedecodetest.sh $1 flux $(FLUXENGINE_BIN) $2 > $$@
165+
@echo ENCODEDECODETEST $1 $3
166+
@scripts/encodedecodetest.sh $1 flux $(FLUXENGINE_BIN) $2 $3 > $$@
167167

168168
endef
169169

@@ -180,8 +180,10 @@ $(call do-encodedecodetest,atarist820)
180180
$(call do-encodedecodetest,bk800)
181181
$(call do-encodedecodetest,brother120)
182182
$(call do-encodedecodetest,brother240)
183-
$(call do-encodedecodetest,commodore1541t35,scripts/commodore1541_test.textpb)
183+
$(call do-encodedecodetest,commodore1541,scripts/commodore1541_test.textpb,--35)
184+
$(call do-encodedecodetest,commodore1541,scripts/commodore1541_test.textpb,--40)
184185
$(call do-encodedecodetest,commodore1581)
186+
$(call do-encodedecodetest,cmd_fd2000)
185187
$(call do-encodedecodetest,hp9121)
186188
$(call do-encodedecodetest,ibm1200)
187189
$(call do-encodedecodetest,ibm1232)

doc/disk-c64.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ Reading 1541 disks
3333
Just do:
3434

3535
```
36-
fluxengine read commodore1541t35 -o commodore1541.d64
36+
fluxengine read commodore1541 -o commodore1541.d64
3737
```
3838

3939
You should end up with an `commodore1541.d64` file which is 174848 bytes long.
4040
You can load this straight into a Commodore 64 emulator such as
4141
[VICE](http://vice-emu.sourceforge.net/).
4242

43-
If you have a 40-track disk, use `commodore1541t40` instead.
43+
If you have a 40-track disk, add `--40`.
4444

4545
**Big warning!** Commodore 64 disk images are complicated due to the way the
4646
tracks are different sizes and the odd sector size, so you need the special D64
@@ -52,16 +52,16 @@ Writing 1541 disks
5252

5353
Just do:
5454
```
55-
fluxengine write commodore1541t35 -i file.d64
55+
fluxengine write commodore1541 -i file.d64
5656
```
5757

58-
If you have a 40-track disk, use `commodore1541t40` instead.
58+
If you have a 40-track disk, add `--40`.
5959

6060
Note that only standard Commodore 64 BAM file systems can be written this way,
6161
as the disk ID in the BAM has to be copied to every sector on the disk.
6262

63-
Reading 1581 disks
64-
------------------
63+
Reading and writing 1581 disks
64+
------------------------------
6565

6666
1581 disks are just another version of the standard IBM scheme.
6767

@@ -71,15 +71,30 @@ Just do:
7171
fluxengine read commodore1581 -o commodore1581.d81
7272
```
7373

74-
Writing 1581 disks
75-
------------------
74+
or:
75+
76+
```
77+
fluxengine write commodore1581 -i commodore1581.img
78+
```
79+
80+
Reading and writing CMD FD2000 disks
81+
------------------------------------
82+
83+
Yet again, these are another IBM scheme variant.
7684

7785
Just do:
7886

7987
```
80-
fluxengine write commodore1581 -i commodore1581.img
88+
fluxengine read cmd_fd2000 -o cmd_fd2000.d81
8189
```
8290

91+
or:
92+
93+
```
94+
fluxengine write cmd_fd2000 -i cmd_fd2000.img
95+
```
96+
97+
8398
Useful references
8499
-----------------
85100

src/formats/build.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ FORMATS = \
55
_micropolis \
66
_northstar \
77
_mx \
8-
_commodore1541 \
98
40track_drive \
109
acornadfs160 \
1110
acornadfs320 \
@@ -31,9 +30,9 @@ FORMATS = \
3130
bk800 \
3231
brother120 \
3332
brother240 \
34-
commodore1541t35 \
35-
commodore1541t40 \
33+
commodore1541 \
3634
commodore1581 \
35+
cmd_fd2000 \
3736
eco1 \
3837
epsonpf10 \
3938
f85 \

src/formats/cmd_fd2000.textpb

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
comment: 'CMD FD2000 1620kB 3.5" DSHD'
2+
3+
image_reader {
4+
filename: "cmd_fd2000.img"
5+
img {}
6+
}
7+
8+
image_writer {
9+
filename: "cmd_fd2000.img"
10+
img {}
11+
}
12+
13+
layout {
14+
tracks: 81
15+
sides: 2
16+
swap_sides: true
17+
layoutdata {
18+
sector_size: 1024
19+
physical {
20+
start_sector: 1
21+
count: 10
22+
}
23+
}
24+
}
25+
26+
encoder {
27+
ibm {
28+
trackdata {
29+
target_rotational_period_ms: 200
30+
target_clock_period_us: 2
31+
emit_iam: false
32+
}
33+
}
34+
}
35+
36+
decoder {
37+
ibm {
38+
trackdata {
39+
ignore_side_byte: true
40+
}
41+
}
42+
}
43+
Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
comment: 'Commodore 1541 common settings'
2-
is_extension: true
1+
comment: 'Commodore 1541 171kB/192kB 5.25" 35/40-track SS GCR'
32

43
image_reader {
54
filename: "commodore1541.d64"
@@ -13,6 +12,7 @@ image_writer {
1312

1413
layout {
1514
sides: 1
15+
tracks: 35
1616
layoutdata {
1717
sector_size: 256
1818
}
@@ -63,3 +63,28 @@ tpi: 48
6363
filesystem {
6464
cbmfs {}
6565
}
66+
67+
option {
68+
name: "35"
69+
comment: "35-track variant (default)"
70+
message: "using 35-track variant"
71+
72+
config {
73+
layout {
74+
tracks: 35
75+
}
76+
}
77+
}
78+
79+
option {
80+
name: "40"
81+
comment: "40-track variant"
82+
message: "using 40-track variant"
83+
84+
config {
85+
layout {
86+
tracks: 40
87+
}
88+
}
89+
}
90+

src/formats/commodore1541t35.textpb

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/formats/commodore1541t40.textpb

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)