badline 0.8.0 → 0.9.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/README.md +22 -16
- data/doc/library.md +10 -3
- data/doc/media.md +11 -2
- data/doc/pinned-behaviour.md +53 -9
- data/doc/sid-player.md +8 -4
- data/doc/snapshots.md +66 -33
- data/lib/badline/address_bus/roms.rb +32 -0
- data/lib/badline/address_bus.rb +4 -4
- data/lib/badline/audio/bare_player.rb +24 -0
- data/lib/badline/audio/checkpoints.rb +42 -0
- data/lib/badline/audio/jukebox.rb +11 -4
- data/lib/badline/audio/machine_player.rb +16 -0
- data/lib/badline/audio/renderer.rb +80 -9
- data/lib/badline/audio/stereo.rb +3 -5
- data/lib/badline/audio.rb +1 -0
- data/lib/badline/computer/attachments.rb +5 -5
- data/lib/badline/computer.rb +12 -10
- data/lib/badline/core.rb +48 -0
- data/lib/badline/data_path.rb +37 -0
- data/lib/badline/datasette.rb +24 -9
- data/lib/badline/drive1541/disk.rb +3 -3
- data/lib/badline/drive1541/disk_state.rb +14 -5
- data/lib/badline/frontend/app.rb +4 -3
- data/lib/badline/frontend/boot.rb +9 -4
- data/lib/badline/frontend/confirmation.rb +17 -11
- data/lib/badline/frontend/menu_dialogs.rb +52 -14
- data/lib/badline/frontend/menu_media.rb +36 -7
- data/lib/badline/frontend/menu_pages.rb +24 -2
- data/lib/badline/frontend/name_field.rb +88 -0
- data/lib/badline/frontend/pause_menu.rb +25 -7
- data/lib/badline/frontend/player_window.rb +3 -3
- data/lib/badline/frontend/snapshots.rb +145 -17
- data/lib/badline/frontend/sound.rb +11 -5
- data/lib/badline/frontend.rb +1 -0
- data/lib/badline/kernal_trap/load.rb +10 -0
- data/lib/badline/kernal_trap/routine.rb +28 -0
- data/lib/badline/kernal_trap/serial.rb +19 -7
- data/lib/badline/media/disk_list.rb +75 -0
- data/lib/badline/media/disk_set.rb +13 -3
- data/lib/badline/media.rb +8 -3
- data/lib/badline/model.rb +62 -0
- data/lib/badline/options/event.rb +5 -3
- data/lib/badline/options/help.rb +16 -12
- data/lib/badline/options/table.rb +5 -1
- data/lib/badline/options/validation.rb +9 -0
- data/lib/badline/options.rb +7 -4
- data/lib/badline/region.rb +16 -4
- data/lib/badline/reu/ram.rb +27 -0
- data/lib/badline/reu/saved_state.rb +27 -0
- data/lib/badline/roms/README +10 -0
- data/lib/badline/roms/kernal-sx64.rom +0 -0
- data/lib/badline/sid/decimator.rb +13 -0
- data/lib/badline/sid/filter.rb +6 -3
- data/lib/badline/sid.rb +19 -0
- data/lib/badline/snapshot/fields.rb +1 -0
- data/lib/badline/snapshot/setup.rb +20 -8
- data/lib/badline/snapshot/state.rb +14 -7
- data/lib/badline/snapshot/vice/main_cpu.rb +1 -1
- data/lib/badline/snapshot/vice/peripherals.rb +12 -2
- data/lib/badline/snapshot/vice/restore.rb +3 -1
- data/lib/badline/snapshot/vice/reu1764.rb +55 -0
- data/lib/badline/snapshot/vice/vicii.rb +59 -13
- data/lib/badline/snapshot/vice/vicii_import.rb +14 -3
- data/lib/badline/snapshot/vice.rb +25 -23
- data/lib/badline/storage/t64.rb +7 -4
- data/lib/badline/storage/tap.rb +7 -5
- data/lib/badline/storage/unavailable.rb +1 -1
- data/lib/badline/storage.rb +5 -5
- data/lib/badline/version.rb +1 -1
- data/lib/badline/vic/sprite/timing.rb +5 -9
- data/lib/badline/vic/sprite.rb +4 -3
- data/lib/badline.rb +2 -38
- metadata +10 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Badline
|
|
4
4
|
module Storage
|
|
5
|
-
# Stands in for a directory
|
|
5
|
+
# Stands in for a directory a detached restore leaves out
|
|
6
6
|
# (Snapshot::StateReader): it finds no files and refuses every write
|
|
7
7
|
# as a write-protected disk does.
|
|
8
8
|
class Unavailable
|
data/lib/badline/storage.rb
CHANGED
|
@@ -45,16 +45,16 @@ module Badline
|
|
|
45
45
|
T64_ARCHIVE = 4
|
|
46
46
|
|
|
47
47
|
class << self
|
|
48
|
-
# Opens the storage a save_setup wrote: the same directory
|
|
49
|
-
#
|
|
50
|
-
# all. A detached reader gets the image
|
|
51
|
-
# Unavailable for a directory
|
|
48
|
+
# Opens the storage a save_setup wrote: the same directory by its
|
|
49
|
+
# path, an archive with the bytes it held, or a disk image with the
|
|
50
|
+
# bytes it held, writes and all. A detached reader gets the image
|
|
51
|
+
# write-protected, and Unavailable for a directory.
|
|
52
52
|
def reopen(input)
|
|
53
53
|
kind = input.int
|
|
54
54
|
path = input.string
|
|
55
55
|
case kind
|
|
56
56
|
when HOST_DIRECTORY then input.detached? ? Unavailable.new : HostDirectory.new(path)
|
|
57
|
-
when T64_ARCHIVE then
|
|
57
|
+
when T64_ARCHIVE then T64.new(path, bytes: input.blob)
|
|
58
58
|
else reopen_image(kind, path, input)
|
|
59
59
|
end
|
|
60
60
|
end
|
data/lib/badline/version.rb
CHANGED
|
@@ -11,10 +11,9 @@ module Badline
|
|
|
11
11
|
# fetches or the compare run a cycle later than on the 6569, what
|
|
12
12
|
# hangs off them moves 8 pixels with them.
|
|
13
13
|
class Timing
|
|
14
|
-
# The X counter's value where it
|
|
15
|
-
# pixels,
|
|
14
|
+
# The X counter's value where it steps back on a raster of more than
|
|
15
|
+
# 512 pixels, to run over the eight values below it again.
|
|
16
16
|
HOLD_AT = 0x188
|
|
17
|
-
HOLD_BASE = 0x184
|
|
18
17
|
|
|
19
18
|
attr_reader :columns, :sprite_cycle, :display_off_x, :x_pixels
|
|
20
19
|
|
|
@@ -36,14 +35,11 @@ module Badline
|
|
|
36
35
|
def reload_x(index) = RELOAD_X + (8 * @shift) + (RELOAD_STEP * index)
|
|
37
36
|
|
|
38
37
|
# The X counter at a raster pixel: X_OFFSET behind it, wrapping at
|
|
39
|
-
# the end of the line, less the pixels it held for
|
|
40
|
-
# where it ran over $
|
|
38
|
+
# the end of the line, less the pixels it held for from HOLD_AT on,
|
|
39
|
+
# where it ran over $180-$187 a second time.
|
|
41
40
|
def self.xpos(pixel, width, hold)
|
|
42
41
|
count = (pixel - X_OFFSET) % width
|
|
43
|
-
|
|
44
|
-
return count - hold if count >= HOLD_AT + hold
|
|
45
|
-
|
|
46
|
-
HOLD_BASE + ((count - HOLD_AT) % 4)
|
|
42
|
+
count < HOLD_AT ? count : count - hold
|
|
47
43
|
end
|
|
48
44
|
|
|
49
45
|
# The raster pixels at which the X counter reads each coordinate, 512
|
data/lib/badline/vic/sprite.rb
CHANGED
|
@@ -37,8 +37,9 @@ module Badline
|
|
|
37
37
|
# The s-accesses reload the shift register partway through the line,
|
|
38
38
|
# at raster pixel 459 for sprite 0 and 16 later for each sprite after
|
|
39
39
|
# it. A sprite still shifting there loses the rest of its row, and the
|
|
40
|
-
# comparator is ignored for the twelve pixels from it
|
|
41
|
-
#
|
|
40
|
+
# comparator is ignored for the twelve pixels from it, running on into
|
|
41
|
+
# the next line from a reload near the end of this one (the spritescan
|
|
42
|
+
# dumps). Its output holds the last pixel for seven, through K+6
|
|
42
43
|
# (spritefetchbug).
|
|
43
44
|
RELOAD_X = 459
|
|
44
45
|
RELOAD_STEP = 16
|
|
@@ -275,7 +276,7 @@ module Badline
|
|
|
275
276
|
end
|
|
276
277
|
|
|
277
278
|
def sequence_hit(log, start, reload_bits)
|
|
278
|
-
return if (@stop_x && start >= @stop_x) || start < @show_from
|
|
279
|
+
return if (@stop_x && start >= @stop_x) || start < @show_from || start < @reload_x + RELOAD_DEAD - @width
|
|
279
280
|
|
|
280
281
|
if start < @reload_x
|
|
281
282
|
sequence_early(log, start)
|
data/lib/badline.rb
CHANGED
|
@@ -1,43 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "badline/
|
|
3
|
+
require "badline/core"
|
|
4
4
|
require "badline/options"
|
|
5
|
-
require "badline/
|
|
6
|
-
require "badline/region"
|
|
7
|
-
require "badline/addressable"
|
|
8
|
-
require "badline/memory"
|
|
9
|
-
require "badline/color_memory"
|
|
10
|
-
require "badline/rom"
|
|
11
|
-
require "badline/ram_expansion"
|
|
12
|
-
require "badline/address_bus"
|
|
13
|
-
require "badline/instruction"
|
|
14
|
-
require "badline/instruction_set"
|
|
15
|
-
require "badline/status"
|
|
16
|
-
require "badline/keyboard"
|
|
17
|
-
require "badline/joystick"
|
|
18
|
-
require "badline/control_ports"
|
|
19
|
-
require "badline/input"
|
|
20
|
-
require "badline/cycleable"
|
|
21
|
-
require "badline/datasette"
|
|
22
|
-
require "badline/time_of_day"
|
|
23
|
-
require "badline/cia"
|
|
24
|
-
require "badline/via"
|
|
25
|
-
require "badline/sid"
|
|
26
|
-
require "badline/debug_register"
|
|
27
|
-
require "badline/reu"
|
|
28
|
-
require "badline/interrupts"
|
|
29
|
-
require "badline/traps"
|
|
30
|
-
require "badline/cpu"
|
|
31
|
-
require "badline/vic"
|
|
32
|
-
require "badline/keyboard_buffer"
|
|
33
|
-
require "badline/iec_bus"
|
|
34
|
-
require "badline/drive1541"
|
|
35
|
-
require "badline/computer"
|
|
36
|
-
require "badline/checkpoint"
|
|
37
|
-
require "badline/storage"
|
|
38
|
-
require "badline/cartridge"
|
|
39
|
-
require "badline/kernal_trap"
|
|
40
|
-
require "badline/chrout_trap"
|
|
41
|
-
require "badline/media"
|
|
5
|
+
require "badline/data_path"
|
|
42
6
|
require "badline/snapshot"
|
|
43
7
|
require "badline/audio"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: badline
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Inge Jørgensen
|
|
@@ -50,6 +50,7 @@ files:
|
|
|
50
50
|
- lib/badline.rb
|
|
51
51
|
- lib/badline/address_bus.rb
|
|
52
52
|
- lib/badline/address_bus/extra_sids.rb
|
|
53
|
+
- lib/badline/address_bus/roms.rb
|
|
53
54
|
- lib/badline/address_bus/saved_state.rb
|
|
54
55
|
- lib/badline/address_bus/sid_slots.rb
|
|
55
56
|
- lib/badline/address_bus/ultimax_pages.rb
|
|
@@ -57,6 +58,7 @@ files:
|
|
|
57
58
|
- lib/badline/audio.rb
|
|
58
59
|
- lib/badline/audio/aiff.rb
|
|
59
60
|
- lib/badline/audio/bare_player.rb
|
|
61
|
+
- lib/badline/audio/checkpoints.rb
|
|
60
62
|
- lib/badline/audio/cli.rb
|
|
61
63
|
- lib/badline/audio/console.rb
|
|
62
64
|
- lib/badline/audio/jukebox.rb
|
|
@@ -108,6 +110,7 @@ files:
|
|
|
108
110
|
- lib/badline/computer/attachments.rb
|
|
109
111
|
- lib/badline/computer/saved_state.rb
|
|
110
112
|
- lib/badline/control_ports.rb
|
|
113
|
+
- lib/badline/core.rb
|
|
111
114
|
- lib/badline/cpu.rb
|
|
112
115
|
- lib/badline/cpu/addressing.rb
|
|
113
116
|
- lib/badline/cpu/boundary.rb
|
|
@@ -117,6 +120,7 @@ files:
|
|
|
117
120
|
- lib/badline/cpu/saved_state.rb
|
|
118
121
|
- lib/badline/cpu/stack_operations.rb
|
|
119
122
|
- lib/badline/cycleable.rb
|
|
123
|
+
- lib/badline/data_path.rb
|
|
120
124
|
- lib/badline/datasette.rb
|
|
121
125
|
- lib/badline/debug_register.rb
|
|
122
126
|
- lib/badline/drive1541.rb
|
|
@@ -154,6 +158,7 @@ files:
|
|
|
154
158
|
- lib/badline/frontend/menu_dialogs.rb
|
|
155
159
|
- lib/badline/frontend/menu_media.rb
|
|
156
160
|
- lib/badline/frontend/menu_pages.rb
|
|
161
|
+
- lib/badline/frontend/name_field.rb
|
|
157
162
|
- lib/badline/frontend/pacer.rb
|
|
158
163
|
- lib/badline/frontend/pad_port.rb
|
|
159
164
|
- lib/badline/frontend/painter.rb
|
|
@@ -208,10 +213,12 @@ files:
|
|
|
208
213
|
- lib/badline/keyboard.rb
|
|
209
214
|
- lib/badline/keyboard_buffer.rb
|
|
210
215
|
- lib/badline/media.rb
|
|
216
|
+
- lib/badline/media/disk_list.rb
|
|
211
217
|
- lib/badline/media/disk_set.rb
|
|
212
218
|
- lib/badline/media/queue.rb
|
|
213
219
|
- lib/badline/media/true_drive.rb
|
|
214
220
|
- lib/badline/memory.rb
|
|
221
|
+
- lib/badline/model.rb
|
|
215
222
|
- lib/badline/options.rb
|
|
216
223
|
- lib/badline/options/event.rb
|
|
217
224
|
- lib/badline/options/help.rb
|
|
@@ -238,6 +245,7 @@ files:
|
|
|
238
245
|
- lib/badline/roms/eapi/LICENSE.md
|
|
239
246
|
- lib/badline/roms/eapi/README
|
|
240
247
|
- lib/badline/roms/eapi/eapi-am29f040-14
|
|
248
|
+
- lib/badline/roms/kernal-sx64.rom
|
|
241
249
|
- lib/badline/roms/kernal.rom
|
|
242
250
|
- lib/badline/sdl.rb
|
|
243
251
|
- lib/badline/sid.rb
|
|
@@ -266,6 +274,7 @@ files:
|
|
|
266
274
|
- lib/badline/snapshot/vice/main_cpu.rb
|
|
267
275
|
- lib/badline/snapshot/vice/peripherals.rb
|
|
268
276
|
- lib/badline/snapshot/vice/restore.rb
|
|
277
|
+
- lib/badline/snapshot/vice/reu1764.rb
|
|
269
278
|
- lib/badline/snapshot/vice/sid_extended.rb
|
|
270
279
|
- lib/badline/snapshot/vice/sid_registers.rb
|
|
271
280
|
- lib/badline/snapshot/vice/vicii.rb
|