badline 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +76 -0
  3. data/CLAUDE.md +1 -1
  4. data/README.md +130 -17
  5. data/doc/media.md +14 -2
  6. data/doc/pinned-behaviour.md +61 -0
  7. data/doc/snapshot-format.md +379 -70
  8. data/doc/snapshots.md +185 -10
  9. data/lib/badline/cbm2/acia.rb +10 -0
  10. data/lib/badline/cbm2/bus.rb +263 -0
  11. data/lib/badline/cbm2/cpu.rb +58 -0
  12. data/lib/badline/cbm2/crtc_video.rb +133 -0
  13. data/lib/badline/cbm2/ieee_drive.rb +18 -0
  14. data/lib/badline/cbm2/ieee_layout.rb +69 -0
  15. data/lib/badline/cbm2/ieee_ports.rb +104 -0
  16. data/lib/badline/cbm2/ieee_traps.rb +81 -0
  17. data/lib/badline/cbm2/keyboard_ports.rb +60 -0
  18. data/lib/badline/cbm2/keyed_modules.rb +67 -0
  19. data/lib/badline/cbm2/keyed_state.rb +91 -0
  20. data/lib/badline/cbm2/model.rb +44 -0
  21. data/lib/badline/cbm2/p500/control_ports.rb +80 -0
  22. data/lib/badline/cbm2/p500/ieee_layout.rb +41 -0
  23. data/lib/badline/cbm2/p500/keyed_state.rb +85 -0
  24. data/lib/badline/cbm2/p500/model.rb +39 -0
  25. data/lib/badline/cbm2/p500/pages.rb +57 -0
  26. data/lib/badline/cbm2/p500.rb +262 -0
  27. data/lib/badline/cbm2/sid_page.rb +19 -0
  28. data/lib/badline/cbm2.rb +267 -0
  29. data/lib/badline/{plus4 → chips}/acia/frames.rb +1 -1
  30. data/lib/badline/chips/acia/keyed_state.rb +47 -0
  31. data/lib/badline/chips/acia.rb +307 -0
  32. data/lib/badline/chips/crtc.rb +3 -2
  33. data/lib/badline/chips/riot/fast_forward.rb +72 -0
  34. data/lib/badline/chips/riot/keyed_parts.rb +69 -0
  35. data/lib/badline/chips/riot/timer.rb +80 -0
  36. data/lib/badline/chips/riot.rb +162 -0
  37. data/lib/badline/chips/rriot/keyed_state.rb +30 -0
  38. data/lib/badline/chips/rriot.rb +132 -0
  39. data/lib/badline/chips/tpi/keyed_state.rb +38 -0
  40. data/lib/badline/chips/tpi.rb +233 -0
  41. data/lib/badline/chips/vic/bank.rb +60 -5
  42. data/lib/badline/chips/vic/sprite.rb +4 -3
  43. data/lib/badline/drives/datasette/keyed_state.rb +9 -1
  44. data/lib/badline/drives/datasette.rb +27 -3
  45. data/lib/badline/drives/ieee_bus.rb +50 -4
  46. data/lib/badline/drives/model2031/ieee_port.rb +133 -0
  47. data/lib/badline/drives/model2031/keyed_state.rb +66 -0
  48. data/lib/badline/drives/model2031/parts.rb +25 -0
  49. data/lib/badline/drives/model2031.rb +92 -0
  50. data/lib/badline/drives/model8050/disk.rb +163 -0
  51. data/lib/badline/drives/model8050/fdc_bus.rb +102 -0
  52. data/lib/badline/drives/model8050/idle.rb +177 -0
  53. data/lib/badline/drives/model8050/ieee_port.rb +147 -0
  54. data/lib/badline/drives/model8050/ip_bus.rb +93 -0
  55. data/lib/badline/drives/model8050/keyed_state.rb +160 -0
  56. data/lib/badline/drives/model8050/mechanism.rb +230 -0
  57. data/lib/badline/drives/model8050/parts.rb +37 -0
  58. data/lib/badline/drives/model8050.rb +243 -0
  59. data/lib/badline/frontend/app.rb +10 -3
  60. data/lib/badline/frontend/boot.rb +1 -1
  61. data/lib/badline/frontend/controls.rb +51 -15
  62. data/lib/badline/frontend/gamepads.rb +3 -3
  63. data/lib/badline/frontend/keys.rb +61 -2
  64. data/lib/badline/frontend/media_slots.rb +1 -1
  65. data/lib/badline/frontend/menu/menu_media.rb +14 -11
  66. data/lib/badline/frontend/menu/menu_pages.rb +29 -6
  67. data/lib/badline/frontend/menu/menu_ports.rb +40 -4
  68. data/lib/badline/frontend/menu/pause_menu.rb +1 -1
  69. data/lib/badline/frontend/pet_keyboard.rb +23 -7
  70. data/lib/badline/frontend/timeline.rb +19 -10
  71. data/lib/badline/kernal_trap/dos/disk_commands.rb +80 -0
  72. data/lib/badline/kernal_trap/dos/status.rb +3 -0
  73. data/lib/badline/kernal_trap/dos.rb +18 -5
  74. data/lib/badline/kernal_trap/ieee.rb +7 -2
  75. data/lib/badline/kernal_trap/ieee_layout.rb +95 -43
  76. data/lib/badline/machine/ieee_drives.rb +194 -0
  77. data/lib/badline/machine/settling.rb +4 -0
  78. data/lib/badline/machine.rb +26 -8
  79. data/lib/badline/media/cbm2_media.rb +29 -0
  80. data/lib/badline/media/pet_media.rb +5 -5
  81. data/lib/badline/media/program.rb +6 -3
  82. data/lib/badline/media/true_drive.rb +50 -8
  83. data/lib/badline/media.rb +21 -8
  84. data/lib/badline/options/family.rb +15 -3
  85. data/lib/badline/options/help.rb +24 -6
  86. data/lib/badline/options/table.rb +25 -5
  87. data/lib/badline/options/validation.rb +47 -7
  88. data/lib/badline/options.rb +48 -15
  89. data/lib/badline/pet/bus/expansion.rb +99 -5
  90. data/lib/badline/pet/bus.rb +30 -12
  91. data/lib/badline/pet/cassettes.rb +22 -1
  92. data/lib/badline/pet/characters.rb +8 -2
  93. data/lib/badline/pet/crtc_video.rb +20 -7
  94. data/lib/badline/pet/ieee_drive.rb +17 -0
  95. data/lib/badline/pet/ieee_ports.rb +19 -1
  96. data/lib/badline/pet/ieee_traps.rb +10 -5
  97. data/lib/badline/pet/keyed_modules.rb +4 -1
  98. data/lib/badline/pet/keyed_parts.rb +10 -6
  99. data/lib/badline/pet/model.rb +56 -6
  100. data/lib/badline/pet/rom_sets.rb +30 -6
  101. data/lib/badline/pet.rb +45 -16
  102. data/lib/badline/plus4/acia.rb +4 -298
  103. data/lib/badline/plus4/keyed_parts.rb +0 -44
  104. data/lib/badline/plus4.rb +1 -0
  105. data/lib/badline/roms/8050/dos-2.7.rom +0 -0
  106. data/lib/badline/roms/8050/fdc-901869-01.rom +0 -0
  107. data/lib/badline/roms/8050/fdc-901885-04.rom +0 -0
  108. data/lib/badline/roms/README +144 -1
  109. data/lib/badline/roms/cbm2/basic128-02b.rom +0 -0
  110. data/lib/badline/roms/cbm2/basic128.rom +0 -0
  111. data/lib/badline/roms/cbm2/basic256.rom +0 -0
  112. data/lib/badline/roms/cbm2/characters-600.rom +0 -0
  113. data/lib/badline/roms/cbm2/characters-700.rom +0 -0
  114. data/lib/badline/roms/cbm2/kernal-03b.rom +0 -0
  115. data/lib/badline/roms/cbm2/kernal-04a.rom +0 -0
  116. data/lib/badline/roms/cbm2/p500-basic.rom +0 -0
  117. data/lib/badline/roms/cbm2/p500-kernal.rom +0 -0
  118. data/lib/badline/roms/dos2031.rom +0 -0
  119. data/lib/badline/roms/pet/characters-din.rom +0 -0
  120. data/lib/badline/roms/pet/editor4-80-b-50hz-8296.rom +0 -0
  121. data/lib/badline/snapshot/cbm2_setup.rb +53 -0
  122. data/lib/badline/snapshot/container.rb +9 -1
  123. data/lib/badline/snapshot/field_doc/markdown.rb +4 -2
  124. data/lib/badline/snapshot/field_doc.rb +39 -3
  125. data/lib/badline/snapshot/image.rb +79 -15
  126. data/lib/badline/snapshot/pet_setup.rb +30 -13
  127. data/lib/badline/snapshot/vice/cbm2.rb +93 -0
  128. data/lib/badline/snapshot/vice/cbm2_acia.rb +75 -0
  129. data/lib/badline/snapshot/vice/cbm2_crtc.rb +127 -0
  130. data/lib/badline/snapshot/vice/cbm2_mains.rb +49 -0
  131. data/lib/badline/snapshot/vice/cbm2_mem.rb +75 -0
  132. data/lib/badline/snapshot/vice/cbm2_restore.rb +204 -0
  133. data/lib/badline/snapshot/vice/cbm2_tpi.rb +58 -0
  134. data/lib/badline/snapshot/vice/cias.rb +13 -9
  135. data/lib/badline/snapshot/vice/p500.rb +96 -0
  136. data/lib/badline/snapshot/vice/p500_restore.rb +130 -0
  137. data/lib/badline/snapshot/vice/p500_vicii.rb +166 -0
  138. data/lib/badline/snapshot/vice/pet.rb +121 -0
  139. data/lib/badline/snapshot/vice/pet_cpu.rb +70 -0
  140. data/lib/badline/snapshot/vice/pet_crtc.rb +241 -0
  141. data/lib/badline/snapshot/vice/pet_drive.rb +180 -0
  142. data/lib/badline/snapshot/vice/pet_drive8050.rb +216 -0
  143. data/lib/badline/snapshot/vice/pet_mem.rb +93 -0
  144. data/lib/badline/snapshot/vice/pet_pias.rb +56 -0
  145. data/lib/badline/snapshot/vice/pet_restore.rb +214 -0
  146. data/lib/badline/snapshot/vice/pet_via.rb +165 -0
  147. data/lib/badline/snapshot/vice/sid_registers.rb +2 -1
  148. data/lib/badline/snapshot/vice/vicii_import.rb +10 -6
  149. data/lib/badline/snapshot/vice.rb +4 -0
  150. data/lib/badline/snapshot.rb +11 -3
  151. data/lib/badline/storage/crt_file.rb +7 -1
  152. data/lib/badline/storage/d64_image.rb +7 -0
  153. data/lib/badline/storage/d80_image.rb +17 -1
  154. data/lib/badline/storage/d81_image.rb +14 -0
  155. data/lib/badline/storage/disk_image/bam.rb +18 -3
  156. data/lib/badline/storage/disk_image/formatting.rb +69 -0
  157. data/lib/badline/storage/disk_image/writing.rb +35 -0
  158. data/lib/badline/storage/disk_image.rb +2 -0
  159. data/lib/badline/storage.rb +1 -0
  160. data/lib/badline/support/cbm2_checkpoint.rb +48 -0
  161. data/lib/badline/support/p500_checkpoint.rb +35 -0
  162. data/lib/badline/version.rb +1 -1
  163. data/lib/badline.rb +1 -0
  164. metadata +87 -2
@@ -13,7 +13,8 @@ machine built afresh has: the default below. `word`, `byte` and
13
13
  `int & 0x..` are ints cut to the latch's width. A text that lists
14
14
  its values takes one of them. An optional int is absent when the
15
15
  latch holds nothing. A true drive's modules are named from its
16
- device number, `BL-D8` to `BL-D11`, and the SIDs past the first
16
+ device number, `BL-D8` to `BL-D11`, or to `BL-D15` for an 8050 or
17
+ an 8250. The SIDs past the first
17
18
  are `BL-SID2` onwards, in the order they were fitted. Keys with
18
19
  `<N>` stand for each numbered unit. A default of "written only" is
19
20
  a key the load doesn't read, or reads only when the snapshot has
@@ -22,18 +23,18 @@ key only some of them have names them.
22
23
 
23
24
  ## BL-MACHINE
24
25
 
25
- Written by the C64, VIC-20, C128, Plus/4, PET.
26
+ Written by the C64, VIC-20, C128, Plus/4, PET, CBM-II.
26
27
 
27
28
  | Key | Type | Default |
28
29
  | --- | --- | --- |
29
- | `family` | text: c64 vic20 c128 plus4 pet | "c64" |
30
+ | `family` | text: c64 vic20 c128 plus4 pet cbm2 | "c64" |
30
31
  | `region` | text: pal ntsc ntscold drean | C64: "pal" |
31
32
  | `vic_model` | text: mos6569 mos8565 mos8566 mos8564 | C64: "mos6569" |
32
33
  | `cia_model` | text: mos6526 mos6526a | C64: "mos6526" |
33
34
  | `sid_model` | text: mos6581 mos8580 | C64: "mos6581"; C128: "mos6581" |
34
35
  | `ram_expansion` | text: none plus60k plus256k | C64: "none"; Plus/4: "none" |
35
36
  | `reu_kb` | int | C64: 0 |
36
- | `kernal` | text: c64 sx64 pet64 gs | C64: "c64" |
37
+ | `kernal` | text: c64 sx64 pet64 gs | C64: "c64"; CBM-II: "04a" |
37
38
  | `datasette` | bool | C64: true |
38
39
  | `board` | text: c64 pet64 gs max | C64: "c64" |
39
40
  | `cycles` | int | 0 |
@@ -49,7 +50,7 @@ Written by the C64, VIC-20, C128, Plus/4, PET.
49
50
  | `ram` | text: unexpanded 3k 8k 16k 24k 32k all | VIC-20: "unexpanded" |
50
51
  | `bus.data` | byte | VIC-20: 253; C128: 255 |
51
52
  | `bus.video_data` | byte | VIC-20: 0 |
52
- | `model` | text: c128 c128ntsc c128dcr c128dcrntsc | C128: "c128"; Plus/4: "plus4"; PET: "8032" |
53
+ | `model` | text: c128 c128ntsc c128dcr c128dcrntsc | C128: "c128"; Plus/4: "plus4"; PET: "8032"; CBM-II: "610" |
53
54
  | `mode` | text: c64 c128 | C128: "c64" |
54
55
  | `bus.address` | word | C128: 65533 |
55
56
  | `clock_bits` | int | C128: 0 |
@@ -68,14 +69,20 @@ Written by the C64, VIC-20, C128, Plus/4, PET.
68
69
  | `host.true_drive_model` | text: 1541 1551 | Plus/4: "1551" |
69
70
  | `refresh_hz` | int | PET: 50 or 60 |
70
71
  | `rom.basic` | text | PET: "pet/basic4.rom" or "pet/basic1.rom" |
71
- | `rom.editor` | text | PET: "pet/editor4-80-b-50hz.rom" or "pet/editor1.rom" |
72
+ | `rom.editor` | text | PET: "pet/editor4-80-b-50hz.rom" or "pet/editor1.rom" or "pet/editor4-80-b-50hz-8296.rom" |
72
73
  | `rom.kernal` | text | PET: "pet/kernal4.rom" or "pet/kernal1.rom" |
73
74
  | `rom.characters` | text | PET: "pet/characters2.rom" or "pet/characters1.rom" |
75
+ | `jumpers` | text | PET: "" |
74
76
  | `vertical_drive` | bool | PET: true |
77
+ | `mains_hz` | int | CBM-II: 50 |
78
+ | `dram_refresh` | bool | CBM-II: true |
79
+ | `mains_countdown` | int | CBM-II: varies |
80
+ | `mains_high` | bool | CBM-II: true |
81
+ | `refresh` | int | CBM-II: 0 |
75
82
 
76
83
  ## BL-RAM
77
84
 
78
- Written by the C64, VIC-20, C128, Plus/4, PET.
85
+ Written by the C64, VIC-20, C128, Plus/4, PET, CBM-II.
79
86
 
80
87
  | Key | Type | Default |
81
88
  | --- | --- | --- |
@@ -84,29 +91,37 @@ Written by the C64, VIC-20, C128, Plus/4, PET.
84
91
  | `bus.high_bank` | int & 0x3 | Plus/4: 0 |
85
92
  | `bus.rom_selected` | bool | Plus/4: true |
86
93
  | `bus.data` | byte | Plus/4: 255; PET: 253 |
87
- | `screen` | bytes | PET: 2048 × 0 or 1024 × 0 |
94
+ | `screen` | bytes | PET: 2048 × 0 or 1024 × 0 or 32768 × 0; CBM-II: 2048 × 0 or 1024 × 0 |
88
95
  | `expansion.control` | byte | PET: 0 |
89
96
  | `expansion.ram` | bytes | PET: 65536 × 0 |
97
+ | `expansion.user_port` | int | PET: 7 |
98
+ | `system` | bytes | CBM-II: 2048 × 0 |
99
+ | `segment<N>` | bytes | CBM-II: 65536 × 0 |
100
+ | `execution_segment` | int & 0xf | CBM-II: 15 |
101
+ | `indirect_segment` | int & 0xf | CBM-II: 15 |
102
+ | `data` | byte | CBM-II: 249 |
103
+ | `cartridge.addresses` | ints | CBM-II: [] |
104
+ | `cartridge.8192` | bytes | CBM-II: [] |
90
105
 
91
106
  ## BL-COLORRAM
92
107
 
93
- Written by the C64, VIC-20, C128.
108
+ Written by the C64, VIC-20, CBM-II, C128.
94
109
 
95
110
  | Key | Type | Default |
96
111
  | --- | --- | --- |
97
- | `ram` | bytes | C64: 1024 × 0; VIC-20: 1024 × 0 |
112
+ | `ram` | bytes | C64: 1024 × 0; VIC-20: 1024 × 0; CBM-II: 1024 × 0 |
98
113
  | `bank<N>` | bytes | C128: 1024 × 0 |
99
114
 
100
115
  ## BL-CPU
101
116
 
102
- Written by the C64, C128, Plus/4, VIC-20, PET.
117
+ Written by the C64, C128, Plus/4, VIC-20, PET, CBM-II.
103
118
 
104
119
  | Key | Type | Default |
105
120
  | --- | --- | --- |
106
121
  | `port.ddr` | byte | C64: 0; C128: 0; Plus/4: 0 |
107
122
  | `port.data` | byte | C64: 0; C128: 0; Plus/4: 0 |
108
123
  | `port.floating` | byte | C64: 0; C128: 0 |
109
- | `pc` | word | C64: 64738; VIC-20: 64802; C128: 65341; Plus/4: 65526; PET: 64790 or 64824 |
124
+ | `pc` | word | C64: 64738; VIC-20: 64802; C128: 65341; Plus/4: 65526; PET: 64790 or 64824; CBM-II: 63895 or 63902 |
110
125
  | `sp` | byte | 255 |
111
126
  | `a` | byte | 0 |
112
127
  | `x` | byte | 0 |
@@ -128,7 +143,7 @@ Written by the C64, C128, Plus/4, VIC-20, PET.
128
143
 
129
144
  ## BL-VIC
130
145
 
131
- Written by the C64, C128.
146
+ Written by the C64, C128, CBM-II.
132
147
 
133
148
  | Key | Type | Default |
134
149
  | --- | --- | --- |
@@ -190,11 +205,11 @@ Written by the C64, C128.
190
205
  | `shifter.late_mcm` | bool | false |
191
206
  | `shifter.late_read` | bool | false |
192
207
  | `line.number` | int | 0 |
193
- | `line.colors` | bytes | 504 × 0 |
194
- | `line.fg` | ints | 504 × 0 |
195
- | `line.border.groups` | ints | 63 × 0 |
196
- | `line.border.mask` | ints | 504 × 1 |
197
- | `line.border.snapshot` | bytes | 504 × 0 |
208
+ | `line.colors` | bytes | C64: 504 × 0; C128: 504 × 0; CBM-II: 504 × 0 or 520 × 0 |
209
+ | `line.fg` | ints | C64: 504 × 0; C128: 504 × 0; CBM-II: 504 × 0 or 520 × 0 |
210
+ | `line.border.groups` | ints | C64: 63 × 0; C128: 63 × 0; CBM-II: 63 × 0 or 65 × 0 |
211
+ | `line.border.mask` | ints | C64: 504 × 1; C128: 504 × 1; CBM-II: 504 × 1 or 520 × 1 |
212
+ | `line.border.snapshot` | bytes | C64: 504 × 0; C128: 504 × 0; CBM-II: 504 × 0 or 520 × 0 |
198
213
  | `line.patches` | ints | [] |
199
214
  | `sprite<N>.dma` | bool | false |
200
215
  | `sprite<N>.display_on` | bool | false |
@@ -221,18 +236,18 @@ Written by the C64, C128.
221
236
  | `line.sprite<N>.reload_span` | int | 0 |
222
237
  | `sbus.lines` | int | 0 |
223
238
  | `sbus.ghost` | byte | 255 |
224
- | `sbus.value` | ints | 63 × 255 |
225
- | `sbus.line` | ints | 63 × -1 |
239
+ | `sbus.value` | ints | C64: 63 × 255; C128: 63 × 255; CBM-II: 63 × 255 or 65 × 255 |
240
+ | `sbus.line` | ints | C64: 63 × -1; C128: 63 × -1; CBM-II: 63 × -1 or 65 × -1 |
226
241
  | `collisions.cleared_sprite` | int | 0 |
227
242
  | `collisions.cleared_data` | int | 0 |
228
- | `line.collisions.hits` | bytes | 504 × 0 |
243
+ | `line.collisions.hits` | bytes | C64: 504 × 0; C128: 504 × 0; CBM-II: 504 × 0 or 520 × 0 |
229
244
  | `line.collisions.folded` | int | 0 |
230
245
  | `line.carried` | bool | false |
231
- | `line.lo` | int | 504 |
246
+ | `line.lo` | int | C64: 504; C128: 504; CBM-II: 504 or 520 |
232
247
  | `line.hi` | int | 0 |
233
248
  | `line.sequenced` | int | -1 |
234
- | `line.win_color` | bytes | 504 × 0 |
235
- | `line.win_priority` | ints | 504 × 0 |
249
+ | `line.win_color` | bytes | C64: 504 × 0; C128: 504 × 0; CBM-II: 504 × 0 or 520 × 0 |
250
+ | `line.win_priority` | ints | C64: 504 × 0; C128: 504 × 0; CBM-II: 504 × 0 or 520 × 0 |
236
251
  | `line.palette` | ints | [0, 0, 0, 0] |
237
252
  | `line.stopped_dma` | bool | false |
238
253
  | `line.carry<N>` | ints | [] |
@@ -242,7 +257,7 @@ Written by the C64, C128.
242
257
  | `line.log.values` | ints | 64 × 0 |
243
258
  | `line.log.cursor` | int | 0 |
244
259
  | `line.log.next_x` | int | 0 |
245
- | `display` | bytes | 157248 × 0 |
260
+ | `display` | bytes | C64: 157248 × 0; C128: 157248 × 0; CBM-II: 157248 × 0 or 136760 × 0 |
246
261
  | `output_line` | int | C128: 0 |
247
262
  | `test_wrap` | bool | C128: false |
248
263
 
@@ -388,7 +403,7 @@ Written by the C64, C128.
388
403
 
389
404
  ## BL-SID
390
405
 
391
- Written by the C64, C128, Plus/4.
406
+ Written by the C64, C128, Plus/4, CBM-II.
392
407
 
393
408
  | Key | Type | Default |
394
409
  | --- | --- | --- |
@@ -553,7 +568,7 @@ Written by the C64, VIC-20, Plus/4.
553
568
 
554
569
  ## BL-TRAPDOS
555
570
 
556
- Written by the C64, PET.
571
+ Written by the C64, PET, CBM-II.
557
572
 
558
573
  | Key | Type | Default |
559
574
  | --- | --- | --- |
@@ -580,20 +595,20 @@ Written by the C64, PET.
580
595
  | `serial.frame` | int | C64: 240 |
581
596
  | `serial.buffer` | bytes | C64: [] |
582
597
  | `save.saving` | bool | C64: false |
583
- | `ieee.listening` | bool | PET: false |
584
- | `ieee.talking` | bool | PET: false |
585
- | `ieee.listen_channel` | int, optional | PET: absent |
586
- | `ieee.talk_channel` | int, optional | PET: absent |
587
- | `ieee.frame` | int | PET: 240 |
588
- | `ieee.buffer` | bytes | PET: [] |
598
+ | `ieee.listening` | bool | PET: false; CBM-II: false |
599
+ | `ieee.talking` | bool | PET: false; CBM-II: false |
600
+ | `ieee.listen_channel` | int, optional | PET: absent; CBM-II: absent |
601
+ | `ieee.talk_channel` | int, optional | PET: absent; CBM-II: absent |
602
+ | `ieee.frame` | int | PET: 240; CBM-II: 240 |
603
+ | `ieee.buffer` | bytes | PET: []; CBM-II: [] |
589
604
 
590
605
  ## BL-D8
591
606
 
592
- Written by the C64, C128, Plus/4.
607
+ Written by the C64, C128, Plus/4, PET.
593
608
 
594
609
  | Key | Type | Default |
595
610
  | --- | --- | --- |
596
- | `model` | text: 1541 1551 1571 1581 | C64: "1541" or "1581"; C128: "1541" or "1571"; Plus/4: "1541" or "1551" |
611
+ | `model` | text: 1541 1551 1571 1581 | C64: "1541" or "1581"; C128: "1541" or "1571"; Plus/4: "1541" or "1551"; PET: "2031" or "8050" or "8250" |
597
612
  | `phase` | int | 0 |
598
613
  | `cycles` | int | 0 |
599
614
  | `so_pending` | bool | false |
@@ -601,19 +616,22 @@ Written by the C64, C128, Plus/4.
601
616
  | `atn` | bool | C64: true |
602
617
  | `irq_timer` | int | Plus/4: 16660 |
603
618
  | `latched_byte` | byte | Plus/4: 0 |
619
+ | `ieee.host` | int | PET: 0 |
620
+ | `ip_data` | byte | PET: 242 |
621
+ | `fdc_data` | byte | PET: 252 |
604
622
 
605
623
  ## BL-D8-RAM
606
624
 
607
- Written by the C64, C128, Plus/4.
625
+ Written by the C64, C128, Plus/4, PET.
608
626
 
609
627
  | Key | Type | Default |
610
628
  | --- | --- | --- |
611
- | `data` | byte | C64: 234 or 175; C128: 234; Plus/4: 234 or 233 |
612
- | `ram` | bytes | C64: 2048 × 0 or 8192 × 0; C128: 2048 × 0; Plus/4: 2048 × 0 |
629
+ | `data` | byte | C64: 234 or 175; C128: 234; Plus/4: 234 or 233; PET: 234 |
630
+ | `ram` | bytes | C64: 2048 × 0 or 8192 × 0; C128: 2048 × 0; Plus/4: 2048 × 0; PET: 2048 × 0 |
613
631
 
614
632
  ## BL-D8-VIA1
615
633
 
616
- Written by the C64, C128, Plus/4.
634
+ Written by the C64, C128, Plus/4, PET.
617
635
 
618
636
  | Key | Type | Default |
619
637
  | --- | --- | --- |
@@ -647,7 +665,7 @@ Written by the C64, C128, Plus/4.
647
665
  | `ifr.flags` | int & 0x7f | 0 |
648
666
  | `ifr.enable` | int & 0x7f | 0 |
649
667
  | `ca.control` | int & 0xf | 0 |
650
- | `ca.c1_high` | bool | C64: true; C128: true; Plus/4: false |
668
+ | `ca.c1_high` | bool | C64: true; C128: true; Plus/4: false; PET: false |
651
669
  | `ca.c2_high` | bool | true |
652
670
  | `ca.handshake_low` | bool | false |
653
671
  | `ca.pulse` | int | 0 |
@@ -661,7 +679,7 @@ Written by the C64, C128, Plus/4.
661
679
 
662
680
  ## BL-D8-VIA2
663
681
 
664
- Written by the C64, C128, Plus/4.
682
+ Written by the C64, C128, Plus/4, PET.
665
683
 
666
684
  | Key | Type | Default |
667
685
  | --- | --- | --- |
@@ -709,11 +727,11 @@ Written by the C64, C128, Plus/4.
709
727
 
710
728
  ## BL-D8-CPU
711
729
 
712
- Written by the C64, C128, Plus/4.
730
+ Written by the C64, C128, Plus/4, PET.
713
731
 
714
732
  | Key | Type | Default |
715
733
  | --- | --- | --- |
716
- | `pc` | word | C64: 60064 or 44836; C128: 60064; Plus/4: 60064 or 59829 |
734
+ | `pc` | word | C64: 60064 or 44836; C128: 60064; Plus/4: 60064 or 59829; PET: 60101 |
717
735
  | `sp` | byte | 255 |
718
736
  | `a` | byte | 0 |
719
737
  | `x` | byte | 0 |
@@ -735,7 +753,7 @@ Written by the C64, C128, Plus/4.
735
753
 
736
754
  ## BL-D8-DISK
737
755
 
738
- Written by the C64, C128, Plus/4.
756
+ Written by the C64, C128, Plus/4, PET.
739
757
 
740
758
  | Key | Type | Default |
741
759
  | --- | --- | --- |
@@ -747,17 +765,19 @@ Written by the C64, C128, Plus/4.
747
765
  | `track<N>.zone` | int, optional | absent |
748
766
  | `written` | ints | [] |
749
767
  | `changed` | ints | C64: [] |
768
+ | `image.format` | text: d80 d82 | PET: "d80" |
769
+ | `track<N>` | ints | PET: [] |
750
770
 
751
771
  ## BL-D8-MECH
752
772
 
753
- Written by the C64, C128, Plus/4.
773
+ Written by the C64, C128, Plus/4, PET.
754
774
 
755
775
  | Key | Type | Default |
756
776
  | --- | --- | --- |
757
- | `half_track` | int | C64: 35; C128: 37; Plus/4: 35 or 36 |
758
- | `slip` | int & 0x3 | C64: 0; C128: 2; Plus/4: 0 |
759
- | `side` | int | C64: 0 or 1; C128: 85; Plus/4: 0 |
760
- | `zone` | int & 0x3 | C64: 3; C128: 3; Plus/4: 3 or 0 |
777
+ | `half_track` | int | C64: 35; C128: 37; Plus/4: 35 or 36; PET: 35 |
778
+ | `slip` | int & 0x3 | C64: 0; C128: 2; Plus/4: 0; PET: 0 |
779
+ | `side` | int | C64: 0 or 1; C128: 85; Plus/4: 0; PET: 0 |
780
+ | `zone` | int & 0x3 | C64: 3; C128: 3; Plus/4: 3 or 0; PET: 3 |
761
781
  | `time` | int | 0 |
762
782
  | `read_clock_in` | int | 2097152 |
763
783
  | `clocks` | int | 0 |
@@ -765,8 +785,8 @@ Written by the C64, C128, Plus/4.
765
785
  | `ones` | int | 0 |
766
786
  | `bits` | int | 0 |
767
787
  | `write_shift` | int | 0 |
768
- | `motor` | bool | C64: true or false; C128: true; Plus/4: true or false |
769
- | `led` | bool | C64: true; C128: true; Plus/4: true or false |
788
+ | `motor` | bool | C64: true or false; C128: true; Plus/4: true or false; PET: true |
789
+ | `led` | bool | C64: true; C128: true; Plus/4: true or false; PET: true |
770
790
  | `sync` | bool | false |
771
791
  | `byte_ready` | bool | false |
772
792
  | `byte_latched` | bool | false |
@@ -777,6 +797,16 @@ Written by the C64, C128, Plus/4.
777
797
  | `cylinder` | int | C64: 0 |
778
798
  | `angle` | int | C64: 0 |
779
799
  | `changed` | bool | C64: true |
800
+ | `cylinders` | ints | PET: [0, 0] |
801
+ | `phases` | ints | PET: [0, 0] |
802
+ | `positions` | ints | PET: [0, 0] |
803
+ | `bit_clocks` | ints | PET: [0, 0] |
804
+ | `changing` | ints | PET: [0, 0] |
805
+ | `motors` | ints | PET: [0, 0] |
806
+ | `syncs` | ints | PET: [0, 0] |
807
+ | `so_pending` | bool | PET: false |
808
+ | `ca1_low` | bool | PET: false |
809
+ | `data_in` | byte | PET: 255 |
780
810
 
781
811
  ## BL-D8-CIA
782
812
 
@@ -1196,7 +1226,7 @@ Written by the Plus/4.
1196
1226
 
1197
1227
  ## BL-ACIA
1198
1228
 
1199
- Written by the Plus/4.
1229
+ Written by the Plus/4, CBM-II.
1200
1230
 
1201
1231
  | Key | Type | Default |
1202
1232
  | --- | --- | --- |
@@ -1361,7 +1391,7 @@ Written by the PET.
1361
1391
 
1362
1392
  ## BL-CRTC
1363
1393
 
1364
- Written by the PET.
1394
+ Written by the PET, CBM-II.
1365
1395
 
1366
1396
  | Key | Type | Default |
1367
1397
  | --- | --- | --- |
@@ -1380,28 +1410,30 @@ Written by the PET.
1380
1410
 
1381
1411
  ## BL-VIDEO
1382
1412
 
1383
- Written by the PET.
1413
+ Written by the PET, CBM-II.
1384
1414
 
1385
1415
  | Key | Type | Default |
1386
1416
  | --- | --- | --- |
1387
- | `displayed` | int | 0 |
1388
- | `frame_displayed` | int | 0 |
1417
+ | `displayed` | int | PET: 0 |
1418
+ | `frame_displayed` | int | PET: 0 |
1389
1419
  | `line_shown` | bool | false |
1390
- | `y` | int | 136 |
1391
- | `from_y` | int | 136 |
1392
- | `to_y` | int | 136 |
1393
- | `shown_from` | int | 36 |
1394
- | `shown_to` | int | 37 |
1395
- | `on_canvas` | bool | true |
1396
- | `origin` | int | 336 |
1397
- | `from` | int | 704 |
1398
- | `to` | int | -704 |
1399
- | `canvas.dots` | bytes | 192192 × 0 or 83328 × 0 |
1400
- | `canvas.painted` | ints | 48048 × 0 or 20832 × 0 |
1401
- | `canvas.span_from` | ints | 273 × 0 or 217 × 0 |
1402
- | `canvas.span_to` | ints | 273 × 0 or 217 × 0 |
1403
- | `column` | int | 0 |
1420
+ | `y` | int | PET: 136 |
1421
+ | `from_y` | int | PET: 136 |
1422
+ | `to_y` | int | PET: 136 |
1423
+ | `shown_from` | int | PET: 36 |
1424
+ | `shown_to` | int | PET: 37 |
1425
+ | `on_canvas` | bool | PET: true |
1426
+ | `origin` | int | PET: 336; CBM-II: 24 |
1427
+ | `from` | int | PET: 704 |
1428
+ | `to` | int | PET: -704 |
1429
+ | `canvas.dots` | bytes | PET: 192192 × 0 or 83328 × 0; CBM-II: 187264 × 0 or 258368 × 0 |
1430
+ | `canvas.painted` | ints | PET: 48048 × 0 or 20832 × 0; CBM-II: 46816 × 0 or 64592 × 0 |
1431
+ | `canvas.span_from` | ints | PET: 273 × 0 or 217 × 0; CBM-II: 266 × 0 or 367 × 0 |
1432
+ | `canvas.span_to` | ints | PET: 273 × 0 or 217 × 0; CBM-II: 266 × 0 or 367 × 0 |
1433
+ | `column` | int | PET: 0 |
1404
1434
  | `line` | int | 0 |
1435
+ | `frames` | int | CBM-II: 2 |
1436
+ | `layout` | ints | CBM-II: 9 × 0 |
1405
1437
 
1406
1438
  ## BL-TAPE1
1407
1439
 
@@ -1438,3 +1470,280 @@ Written by the PET.
1438
1470
  | `tape.bytes` | bytes | [] |
1439
1471
  | `tape.path` | text | "" |
1440
1472
  | `tape.position` | int | 0 |
1473
+
1474
+ ## BL-D8-COMMON
1475
+
1476
+ Written by the PET.
1477
+
1478
+ | Key | Type | Default |
1479
+ | --- | --- | --- |
1480
+ | `ram` | bytes | 4096 × 0 |
1481
+
1482
+ ## BL-D8-RIOT1
1483
+
1484
+ Written by the PET.
1485
+
1486
+ | Key | Type | Default |
1487
+ | --- | --- | --- |
1488
+ | `ram` | bytes | 128 × 0 |
1489
+ | `ora` | byte | 0 |
1490
+ | `orb` | byte | 0 |
1491
+ | `ddra` | byte | 0 |
1492
+ | `ddrb` | byte | 0 |
1493
+ | `pa7_high` | bool | true |
1494
+ | `pa7_active` | bool | false |
1495
+ | `pa7_flag` | bool | false |
1496
+ | `edge_irq_enabled` | bool | false |
1497
+ | `rising_edge` | bool | false |
1498
+ | `timer.counter` | byte | 0 |
1499
+ | `timer.interval` | int & 0x3 | 0 |
1500
+ | `timer.prescale` | int | 1 |
1501
+ | `timer.expired` | bool | true |
1502
+ | `timer.flag` | bool | false |
1503
+ | `timer.irq_enabled` | bool | false |
1504
+ | `timer.fired` | bool | false |
1505
+
1506
+ ## BL-D8-RIOT2
1507
+
1508
+ Written by the PET.
1509
+
1510
+ | Key | Type | Default |
1511
+ | --- | --- | --- |
1512
+ | `ram` | bytes | 128 × 0 |
1513
+ | `ora` | byte | 0 |
1514
+ | `orb` | byte | 0 |
1515
+ | `ddra` | byte | 0 |
1516
+ | `ddrb` | byte | 0 |
1517
+ | `pa7_high` | bool | true |
1518
+ | `pa7_active` | bool | false |
1519
+ | `pa7_flag` | bool | false |
1520
+ | `edge_irq_enabled` | bool | false |
1521
+ | `rising_edge` | bool | false |
1522
+ | `timer.counter` | byte | 0 |
1523
+ | `timer.interval` | int & 0x3 | 0 |
1524
+ | `timer.prescale` | int | 1 |
1525
+ | `timer.expired` | bool | true |
1526
+ | `timer.flag` | bool | false |
1527
+ | `timer.irq_enabled` | bool | false |
1528
+ | `timer.fired` | bool | false |
1529
+
1530
+ ## BL-D8-IPCPU
1531
+
1532
+ Written by the PET.
1533
+
1534
+ | Key | Type | Default |
1535
+ | --- | --- | --- |
1536
+ | `pc` | word | 62135 |
1537
+ | `sp` | byte | 255 |
1538
+ | `a` | byte | 0 |
1539
+ | `x` | byte | 0 |
1540
+ | `y` | byte | 0 |
1541
+ | `p` | byte | 32 |
1542
+ | `nmi` | bool | false |
1543
+ | `so_high` | bool | true |
1544
+ | `irq.sample` | bool | false |
1545
+ | `irq.pending` | bool | false |
1546
+ | `irq.boundary` | bool | false |
1547
+ | `nmi.sample` | bool | false |
1548
+ | `nmi.pending` | bool | false |
1549
+ | `nmi.boundary` | bool | false |
1550
+ | `skip_poll` | bool | false |
1551
+ | `cycles` | int | 0 |
1552
+ | `instructions` | int | 0 |
1553
+ | `stalled` | int, optional | absent |
1554
+ | `pos.seq` | text: boundary op interrupt jam | "boundary" |
1555
+
1556
+ ## BL-D8-FDCCPU
1557
+
1558
+ Written by the PET.
1559
+
1560
+ | Key | Type | Default |
1561
+ | --- | --- | --- |
1562
+ | `pc` | word | 64516 |
1563
+ | `sp` | byte | 255 |
1564
+ | `a` | byte | 0 |
1565
+ | `x` | byte | 0 |
1566
+ | `y` | byte | 0 |
1567
+ | `p` | byte | 32 |
1568
+ | `nmi` | bool | false |
1569
+ | `so_high` | bool | true |
1570
+ | `irq.sample` | bool | false |
1571
+ | `irq.pending` | bool | false |
1572
+ | `irq.boundary` | bool | false |
1573
+ | `nmi.sample` | bool | false |
1574
+ | `nmi.pending` | bool | false |
1575
+ | `nmi.boundary` | bool | false |
1576
+ | `skip_poll` | bool | false |
1577
+ | `cycles` | int | 0 |
1578
+ | `instructions` | int | 0 |
1579
+ | `stalled` | int, optional | absent |
1580
+ | `pos.seq` | text: boundary op interrupt jam | "boundary" |
1581
+
1582
+ ## BL-D8-VIA
1583
+
1584
+ Written by the PET.
1585
+
1586
+ | Key | Type | Default |
1587
+ | --- | --- | --- |
1588
+ | `ora` | byte | 0 |
1589
+ | `orb` | byte | 0 |
1590
+ | `ddra` | byte | 0 |
1591
+ | `ddrb` | byte | 0 |
1592
+ | `latch_a` | byte | 255 |
1593
+ | `latch_b` | byte | 255 |
1594
+ | `acr` | byte | 0 |
1595
+ | `pcr` | byte | 0 |
1596
+ | `pb6_high` | bool | true |
1597
+ | `t<N>.counter` | word | 65535 |
1598
+ | `t1.latch` | word | 65535 |
1599
+ | `t<N>.hold` | bool | false |
1600
+ | `t1.reload` | bool | false |
1601
+ | `t<N>.armed` | bool | false |
1602
+ | `t1.pb7` | bool | true |
1603
+ | `t2.latch_low` | byte | 255 |
1604
+ | `t2.low_reload` | bool | false |
1605
+ | `t2.low_underflowed` | bool | false |
1606
+ | `t2.count_pulses` | bool | false |
1607
+ | `t2.counting_pulses` | bool | false |
1608
+ | `sr.mode` | int & 0x7 | 0 |
1609
+ | `sr.data` | byte | 0 |
1610
+ | `sr.bits` | int | 0 |
1611
+ | `sr.delay` | int | 0 |
1612
+ | `sr.clock` | bool | true |
1613
+ | `sr.cb2` | bool | true |
1614
+ | `sr.cb2_input` | bool | true |
1615
+ | `ifr.flags` | int & 0x7f | 0 |
1616
+ | `ifr.enable` | int & 0x7f | 0 |
1617
+ | `ca.control` | int & 0xf | 0 |
1618
+ | `ca.c1_high` | bool | true |
1619
+ | `ca.c2_high` | bool | true |
1620
+ | `ca.handshake_low` | bool | false |
1621
+ | `ca.pulse` | int | 0 |
1622
+ | `ca.c2_output` | bool | true |
1623
+ | `cb.control` | int & 0xf | 0 |
1624
+ | `cb.c1_high` | bool | true |
1625
+ | `cb.c2_high` | bool | true |
1626
+ | `cb.handshake_low` | bool | false |
1627
+ | `cb.pulse` | int | 0 |
1628
+ | `cb.c2_output` | bool | true |
1629
+
1630
+ ## BL-D8-RRIOT
1631
+
1632
+ Written by the PET.
1633
+
1634
+ | Key | Type | Default |
1635
+ | --- | --- | --- |
1636
+ | `ram` | bytes | 64 × 0 |
1637
+ | `ora` | byte | 0 |
1638
+ | `orb` | byte | 0 |
1639
+ | `ddra` | byte | 0 |
1640
+ | `ddrb` | byte | 0 |
1641
+ | `timer.counter` | byte | 0 |
1642
+ | `timer.interval` | int & 0x3 | 0 |
1643
+ | `timer.prescale` | int | 1 |
1644
+ | `timer.expired` | bool | true |
1645
+ | `timer.flag` | bool | false |
1646
+ | `timer.irq_enabled` | bool | false |
1647
+ | `timer.fired` | bool | false |
1648
+
1649
+ ## BL-CIA
1650
+
1651
+ Written by the CBM-II.
1652
+
1653
+ | Key | Type | Default |
1654
+ | --- | --- | --- |
1655
+ | `pra` | byte | 0 |
1656
+ | `prb` | byte | 0 |
1657
+ | `ddra` | byte | 0 |
1658
+ | `ddrb` | byte | 0 |
1659
+ | `cra` | byte | 0 |
1660
+ | `crb` | byte | 0 |
1661
+ | `pb4_high` | bool | true |
1662
+ | `pb4_driven_high` | bool | true |
1663
+ | `cnt_high` | bool | true |
1664
+ | `cnt_rise` | bool | false |
1665
+ | `ta.counter` | word | 65535 |
1666
+ | `ta.latch` | word | 65535 |
1667
+ | `ta.pipe` | int & 0x3 | 0 |
1668
+ | `ta.load_delay` | int | 0 |
1669
+ | `ta.reload` | bool | false |
1670
+ | `ta.underflowed` | bool | false |
1671
+ | `ta.oneshot_linger` | int | 0 |
1672
+ | `ta.toggle` | bool | true |
1673
+ | `tb.counter` | word | 65535 |
1674
+ | `tb.latch` | word | 65535 |
1675
+ | `tb.pipe` | int & 0x3 | 0 |
1676
+ | `tb.load_delay` | int | 0 |
1677
+ | `tb.reload` | bool | false |
1678
+ | `tb.underflowed` | bool | false |
1679
+ | `tb.oneshot_linger` | int | 0 |
1680
+ | `tb.toggle` | bool | true |
1681
+ | `icr.mask` | byte | 0 |
1682
+ | `icr.status` | byte | 0 |
1683
+ | `icr.pending` | int | 0 |
1684
+ | `icr.read` | int, optional | absent |
1685
+ | `icr.read_last_cycle` | int, optional | absent |
1686
+ | `icr.read_two_cycles_ago` | int, optional | absent |
1687
+ | `icr.timer_b_bug` | bool | false |
1688
+ | `sdr.data` | byte | 0 |
1689
+ | `sdr.shift` | byte | 0 |
1690
+ | `sdr.steps` | int | 0 |
1691
+ | `sdr.empty_in` | int, optional | absent |
1692
+ | `sdr.busy_in` | int, optional | absent |
1693
+ | `sdr.busy` | bool | false |
1694
+ | `sdr.abandoned` | bool | false |
1695
+ | `sdr.pending` | int, optional | absent |
1696
+ | `sdr.underflow_high` | bool | false |
1697
+ | `sdr.in_flight` | bool | false |
1698
+ | `sdr.flight_up` | int | 0 |
1699
+ | `sdr.flight_down` | int | 0 |
1700
+ | `sdr.cnt` | bool | true |
1701
+ | `sdr.cnt_in` | bool | true |
1702
+ | `sdr.sp_in` | bool | true |
1703
+ | `sdr.sp_out` | bool | true |
1704
+ | `sdr.idle` | bool | true |
1705
+ | `tod.mains_phase` | int | 0 |
1706
+ | `tod.pulses` | int | 0 |
1707
+ | `tod.stopped` | bool | true |
1708
+ | `tod.alarm_pending` | bool | false |
1709
+ | `tod.clock.tenths` | byte | 0 |
1710
+ | `tod.alarm.tenths` | byte | 0 |
1711
+ | `tod.clock.seconds` | byte | 0 |
1712
+ | `tod.alarm.seconds` | byte | 0 |
1713
+ | `tod.clock.minutes` | byte | 0 |
1714
+ | `tod.alarm.minutes` | byte | 0 |
1715
+ | `tod.clock.hours` | byte | 1 |
1716
+ | `tod.alarm.hours` | byte | 0 |
1717
+ | `tod.latch.hours` | int, optional | absent |
1718
+
1719
+ ## BL-TPI1
1720
+
1721
+ Written by the CBM-II.
1722
+
1723
+ | Key | Type | Default |
1724
+ | --- | --- | --- |
1725
+ | `ports` | ints | [0, 0, 0] |
1726
+ | `directions` | ints | [0, 0, 0] |
1727
+ | `control` | byte | 0 |
1728
+ | `latches` | int & 0x1f | 0 |
1729
+ | `air` | int & 0x1f | 0 |
1730
+ | `stack` | ints | [] |
1731
+ | `ca` | bool | false |
1732
+ | `cb` | bool | false |
1733
+ | `lines` | int & 0x1f | 31 |
1734
+
1735
+ ## BL-TPI2
1736
+
1737
+ Written by the CBM-II.
1738
+
1739
+ | Key | Type | Default |
1740
+ | --- | --- | --- |
1741
+ | `ports` | ints | [0, 0, 0] |
1742
+ | `directions` | ints | [0, 0, 0] |
1743
+ | `control` | byte | 0 |
1744
+ | `latches` | int & 0x1f | 0 |
1745
+ | `air` | int & 0x1f | 0 |
1746
+ | `stack` | ints | [] |
1747
+ | `ca` | bool | false |
1748
+ | `cb` | bool | false |
1749
+ | `lines` | int & 0x1f | 31 |