badline 0.12.1 → 0.14.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 +66 -1
- data/CLAUDE.md +86 -38
- data/CONTRIBUTING.md +4 -3
- data/README.md +9 -6
- data/doc/library.md +9 -9
- data/doc/media.md +2 -1
- data/doc/pinned-behaviour.md +134 -105
- data/doc/snapshot-format.md +1047 -0
- data/doc/snapshots.md +73 -43
- data/lib/badline/audio/bare_player.rb +53 -20
- data/lib/badline/audio/cli.rb +6 -6
- data/lib/badline/audio/jukebox.rb +2 -2
- data/lib/badline/audio/machine_player.rb +16 -10
- data/lib/badline/{media → audio}/queue.rb +1 -1
- data/lib/badline/audio/queued_tune.rb +6 -6
- data/lib/badline/audio/renderer.rb +33 -22
- data/lib/badline/audio/stereo.rb +1 -1
- data/lib/badline/c128/banks.rb +6 -3
- data/lib/badline/c128/bus/keyed_state.rb +45 -0
- data/lib/badline/c128/bus.rb +35 -20
- data/lib/badline/c128/color_lines.rb +2 -2
- data/lib/badline/c128/cpu.rb +1 -1
- data/lib/badline/c128/drives.rb +14 -34
- data/lib/badline/c128/fast_serial.rb +5 -5
- data/lib/badline/c128/keyed_modules.rb +117 -0
- data/lib/badline/c128/keyed_state.rb +91 -0
- data/lib/badline/c128/keys.rb +9 -0
- data/lib/badline/c128/mmu.rb +9 -8
- data/lib/badline/c128/mmu_pages.rb +21 -1
- data/lib/badline/c128/modes.rb +21 -11
- data/lib/badline/c128/z80.rb +2 -2
- data/lib/badline/c128/z80_turns.rb +1 -1
- data/lib/badline/c128.rb +21 -16
- data/lib/badline/c64/attachments.rb +42 -0
- data/lib/badline/c64/banked_ram/banking.rb +32 -0
- data/lib/badline/c64/banked_ram/plus256k.rb +64 -0
- data/lib/badline/c64/banked_ram/plus60k.rb +47 -0
- data/lib/badline/c64/banked_ram/unexpanded.rb +30 -0
- data/lib/badline/c64/banked_ram.rb +23 -0
- data/lib/badline/c64/bus/debug_register.rb +32 -0
- data/lib/badline/c64/bus/extra_sids.rb +32 -0
- data/lib/badline/c64/bus/fittings.rb +40 -0
- data/lib/badline/c64/bus/keyed_state.rb +41 -0
- data/lib/badline/c64/bus/pla.rb +149 -0
- data/lib/badline/c64/bus/roms.rb +41 -0
- data/lib/badline/c64/bus/sid_slots.rb +44 -0
- data/lib/badline/c64/bus.rb +219 -0
- data/lib/badline/c64/cartridge/action_replay.rb +115 -0
- data/lib/badline/c64/cartridge/atomic_power.rb +26 -0
- data/lib/badline/c64/cartridge/bank.rb +83 -0
- data/lib/badline/c64/cartridge/comal80.rb +52 -0
- data/lib/badline/c64/cartridge/dinamic.rb +36 -0
- data/lib/badline/c64/cartridge/easy_flash.rb +132 -0
- data/lib/badline/c64/cartridge/epyx_fastload.rb +73 -0
- data/lib/badline/c64/cartridge/final_cartridge3.rb +79 -0
- data/lib/badline/c64/cartridge/flash.rb +279 -0
- data/lib/badline/c64/cartridge/freezer.rb +35 -0
- data/lib/badline/c64/cartridge/fun_play.rb +40 -0
- data/lib/badline/c64/cartridge/g_mod2.rb +64 -0
- data/lib/badline/c64/cartridge/game_system.rb +42 -0
- data/lib/badline/c64/cartridge/geo_ram.rb +65 -0
- data/lib/badline/c64/cartridge/kcs_power.rb +69 -0
- data/lib/badline/c64/cartridge/keyed_state.rb +393 -0
- data/lib/badline/c64/cartridge/mach5.rb +34 -0
- data/lib/badline/c64/cartridge/magic_desk.rb +32 -0
- data/lib/badline/c64/cartridge/ocean.rb +37 -0
- data/lib/badline/c64/cartridge/pagefox.rb +60 -0
- data/lib/badline/c64/cartridge/retro_replay.rb +278 -0
- data/lib/badline/c64/cartridge/rex_utility.rb +31 -0
- data/lib/badline/c64/cartridge/rgcd.rb +50 -0
- data/lib/badline/c64/cartridge/simons_basic.rb +37 -0
- data/lib/badline/c64/cartridge/standard.rb +17 -0
- data/lib/badline/c64/cartridge/super_games.rb +40 -0
- data/lib/badline/c64/cartridge/westermann.rb +32 -0
- data/lib/badline/c64/cartridge/zaxxon.rb +52 -0
- data/lib/badline/c64/cartridge.rb +232 -0
- data/lib/badline/c64/color_memory.rb +27 -0
- data/lib/badline/{computer → c64}/common.rb +2 -2
- data/lib/badline/{computer → c64}/kernal_traps.rb +39 -36
- data/lib/badline/c64/keyed_modules.rb +111 -0
- data/lib/badline/c64/keyed_state.rb +68 -0
- data/lib/badline/c64/reu/dma.rb +271 -0
- data/lib/badline/c64/reu/keyed_state.rb +140 -0
- data/lib/badline/c64/reu/ram.rb +94 -0
- data/lib/badline/c64/reu/trigger.rb +34 -0
- data/lib/badline/c64/reu.rb +289 -0
- data/lib/badline/c64/true_drives.rb +120 -0
- data/lib/badline/{computer.rb → c64.rb} +24 -15
- data/lib/badline/chips/cia/fast_forward.rb +62 -0
- data/lib/badline/chips/cia/interrupt_register.rb +128 -0
- data/lib/badline/chips/cia/keyed_parts.rb +213 -0
- data/lib/badline/chips/cia/serial.rb +246 -0
- data/lib/badline/chips/cia/time_of_day.rb +210 -0
- data/lib/badline/chips/cia/timer.rb +188 -0
- data/lib/badline/chips/cia.rb +281 -0
- data/lib/badline/chips/cpu/addressing.rb +133 -0
- data/lib/badline/chips/cpu/boundary.rb +56 -0
- data/lib/badline/chips/cpu/core.rb +183 -0
- data/lib/badline/chips/cpu/instruction.rb +338 -0
- data/lib/badline/chips/cpu/instruction_set/arithmetic.rb +118 -0
- data/lib/badline/chips/cpu/instruction_set/bitwise.rb +130 -0
- data/lib/badline/chips/cpu/instruction_set/branch.rb +83 -0
- data/lib/badline/chips/cpu/instruction_set/flag.rb +67 -0
- data/lib/badline/chips/cpu/instruction_set/illegal.rb +274 -0
- data/lib/badline/chips/cpu/instruction_set/inc_dec.rb +73 -0
- data/lib/badline/chips/cpu/instruction_set/stack.rb +56 -0
- data/lib/badline/chips/cpu/instruction_set/transfer.rb +141 -0
- data/lib/badline/chips/cpu/instruction_set.rb +59 -0
- data/lib/badline/chips/cpu/interrupts.rb +108 -0
- data/lib/badline/chips/cpu/keyed_state.rb +177 -0
- data/lib/badline/chips/cpu/microcode.rb +195 -0
- data/lib/badline/chips/cpu/operations.rb +90 -0
- data/lib/badline/chips/cpu/port.rb +133 -0
- data/lib/badline/chips/cpu/stack_operations.rb +84 -0
- data/lib/badline/chips/cpu/traps.rb +23 -0
- data/lib/badline/chips/cpu.rb +17 -0
- data/lib/badline/chips/sid/catch_up.rb +122 -0
- data/lib/badline/chips/sid/decimator.rb +68 -0
- data/lib/badline/chips/sid/envelope.rb +236 -0
- data/lib/badline/chips/sid/filter.rb +227 -0
- data/lib/badline/chips/sid/keyed_parts.rb +286 -0
- data/lib/badline/chips/sid/voice.rb +69 -0
- data/lib/badline/chips/sid/waveform/combined.rb +128 -0
- data/lib/badline/chips/sid/waveform/fast_forward.rb +107 -0
- data/lib/badline/chips/sid/waveform/noise_writeback.rb +124 -0
- data/lib/badline/chips/sid/waveform.rb +305 -0
- data/lib/badline/chips/sid.rb +264 -0
- data/lib/badline/chips/ted/beam.rb +119 -0
- data/lib/badline/chips/ted/timers.rb +66 -0
- data/lib/badline/chips/ted.rb +143 -0
- data/lib/badline/chips/tia.rb +49 -0
- data/lib/badline/chips/vdc/keyed_parts.rb +105 -0
- data/lib/badline/{c128 → chips}/vdc/memory.rb +1 -1
- data/lib/badline/{c128 → chips}/vdc/painter.rb +1 -13
- data/lib/badline/{c128 → chips}/vdc/raster.rb +1 -17
- data/lib/badline/{c128 → chips}/vdc/window.rb +1 -10
- data/lib/badline/{c128 → chips}/vdc.rb +6 -31
- data/lib/badline/chips/via/control_lines.rb +109 -0
- data/lib/badline/chips/via/fast_forward.rb +55 -0
- data/lib/badline/chips/via/interrupt_register.rb +60 -0
- data/lib/badline/chips/via/keyed_parts.rb +163 -0
- data/lib/badline/chips/via/shift_register.rb +168 -0
- data/lib/badline/chips/via/timer1.rb +120 -0
- data/lib/badline/chips/via/timer2.rb +117 -0
- data/lib/badline/chips/via.rb +267 -0
- data/lib/badline/chips/vic/bank.rb +135 -0
- data/lib/badline/chips/vic/border_mask.rb +78 -0
- data/lib/badline/chips/vic/collisions.rb +106 -0
- data/lib/badline/chips/vic/color_patches.rb +38 -0
- data/lib/badline/chips/vic/display_state.rb +168 -0
- data/lib/badline/chips/vic/graphics_mode.rb +166 -0
- data/lib/badline/chips/vic/graphics_shifter.rb +183 -0
- data/lib/badline/chips/vic/keyed_parts.rb +228 -0
- data/lib/badline/chips/vic/keyed_sprites.rb +225 -0
- data/lib/badline/chips/vic/keyed_state.rb +102 -0
- data/lib/badline/chips/vic/register_log.rb +65 -0
- data/lib/badline/chips/vic/registers.rb +188 -0
- data/lib/badline/chips/vic/sequencer.rb +275 -0
- data/lib/badline/chips/vic/sequencer_output.rb +118 -0
- data/lib/badline/chips/vic/sprite/internal_bus.rb +59 -0
- data/lib/badline/chips/vic/sprite/shifter.rb +148 -0
- data/lib/badline/chips/vic/sprite/timing.rb +58 -0
- data/lib/badline/chips/vic/sprite.rb +337 -0
- data/lib/badline/chips/vic/sprites.rb +281 -0
- data/lib/badline/chips/vic.rb +787 -0
- data/lib/badline/chips/vic_i/keyed_parts.rb +142 -0
- data/lib/badline/{vic20/vic → chips/vic_i}/painter.rb +2 -30
- data/lib/badline/chips/vic_i/sound/output.rb +85 -0
- data/lib/badline/chips/vic_i/sound.rb +227 -0
- data/lib/badline/{vic20/vic → chips/vic_i}/text_window.rb +2 -2
- data/lib/badline/{vic20/vic.rb → chips/vic_i.rb} +6 -6
- data/lib/badline/chips/z80/arithmetic.rb +119 -0
- data/lib/badline/chips/z80/bit_page.rb +57 -0
- data/lib/badline/chips/z80/block_io.rb +60 -0
- data/lib/badline/chips/z80/block_transfers.rb +61 -0
- data/lib/badline/chips/z80/bus_cycles.rb +113 -0
- data/lib/badline/chips/z80/core.rb +115 -0
- data/lib/badline/chips/z80/exchanges.rb +52 -0
- data/lib/badline/chips/z80/extended_page.rb +91 -0
- data/lib/badline/chips/z80/flags.rb +39 -0
- data/lib/badline/chips/z80/interrupt_acceptance.rb +48 -0
- data/lib/badline/chips/z80/jumps.rb +84 -0
- data/lib/badline/chips/z80/keyed_state.rb +73 -0
- data/lib/badline/chips/z80/loads.rb +100 -0
- data/lib/badline/chips/z80/main_page.rb +136 -0
- data/lib/badline/chips/z80/registers.rb +122 -0
- data/lib/badline/chips/z80/shifts.rb +66 -0
- data/lib/badline/chips/z80.rb +13 -0
- data/lib/badline/chips.rb +10 -0
- data/lib/badline/core.rb +13 -32
- data/lib/badline/drives/datasette/keyed_state.rb +38 -0
- data/lib/badline/drives/datasette.rb +173 -0
- data/lib/badline/drives/engine/core.rb +152 -0
- data/lib/badline/drives/engine/fast_serial.rb +75 -0
- data/lib/badline/drives/engine/idle.rb +127 -0
- data/lib/badline/drives/engine/idle_cpu.rb +30 -0
- data/lib/badline/drives/engine/orbit.rb +81 -0
- data/lib/badline/drives/engine/serial_lines.rb +72 -0
- data/lib/badline/drives/engine/sleep.rb +114 -0
- data/lib/badline/drives/engine/vias.rb +86 -0
- data/lib/badline/drives/engine/watch.rb +152 -0
- data/lib/badline/drives/engine.rb +11 -0
- data/lib/badline/drives/model1541/bus.rb +75 -0
- data/lib/badline/drives/model1541/byte_ready.rb +50 -0
- data/lib/badline/drives/model1541/cpu.rb +13 -0
- data/lib/badline/drives/model1541/disk.rb +318 -0
- data/lib/badline/drives/model1541/disk_via.rb +38 -0
- data/lib/badline/drives/model1541/gcr.rb +59 -0
- data/lib/badline/drives/model1541/keyed_state.rb +251 -0
- data/lib/badline/drives/model1541/mechanism.rb +313 -0
- data/lib/badline/drives/model1541/rotation.rb +123 -0
- data/lib/badline/drives/model1541/sector_reader.rb +78 -0
- data/lib/badline/drives/model1541/serial_port.rb +20 -0
- data/lib/badline/drives/model1541/track.rb +100 -0
- data/lib/badline/drives/model1541.rb +80 -0
- data/lib/badline/drives/model1571/bus.rb +100 -0
- data/lib/badline/drives/model1571/cpu.rb +13 -0
- data/lib/badline/drives/model1571/keyed_state.rb +108 -0
- data/lib/badline/drives/model1571/serial_port.rb +39 -0
- data/lib/badline/drives/model1571/serial_via.rb +27 -0
- data/lib/badline/drives/model1571/wd1770.rb +108 -0
- data/lib/badline/drives/model1571.rb +141 -0
- data/lib/badline/drives/model1581/bus.rb +126 -0
- data/lib/badline/drives/model1581/cpu.rb +13 -0
- data/lib/badline/drives/model1581/disk.rb +133 -0
- data/lib/badline/drives/model1581/keyed_state.rb +280 -0
- data/lib/badline/drives/model1581/mechanism.rb +98 -0
- data/lib/badline/drives/model1581/serial_port.rb +54 -0
- data/lib/badline/drives/model1581/slot.rb +61 -0
- data/lib/badline/drives/model1581/track.rb +102 -0
- data/lib/badline/drives/model1581/track_bytes.rb +77 -0
- data/lib/badline/drives/model1581/wd1772/registers.rb +91 -0
- data/lib/badline/drives/model1581/wd1772/sector_writes.rb +75 -0
- data/lib/badline/drives/model1581/wd1772/sectors.rb +152 -0
- data/lib/badline/drives/model1581/wd1772/stepping.rb +111 -0
- data/lib/badline/drives/model1581/wd1772/tracks.rb +127 -0
- data/lib/badline/drives/model1581/wd1772/turn.rb +75 -0
- data/lib/badline/drives/model1581/wd1772.rb +216 -0
- data/lib/badline/drives/model1581.rb +206 -0
- data/lib/badline/drives/serial_bus.rb +161 -0
- data/lib/badline/drives.rb +8 -0
- data/lib/badline/frontend/app.rb +3 -3
- data/lib/badline/frontend/boot.rb +4 -4
- data/lib/badline/frontend/controls.rb +19 -3
- data/lib/badline/frontend/drive_led.rb +44 -21
- data/lib/badline/frontend/machine_window.rb +3 -1
- data/lib/badline/frontend/menu/menu_dialogs.rb +2 -2
- data/lib/badline/frontend/player/filter_view.rb +1 -1
- data/lib/badline/frontend/player/player_controller.rb +2 -2
- data/lib/badline/frontend/player/player_screen.rb +1 -0
- data/lib/badline/frontend/player/theme.rb +7 -7
- data/lib/badline/frontend/snapshots.rb +12 -1
- data/lib/badline/frontend/timeline.rb +30 -12
- data/lib/badline/input/control_ports.rb +78 -0
- data/lib/badline/input/joystick.rb +27 -0
- data/lib/badline/input/keyboard.rb +114 -0
- data/lib/badline/input/matrix_typist.rb +98 -0
- data/lib/badline/input.rb +4 -0
- data/lib/badline/kernal_trap/chrout.rb +45 -0
- data/lib/badline/kernal_trap/{drive → dos}/block_commands.rb +1 -1
- data/lib/badline/kernal_trap/dos/channel.rb +156 -0
- data/lib/badline/kernal_trap/{drive → dos}/channels.rb +1 -26
- data/lib/badline/kernal_trap/{drive → dos}/memory.rb +1 -10
- data/lib/badline/kernal_trap/{drive → dos}/parameters.rb +1 -1
- data/lib/badline/kernal_trap/{drive → dos}/status.rb +1 -9
- data/lib/badline/kernal_trap/{drive → dos}/write_file.rb +1 -19
- data/lib/badline/kernal_trap/{drive → dos}/writes.rb +1 -1
- data/lib/badline/kernal_trap/{drive.rb → dos.rb} +9 -27
- data/lib/badline/kernal_trap/file_routine.rb +4 -4
- data/lib/badline/kernal_trap/keyed_state.rb +150 -0
- data/lib/badline/kernal_trap/layout.rb +75 -11
- data/lib/badline/kernal_trap/load.rb +19 -21
- data/lib/badline/kernal_trap/routine.rb +12 -0
- data/lib/badline/kernal_trap/save.rb +12 -22
- data/lib/badline/kernal_trap/serial.rb +8 -24
- data/lib/badline/kernal_trap.rb +3 -2
- data/lib/badline/machine/clocking.rb +1 -1
- data/lib/badline/machine/keyboard_buffer.rb +49 -0
- data/lib/badline/machine/settling.rb +29 -0
- data/lib/badline/machine.rb +10 -7
- data/lib/badline/media/boot_disk.rb +14 -2
- data/lib/badline/media/extensions.rb +10 -0
- data/lib/badline/media/true_drive.rb +1 -1
- data/lib/badline/media/tune.rb +2 -2
- data/lib/badline/media.rb +3 -3
- data/lib/badline/memory.rb +3 -6
- data/lib/badline/model.rb +1 -1
- data/lib/badline/options/family.rb +5 -2
- data/lib/badline/options/help.rb +42 -16
- data/lib/badline/options/table.rb +2 -0
- data/lib/badline/options/validation.rb +2 -0
- data/lib/badline/options.rb +6 -1
- data/lib/badline/plus4/acia.rb +45 -0
- data/lib/badline/plus4/bus.rb +312 -0
- data/lib/badline/plus4/cpu.rb +10 -0
- data/lib/badline/plus4/cpu_port.rb +93 -0
- data/lib/badline/plus4/keyboard_port.rb +51 -0
- data/lib/badline/plus4/model.rb +38 -0
- data/lib/badline/plus4/user_port.rb +31 -0
- data/lib/badline/plus4.rb +164 -0
- data/lib/badline/roms/README +44 -6
- data/lib/badline/roms/plus4/basic.rom +0 -0
- data/lib/badline/roms/plus4/function-high.rom +0 -0
- data/lib/badline/roms/plus4/function-low.rom +0 -0
- data/lib/badline/roms/plus4/kernal-ntsc.rom +0 -0
- data/lib/badline/roms/plus4/kernal-pal.rom +0 -0
- data/lib/badline/sdl.rb +1 -0
- data/lib/badline/{storage/sid_file.rb → sid_tune/file.rb} +3 -3
- data/lib/badline/{storage → sid_tune}/hvsc.rb +7 -7
- data/lib/badline/{storage → sid_tune}/song_lengths.rb +2 -2
- data/lib/badline/{storage → sid_tune}/stil/credit.rb +1 -1
- data/lib/badline/{storage → sid_tune}/stil.rb +3 -3
- data/lib/badline/sid_tune.rb +6 -0
- data/lib/badline/snapshot/c128_setup.rb +32 -0
- data/lib/badline/snapshot/c64_setup.rb +83 -0
- data/lib/badline/snapshot/container.rb +4 -0
- data/lib/badline/snapshot/field_doc/markdown.rb +112 -0
- data/lib/badline/snapshot/field_doc.rb +109 -0
- data/lib/badline/snapshot/image.rb +132 -46
- data/lib/badline/snapshot/keyed/cursor.rb +40 -0
- data/lib/badline/snapshot/keyed/modules.rb +66 -0
- data/lib/badline/snapshot/keyed/reader.rb +188 -0
- data/lib/badline/snapshot/keyed/recorder.rb +88 -0
- data/lib/badline/snapshot/keyed/report.rb +26 -0
- data/lib/badline/snapshot/keyed/writer.rb +55 -0
- data/lib/badline/snapshot/keyed.rb +64 -0
- data/lib/badline/snapshot/machine_state.rb +17 -64
- data/lib/badline/snapshot/storage_setup.rb +63 -0
- data/lib/badline/snapshot/vic20_setup.rb +28 -0
- data/lib/badline/snapshot/vice/c64_mem.rb +1 -1
- data/lib/badline/snapshot/vice/restore.rb +1 -1
- data/lib/badline/snapshot/vice/reu1764.rb +3 -3
- data/lib/badline/snapshot/vice/reu_fields.rb +40 -0
- data/lib/badline/snapshot/vice.rb +13 -35
- data/lib/badline/snapshot.rb +44 -22
- data/lib/badline/storage/crt_file.rb +3 -1
- data/lib/badline/storage/d64_image.rb +0 -2
- data/lib/badline/storage/d71_image.rb +0 -2
- data/lib/badline/storage/d81_image.rb +0 -2
- data/lib/badline/storage/disk_image.rb +3 -6
- data/lib/badline/storage/g64_image.rb +10 -5
- data/lib/badline/storage/host_directory.rb +0 -5
- data/lib/badline/storage/t64.rb +2 -8
- data/lib/badline/storage/tap.rb +43 -15
- data/lib/badline/storage/unavailable.rb +1 -1
- data/lib/badline/storage.rb +0 -37
- data/lib/badline/support/c128_checkpoint.rb +39 -0
- data/lib/badline/support/checkpoint.rb +108 -0
- data/lib/badline/support/vic20_checkpoint.rb +38 -0
- data/lib/badline/support.rb +5 -0
- data/lib/badline/version.rb +1 -1
- data/lib/badline/vic20/attachments.rb +8 -5
- data/lib/badline/vic20/bus/keyed_state.rb +52 -0
- data/lib/badline/vic20/bus.rb +2 -25
- data/lib/badline/vic20/cpu.rb +1 -1
- data/lib/badline/vic20/keyed_modules.rb +73 -0
- data/lib/badline/vic20/keyed_state.rb +45 -0
- data/lib/badline/vic20/port_wiring.rb +4 -4
- data/lib/badline/vic20/user_via_ports.rb +2 -2
- data/lib/badline/vic20.rb +22 -17
- data/lib/badline.rb +1 -0
- metadata +271 -228
- data/lib/badline/address_bus/extra_sids.rb +0 -30
- data/lib/badline/address_bus/fittings.rb +0 -38
- data/lib/badline/address_bus/pla.rb +0 -147
- data/lib/badline/address_bus/roms.rb +0 -39
- data/lib/badline/address_bus/saved_state.rb +0 -66
- data/lib/badline/address_bus/sid_slots.rb +0 -42
- data/lib/badline/address_bus.rb +0 -216
- data/lib/badline/c128/bus_state.rb +0 -53
- data/lib/badline/c128/saved_state.rb +0 -143
- data/lib/badline/cartridge/action_replay.rb +0 -126
- data/lib/badline/cartridge/atomic_power.rb +0 -24
- data/lib/badline/cartridge/bank.rb +0 -81
- data/lib/badline/cartridge/comal80.rb +0 -50
- data/lib/badline/cartridge/dinamic.rb +0 -34
- data/lib/badline/cartridge/easy_flash.rb +0 -145
- data/lib/badline/cartridge/epyx_fastload.rb +0 -79
- data/lib/badline/cartridge/final_cartridge3.rb +0 -89
- data/lib/badline/cartridge/flash.rb +0 -306
- data/lib/badline/cartridge/freezer.rb +0 -33
- data/lib/badline/cartridge/fun_play.rb +0 -38
- data/lib/badline/cartridge/g_mod2.rb +0 -74
- data/lib/badline/cartridge/game_system.rb +0 -40
- data/lib/badline/cartridge/geo_ram.rb +0 -79
- data/lib/badline/cartridge/kcs_power.rb +0 -75
- data/lib/badline/cartridge/mach5.rb +0 -32
- data/lib/badline/cartridge/magic_desk.rb +0 -30
- data/lib/badline/cartridge/ocean.rb +0 -35
- data/lib/badline/cartridge/pagefox.rb +0 -68
- data/lib/badline/cartridge/retro_replay.rb +0 -320
- data/lib/badline/cartridge/rex_utility.rb +0 -29
- data/lib/badline/cartridge/rgcd.rb +0 -58
- data/lib/badline/cartridge/simons_basic.rb +0 -35
- data/lib/badline/cartridge/standard.rb +0 -15
- data/lib/badline/cartridge/super_games.rb +0 -48
- data/lib/badline/cartridge/westermann.rb +0 -30
- data/lib/badline/cartridge/zaxxon.rb +0 -66
- data/lib/badline/cartridge.rb +0 -303
- data/lib/badline/checkpoint.rb +0 -98
- data/lib/badline/chrout_trap.rb +0 -43
- data/lib/badline/cia/fast_forward.rb +0 -60
- data/lib/badline/cia/interrupt_register.rb +0 -143
- data/lib/badline/cia/serial.rb +0 -275
- data/lib/badline/cia/state.rb +0 -47
- data/lib/badline/cia/timer.rb +0 -206
- data/lib/badline/cia.rb +0 -279
- data/lib/badline/color_memory.rb +0 -25
- data/lib/badline/computer/attachments.rb +0 -88
- data/lib/badline/computer/saved_state.rb +0 -117
- data/lib/badline/computer/true_drives.rb +0 -69
- data/lib/badline/control_ports.rb +0 -76
- data/lib/badline/cpu/addressing.rb +0 -131
- data/lib/badline/cpu/boundary.rb +0 -54
- data/lib/badline/cpu/core.rb +0 -165
- data/lib/badline/cpu/microcode.rb +0 -177
- data/lib/badline/cpu/operations.rb +0 -88
- data/lib/badline/cpu/saved_state.rb +0 -115
- data/lib/badline/cpu/stack_operations.rb +0 -82
- data/lib/badline/cpu.rb +0 -10
- data/lib/badline/cpu_port.rb +0 -112
- data/lib/badline/datasette.rb +0 -161
- data/lib/badline/debug_register.rb +0 -28
- data/lib/badline/drive/core.rb +0 -147
- data/lib/badline/drive/fast_serial.rb +0 -73
- data/lib/badline/drive/idle.rb +0 -125
- data/lib/badline/drive/idle_cpu.rb +0 -28
- data/lib/badline/drive/orbit.rb +0 -79
- data/lib/badline/drive/serial_lines.rb +0 -73
- data/lib/badline/drive/sleep.rb +0 -112
- data/lib/badline/drive/vias.rb +0 -84
- data/lib/badline/drive/watch.rb +0 -150
- data/lib/badline/drive.rb +0 -11
- data/lib/badline/drive1541/bus.rb +0 -86
- data/lib/badline/drive1541/byte_ready.rb +0 -48
- data/lib/badline/drive1541/cpu.rb +0 -11
- data/lib/badline/drive1541/disk.rb +0 -315
- data/lib/badline/drive1541/disk_state.rb +0 -86
- data/lib/badline/drive1541/disk_via.rb +0 -36
- data/lib/badline/drive1541/gcr.rb +0 -57
- data/lib/badline/drive1541/mechanism.rb +0 -313
- data/lib/badline/drive1541/mechanism_state.rb +0 -68
- data/lib/badline/drive1541/rotation.rb +0 -121
- data/lib/badline/drive1541/sector_reader.rb +0 -76
- data/lib/badline/drive1541/serial_port.rb +0 -18
- data/lib/badline/drive1541/track.rb +0 -98
- data/lib/badline/drive1541.rb +0 -111
- data/lib/badline/drive1571/bus.rb +0 -111
- data/lib/badline/drive1571/cpu.rb +0 -11
- data/lib/badline/drive1571/serial_port.rb +0 -37
- data/lib/badline/drive1571/serial_via.rb +0 -25
- data/lib/badline/drive1571/wd1770.rb +0 -120
- data/lib/badline/drive1571.rb +0 -175
- data/lib/badline/drive1581/bus.rb +0 -137
- data/lib/badline/drive1581/cpu.rb +0 -11
- data/lib/badline/drive1581/disk.rb +0 -135
- data/lib/badline/drive1581/disk_state.rb +0 -87
- data/lib/badline/drive1581/mechanism.rb +0 -117
- data/lib/badline/drive1581/serial_port.rb +0 -52
- data/lib/badline/drive1581/slot.rb +0 -78
- data/lib/badline/drive1581/track.rb +0 -100
- data/lib/badline/drive1581/track_bytes.rb +0 -75
- data/lib/badline/drive1581/wd1772/registers.rb +0 -89
- data/lib/badline/drive1581/wd1772/sector_writes.rb +0 -73
- data/lib/badline/drive1581/wd1772/sectors.rb +0 -150
- data/lib/badline/drive1581/wd1772/state.rb +0 -66
- data/lib/badline/drive1581/wd1772/stepping.rb +0 -109
- data/lib/badline/drive1581/wd1772/tracks.rb +0 -125
- data/lib/badline/drive1581/wd1772/turn.rb +0 -73
- data/lib/badline/drive1581/wd1772.rb +0 -216
- data/lib/badline/drive1581.rb +0 -233
- data/lib/badline/iec_bus.rb +0 -159
- data/lib/badline/instruction.rb +0 -334
- data/lib/badline/instruction_set/arithmetic.rb +0 -114
- data/lib/badline/instruction_set/bitwise.rb +0 -126
- data/lib/badline/instruction_set/branch.rb +0 -79
- data/lib/badline/instruction_set/flag.rb +0 -63
- data/lib/badline/instruction_set/illegal.rb +0 -270
- data/lib/badline/instruction_set/inc_dec.rb +0 -69
- data/lib/badline/instruction_set/stack.rb +0 -52
- data/lib/badline/instruction_set/transfer.rb +0 -137
- data/lib/badline/instruction_set.rb +0 -55
- data/lib/badline/interrupts.rb +0 -104
- data/lib/badline/joystick.rb +0 -25
- data/lib/badline/kernal_trap/channel.rb +0 -181
- data/lib/badline/keyboard.rb +0 -112
- data/lib/badline/keyboard_buffer.rb +0 -33
- data/lib/badline/ram_expansion/banking.rb +0 -30
- data/lib/badline/ram_expansion/plus256k.rb +0 -54
- data/lib/badline/ram_expansion/plus60k.rb +0 -43
- data/lib/badline/ram_expansion/unexpanded.rb +0 -28
- data/lib/badline/ram_expansion.rb +0 -21
- data/lib/badline/reu/dma/saved_state.rb +0 -50
- data/lib/badline/reu/dma.rb +0 -273
- data/lib/badline/reu/ram.rb +0 -107
- data/lib/badline/reu/saved_state.rb +0 -80
- data/lib/badline/reu/trigger.rb +0 -32
- data/lib/badline/reu.rb +0 -289
- data/lib/badline/sid/catch_up.rb +0 -120
- data/lib/badline/sid/decimator.rb +0 -64
- data/lib/badline/sid/envelope/state.rb +0 -68
- data/lib/badline/sid/envelope.rb +0 -239
- data/lib/badline/sid/filter.rb +0 -263
- data/lib/badline/sid/voice.rb +0 -77
- data/lib/badline/sid/waveform/combined.rb +0 -126
- data/lib/badline/sid/waveform/fast_forward.rb +0 -105
- data/lib/badline/sid/waveform/noise_writeback.rb +0 -122
- data/lib/badline/sid/waveform/state.rb +0 -66
- data/lib/badline/sid/waveform.rb +0 -305
- data/lib/badline/sid.rb +0 -303
- data/lib/badline/snapshot/setup.rb +0 -75
- data/lib/badline/snapshot/state.rb +0 -189
- data/lib/badline/time_of_day.rb +0 -228
- data/lib/badline/traps.rb +0 -19
- data/lib/badline/via/control_lines.rb +0 -122
- data/lib/badline/via/fast_forward.rb +0 -53
- data/lib/badline/via/interrupt_register.rb +0 -67
- data/lib/badline/via/shift_register.rb +0 -180
- data/lib/badline/via/state.rb +0 -42
- data/lib/badline/via/timer1.rb +0 -131
- data/lib/badline/via/timer2.rb +0 -133
- data/lib/badline/via.rb +0 -266
- data/lib/badline/vic/bank.rb +0 -133
- data/lib/badline/vic/border_mask.rb +0 -86
- data/lib/badline/vic/collisions.rb +0 -115
- data/lib/badline/vic/color_patches.rb +0 -47
- data/lib/badline/vic/display_state.rb +0 -185
- data/lib/badline/vic/graphics_mode.rb +0 -164
- data/lib/badline/vic/graphics_shifter.rb +0 -207
- data/lib/badline/vic/register_log.rb +0 -81
- data/lib/badline/vic/registers.rb +0 -195
- data/lib/badline/vic/sequencer.rb +0 -275
- data/lib/badline/vic/sequencer_output.rb +0 -116
- data/lib/badline/vic/sequencer_state.rb +0 -89
- data/lib/badline/vic/sprite/internal_bus.rb +0 -68
- data/lib/badline/vic/sprite/saved_state.rb +0 -64
- data/lib/badline/vic/sprite/shifter.rb +0 -146
- data/lib/badline/vic/sprite/timing.rb +0 -56
- data/lib/badline/vic/sprite.rb +0 -337
- data/lib/badline/vic/sprites.rb +0 -282
- data/lib/badline/vic/sprites_state.rb +0 -57
- data/lib/badline/vic.rb +0 -853
- data/lib/badline/vic20/saved_state.rb +0 -124
- data/lib/badline/vic20/sound/output.rb +0 -83
- data/lib/badline/vic20/sound.rb +0 -233
- data/lib/badline/vic20/vic/saved_state.rb +0 -55
- data/lib/badline/z80/arithmetic.rb +0 -117
- data/lib/badline/z80/bit_page.rb +0 -55
- data/lib/badline/z80/block_io.rb +0 -58
- data/lib/badline/z80/block_transfers.rb +0 -59
- data/lib/badline/z80/bus_cycles.rb +0 -111
- data/lib/badline/z80/core.rb +0 -113
- data/lib/badline/z80/exchanges.rb +0 -50
- data/lib/badline/z80/extended_page.rb +0 -89
- data/lib/badline/z80/flags.rb +0 -37
- data/lib/badline/z80/interrupt_acceptance.rb +0 -46
- data/lib/badline/z80/jumps.rb +0 -82
- data/lib/badline/z80/loads.rb +0 -98
- data/lib/badline/z80/main_page.rb +0 -134
- data/lib/badline/z80/registers.rb +0 -120
- data/lib/badline/z80/saved_state.rb +0 -69
- data/lib/badline/z80/shifts.rb +0 -64
- data/lib/badline/z80.rb +0 -11
- /data/lib/badline/snapshot/{fields.rb → vice/fields.rb} +0 -0
data/doc/pinned-behaviour.md
CHANGED
|
@@ -38,6 +38,7 @@ only catches the rows that happen to move.
|
|
|
38
38
|
- [VIC-20 RAM power-on pattern](#vic-20-ram-power-on-pattern)
|
|
39
39
|
- [VIC-I fetches and the V-bus](#vic-i-fetches-and-the-v-bus)
|
|
40
40
|
- [VIC-I sound](#vic-i-sound)
|
|
41
|
+
- [TED beam and the 7501 port](#ted-beam-and-the-7501-port)
|
|
41
42
|
- [1541 serial port](#1541-serial-port)
|
|
42
43
|
- [1541 disk mechanism](#1541-disk-mechanism)
|
|
43
44
|
- [REU DMA](#reu-dma)
|
|
@@ -86,9 +87,9 @@ only catches the rows that happen to move.
|
|
|
86
87
|
offset 106). Consuming `@skip_poll` in the stall breaks test 5.
|
|
87
88
|
- Pinned by `interrupts/irqdma` (all 16 rows) and Lorenz `irq` and `nmi`.
|
|
88
89
|
- Spec guard: *interrupts sampled while stalled by the VIC* in
|
|
89
|
-
[`cpu_spec.rb`](../spec/badline/cpu_spec.rb), one example per piece.
|
|
90
|
+
[`cpu_spec.rb`](../spec/badline/chips/cpu_spec.rb), one example per piece.
|
|
90
91
|
- Spec guard: the *interrupt recognition timing* group in
|
|
91
|
-
[`cpu_spec.rb`](../spec/badline/cpu_spec.rb), one example per quirk.
|
|
92
|
+
[`cpu_spec.rb`](../spec/badline/chips/cpu_spec.rb), one example per quirk.
|
|
92
93
|
|
|
93
94
|
## CPU JAM
|
|
94
95
|
|
|
@@ -97,12 +98,12 @@ only catches the rows that happen to move.
|
|
|
97
98
|
boundary, so a pending IRQ or NMI is never taken.
|
|
98
99
|
- Pinned by `CPU/cpujam` (the halt) and `jamirq`/`jamnmi`.
|
|
99
100
|
- Spec guard: the *JAM* group in
|
|
100
|
-
[`cpu_spec.rb`](../spec/badline/cpu_spec.rb).
|
|
101
|
+
[`cpu_spec.rb`](../spec/badline/chips/cpu_spec.rb).
|
|
101
102
|
|
|
102
103
|
## CPU unstable stores under DMA
|
|
103
104
|
|
|
104
105
|
- A cycle the VIC holds the CPU through BA is not a CPU cycle.
|
|
105
|
-
`
|
|
106
|
+
`C64#cycle!` calls `CPU#stall!` instead of `CPU#cycle!`, which
|
|
106
107
|
records `@cycles`. The interrupt pipeline's `pending` stage doesn't
|
|
107
108
|
advance, but the line sample does (see *CPU interrupt recognition*).
|
|
108
109
|
- SHA, SHX, SHY and SHS/TAS drop the `& (H+1)` from the stored value when
|
|
@@ -120,7 +121,7 @@ only catches the rows that happen to move.
|
|
|
120
121
|
need sprite BA at `54 + 2n`, and the `*4`/`*5` variants (sprite and
|
|
121
122
|
character DMA) also need the bad-line and sprite-DMA-end BA to match.
|
|
122
123
|
- Spec guard: *SHX stalled by the VIC* in
|
|
123
|
-
[`cpu_spec.rb`](../spec/badline/cpu_spec.rb).
|
|
124
|
+
[`cpu_spec.rb`](../spec/badline/chips/cpu_spec.rb).
|
|
124
125
|
|
|
125
126
|
## CPU ANE constant
|
|
126
127
|
|
|
@@ -135,7 +136,7 @@ only catches the rows that happen to move.
|
|
|
135
136
|
- SingleStepTests recorded an NMOS 6502 whose constant is `$EE`, so
|
|
136
137
|
`test/test_cpu.rb` builds its CPU with `ane_constant: 0xee` and checks
|
|
137
138
|
`$8B` as strictly as every other opcode.
|
|
138
|
-
- Spec guard: *ANE* in [`cpu_spec.rb`](../spec/badline/cpu_spec.rb).
|
|
139
|
+
- Spec guard: *ANE* in [`cpu_spec.rb`](../spec/badline/chips/cpu_spec.rb).
|
|
139
140
|
|
|
140
141
|
## VIC raster IRQ phase
|
|
141
142
|
|
|
@@ -150,7 +151,7 @@ only catches the rows that happen to move.
|
|
|
150
151
|
[CPU interrupt recognition](#cpu-interrupt-recognition), so recalibrate
|
|
151
152
|
the two together.
|
|
152
153
|
- Spec guard: *with the compare at the line wrap* and *with line 0 as the
|
|
153
|
-
target* in [`vic_spec.rb`](../spec/badline/vic_spec.rb). They are the
|
|
154
|
+
target* in [`vic_spec.rb`](../spec/badline/chips/vic_spec.rb). They are the
|
|
154
155
|
only examples that separate this phase from a uniform column-0 compare.
|
|
155
156
|
- `$d011` bit 7 and `$d012` follow the same phase. Every line reads as the
|
|
156
157
|
new line from the CPU cycle paired with column 62 of the old one. Line 0
|
|
@@ -161,7 +162,7 @@ only catches the rows that happen to move.
|
|
|
161
162
|
reads `$1b`/`$00` where the chip reads `$9b`/`$37`, and the test exits
|
|
162
163
|
`$ff`.
|
|
163
164
|
- Spec guard: *when the counter wraps to line 0* in
|
|
164
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
165
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
165
166
|
- The compare latches the flag only on a change from no match to match,
|
|
166
167
|
and it runs again after every `$d011`/`$d012` write as well as at each
|
|
167
168
|
line step (VICE x64sc compares in every cycle). A write after column 61
|
|
@@ -177,7 +178,7 @@ only catches the rows that happen to move.
|
|
|
177
178
|
pass when a write only updates the match state.
|
|
178
179
|
- Spec guard: *with the target stepped along with the raster line* and
|
|
179
180
|
*when a write moves the target onto the current line* in
|
|
180
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
181
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
181
182
|
|
|
182
183
|
## VIC mid-line register visibility
|
|
183
184
|
|
|
@@ -199,13 +200,13 @@ only catches the rows that happen to move.
|
|
|
199
200
|
later. The old delays were 8 px of that phase error on top of the real
|
|
200
201
|
delay.
|
|
201
202
|
- Spec guard: *mid-line write delays* in
|
|
202
|
-
[`vic/sprites_spec.rb`](../spec/badline/vic/sprites_spec.rb), one example
|
|
203
|
+
[`vic/sprites_spec.rb`](../spec/badline/chips/vic/sprites_spec.rb), one example
|
|
203
204
|
per path, each failing on a one-pixel change.
|
|
204
205
|
- $d020–$d024 writes become visible 1 px into the next column.
|
|
205
206
|
`ColorPatches` restores the boundary pixel at `finish_line`.
|
|
206
207
|
- Pinned by `greydot`.
|
|
207
208
|
- Spec guard:
|
|
208
|
-
[`vic/color_patches_spec.rb`](../spec/badline/vic/color_patches_spec.rb).
|
|
209
|
+
[`vic/color_patches_spec.rb`](../spec/badline/chips/vic/color_patches_spec.rb).
|
|
209
210
|
- `apply_border` restores a pre-composite snapshot (`BorderMask`) instead of
|
|
210
211
|
repainting with the end-of-line $d020, so mid-line border splits survive
|
|
211
212
|
sprite compositing.
|
|
@@ -238,14 +239,14 @@ only catches the rows that happen to move.
|
|
|
238
239
|
DMA*: on their line 51, a bad line meets the head of the sprite 3
|
|
239
240
|
window, and the CPU gets 9 cycles between the two.
|
|
240
241
|
- Spec guard: *sprite DMA cycle stealing (#ba_low?)* in
|
|
241
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
242
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
242
243
|
- A DMA started on the *second* compare leaves sprite 0 a column short of
|
|
243
244
|
AEC, because sprite 0 alone has its accesses immediately after the
|
|
244
245
|
compares. The first of its three s-accesses therefore reads back the $ff
|
|
245
246
|
the CPU is still driving.
|
|
246
247
|
- Pinned by `spriteenable2`.
|
|
247
248
|
- Spec guard: *the first s-access of a new DMA* in
|
|
248
|
-
[`vic/sprite_spec.rb`](../spec/badline/vic/sprite_spec.rb).
|
|
249
|
+
[`vic/sprite_spec.rb`](../spec/badline/chips/vic/sprite_spec.rb).
|
|
249
250
|
- Rows come from MCBASE/MC, not from a line counter (Bauer §3.8). MC
|
|
250
251
|
steps once per s-access, so it stands three past MCBASE after a row's
|
|
251
252
|
fetch. At Bauer cycle 16 (**VIC column 14**) MCBASE takes MC while the
|
|
@@ -280,7 +281,7 @@ only catches the rows that happen to move.
|
|
|
280
281
|
all five fail (`sequencer-bug` 8064 px, 384 px a column early).
|
|
281
282
|
- `spritedma/d017-54` and `d017-57` pass with and without it.
|
|
282
283
|
- Spec guard: *sprite crunch* in
|
|
283
|
-
[`vic/sprite_spec.rb`](../spec/badline/vic/sprite_spec.rb), one example
|
|
284
|
+
[`vic/sprite_spec.rb`](../spec/badline/chips/vic/sprite_spec.rb), one example
|
|
284
285
|
per row of the readme's table.
|
|
285
286
|
- Sprite pixels come from a per-pixel sequencer, not from a decoded row. A
|
|
286
287
|
live X comparator fires one pixel before the sprite's first pixel, the
|
|
@@ -294,7 +295,7 @@ only catches the rows that happen to move.
|
|
|
294
295
|
- X coordinates ≥ $1f8 never match the VIC's 504-step X counter, so those
|
|
295
296
|
sprites stay dark. The `spritegap` dumps show this boundary.
|
|
296
297
|
- Spec guard: *X comparator* in
|
|
297
|
-
[`vic/sprite_spec.rb`](../spec/badline/vic/sprite_spec.rb).
|
|
298
|
+
[`vic/sprite_spec.rb`](../spec/badline/chips/vic/sprite_spec.rb).
|
|
298
299
|
- Each sprite's s-accesses **reload its shift register** at raster pixel
|
|
299
300
|
K = 459 + 16*m (mod 504). That is late in the line for sprites 0–2 and
|
|
300
301
|
early in the next one for 3–7.
|
|
@@ -315,7 +316,7 @@ only catches the rows that happen to move.
|
|
|
315
316
|
(entries 14–16: 469/470 dead, 471 = K+12 fires again),
|
|
316
317
|
`spritex/demusinterruptus` and `spritegap2` pass on it too.
|
|
317
318
|
- Spec guard: *the reload* in
|
|
318
|
-
[`vic/sprite_spec.rb`](../spec/badline/vic/sprite_spec.rb).
|
|
319
|
+
[`vic/sprite_spec.rb`](../spec/badline/chips/vic/sprite_spec.rb).
|
|
319
320
|
- The run into the next line is pinned by `spritescan_drean`'s 6572
|
|
320
321
|
dump, where sprite 3 shows nothing for X = $193 to $19e, the twelve
|
|
321
322
|
pixels from K = 515 on a 520-pixel line. Without it a hit at $198 to
|
|
@@ -337,7 +338,7 @@ only catches the rows that happen to move.
|
|
|
337
338
|
positions ≡ 2 mod 4, where an X-expanded sprite's pair loads land on
|
|
338
339
|
458.
|
|
339
340
|
- Spec guard: *a multicolor pair loaded on the pixel before the reload*
|
|
340
|
-
in [`vic/sprite_spec.rb`](../spec/badline/vic/sprite_spec.rb).
|
|
341
|
+
in [`vic/sprite_spec.rb`](../spec/badline/chips/vic/sprite_spec.rb).
|
|
341
342
|
- Sprites 3–7 run their s-accesses at the start of the line, so on the line
|
|
342
343
|
whose compare starts their DMA, those accesses ran with the DMA still
|
|
343
344
|
off. The shift register loads what the VIC saw anyway. The first and third
|
|
@@ -356,7 +357,7 @@ only catches the rows that happen to move.
|
|
|
356
357
|
- `Sprite::InternalBus` samples $3fff as the line starts rather than in
|
|
357
358
|
the sprite's own cycle, which `sbsprf24` can't tell apart.
|
|
358
359
|
- Spec guard: *the s-accesses before the DMA starts* in
|
|
359
|
-
[`vic/sprites_spec.rb`](../spec/badline/vic/sprites_spec.rb).
|
|
360
|
+
[`vic/sprites_spec.rb`](../spec/badline/chips/vic/sprites_spec.rb).
|
|
360
361
|
- On the line that shows its last row, where MCBASE reached 63 and the DMA
|
|
361
362
|
ended at cycle 16, the sprite loses its display at cycle 58: no hit from
|
|
362
363
|
raster pixel **460** on starts it, though one already shifting runs on,
|
|
@@ -371,18 +372,18 @@ only catches the rows that happen to move.
|
|
|
371
372
|
matches at cycle 58.
|
|
372
373
|
- Pinned by `spriterestart`.
|
|
373
374
|
- Spec guard: *when Y matches only at the compare on the last row's line*
|
|
374
|
-
in [`vic/sprite_spec.rb`](../spec/badline/vic/sprite_spec.rb).
|
|
375
|
+
in [`vic/sprite_spec.rb`](../spec/badline/chips/vic/sprite_spec.rb).
|
|
375
376
|
- The DMA end also drops the sprite's BA tail on that line, because the
|
|
376
377
|
BA columns are rebuilt at cycle 16. Pinned by `CPU/sha*`, `shs*` and
|
|
377
378
|
`shxy*`, variants 4 and 5.
|
|
378
379
|
- Spec guard: *sprite BA on the line its DMA ends* in
|
|
379
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
380
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
380
381
|
- The Y comparator is **eight bits** wide, so a coordinate of 0–55 matches a
|
|
381
382
|
second time on PAL lines 256–311 and starts a second DMA run there.
|
|
382
383
|
- Pinned by `spritey`, whose reference collides on every one of the 312
|
|
383
384
|
lines.
|
|
384
385
|
- Spec guard: *the eight-bit Y compare* in
|
|
385
|
-
[`vic/sprite_spec.rb`](../spec/badline/vic/sprite_spec.rb).
|
|
386
|
+
[`vic/sprite_spec.rb`](../spec/badline/chips/vic/sprite_spec.rb).
|
|
386
387
|
|
|
387
388
|
## VIC sprite collisions
|
|
388
389
|
|
|
@@ -417,9 +418,9 @@ only catches the rows that happen to move.
|
|
|
417
418
|
which no testprog covers; it follows VICE, which sets the bit
|
|
418
419
|
regardless of $D01A.
|
|
419
420
|
- Spec guard: *when the beam crosses the colliding pixel* in
|
|
420
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
421
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
421
422
|
- Spec guard: *#collide_upto* in
|
|
422
|
-
[`vic/sprites_spec.rb`](../spec/badline/vic/sprites_spec.rb). Its first
|
|
423
|
+
[`vic/sprites_spec.rb`](../spec/badline/chips/vic/sprites_spec.rb). Its first
|
|
423
424
|
four examples each fail on a one-pixel change.
|
|
424
425
|
- $D01E and $D01F are read-only. A write, including the write-back of a
|
|
425
426
|
read-modify-write such as `LSR $D01E`, changes neither register.
|
|
@@ -428,7 +429,7 @@ only catches the rows that happen to move.
|
|
|
428
429
|
leaves bit 0 set for the next frame, which reads as a collision one
|
|
429
430
|
pixel to the right of every real one.
|
|
430
431
|
- Spec guard: *with a collision register* in
|
|
431
|
-
[`vic/registers_spec.rb`](../spec/badline/vic/registers_spec.rb).
|
|
432
|
+
[`vic/registers_spec.rb`](../spec/badline/chips/vic/registers_spec.rb).
|
|
432
433
|
|
|
433
434
|
## VIC border and idle state
|
|
434
435
|
|
|
@@ -462,9 +463,9 @@ only catches the rows that happen to move.
|
|
|
462
463
|
compare sees `$d011` as of column 16. `vborder2-35` is the other side
|
|
463
464
|
of the pair.
|
|
464
465
|
- Spec guard: *vertical border flip-flop* in
|
|
465
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb), one context per rule,
|
|
466
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb), one context per rule,
|
|
466
467
|
each failing under its knock-out, and *vertical border flip-flop* in
|
|
467
|
-
[`vic/sequencer_spec.rb`](../spec/badline/vic/sequencer_spec.rb) for
|
|
468
|
+
[`vic/sequencer_spec.rb`](../spec/badline/chips/vic/sequencer_spec.rb) for
|
|
468
469
|
the armed bottom compare and the 40-column left compare.
|
|
469
470
|
- The side border compares see CSEL a pixel late, as the colour registers
|
|
470
471
|
do. The 40-column compares fall on the first pixel of their group (raster
|
|
@@ -482,7 +483,7 @@ only catches the rows that happen to move.
|
|
|
482
483
|
- Spec guard: *closes the right border when CSEL clears in the compare's
|
|
483
484
|
column* and *closes the right border at the 38-column compare in the
|
|
484
485
|
column CSEL clears* in
|
|
485
|
-
[`vic/sequencer_spec.rb`](../spec/badline/vic/sequencer_spec.rb).
|
|
486
|
+
[`vic/sequencer_spec.rb`](../spec/badline/chips/vic/sequencer_spec.rb).
|
|
486
487
|
- The border colour shows where the **main** flip-flop is set, and only
|
|
487
488
|
there. The vertical flip-flop keeps the main one from clearing at the
|
|
488
489
|
left compare and withholds the graphics data, but it does not paint
|
|
@@ -496,14 +497,14 @@ only catches the rows that happen to move.
|
|
|
496
497
|
[graphics pipeline](#vic-graphics-pipeline) rules).
|
|
497
498
|
- Spec guard: *shows the vertical border only through the main
|
|
498
499
|
flip-flop* in
|
|
499
|
-
[`vic/sequencer_spec.rb`](../spec/badline/vic/sequencer_spec.rb).
|
|
500
|
+
[`vic/sequencer_spec.rb`](../spec/badline/chips/vic/sequencer_spec.rb).
|
|
500
501
|
- An idle-state g-access reads $3fff, or $39ff with ECM set, and the byte
|
|
501
502
|
is painted through the current mode with a zero screen byte and colour
|
|
502
503
|
nibble (foreground black, background per mode). A guard keeps
|
|
503
504
|
closed-border lines on the bulk path.
|
|
504
505
|
- Pinned by `ss-pri*`, whose diffs collapsed from ~85k px to 220–440 px.
|
|
505
506
|
- Spec guard: *renders the idle byte at $3fff in black* in
|
|
506
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
507
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
507
508
|
- A column with no g-access (outside columns 14–53), or one whose
|
|
508
509
|
g-access falls while the vertical border stays closed for the rest of
|
|
509
510
|
the line, shifts out **zero data**. It is painted through the current
|
|
@@ -524,7 +525,7 @@ only catches the rows that happen to move.
|
|
|
524
525
|
the first g-accesses are sampled. Without that, every picture loses
|
|
525
526
|
the start of its first line (`greydot`, `dmadelay`, `dentest`).
|
|
526
527
|
- Spec guard: *a column with no g-access* in
|
|
527
|
-
[`vic/sequencer_spec.rb`](../spec/badline/vic/sequencer_spec.rb).
|
|
528
|
+
[`vic/sequencer_spec.rb`](../spec/badline/chips/vic/sequencer_spec.rb).
|
|
528
529
|
- The XSCROLL bleed at column 0 takes its pixels from the group before
|
|
529
530
|
it, the zero-data group, rather than filling with $d021. Only
|
|
530
531
|
`border-bm-ysh2` separates the two (+6 px).
|
|
@@ -580,7 +581,7 @@ only catches the rows that happen to move.
|
|
|
580
581
|
(CPU halted through the cycle after column 54) breaks `bascan`
|
|
581
582
|
itself, all five `colorfetchbug` rows, `flibug/blackmail*`,
|
|
582
583
|
`spriteenable3`–`5` and several `vborder*` rows.
|
|
583
|
-
- Spec guard: *#ba_low?* in [`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
584
|
+
- Spec guard: *#ba_low?* in [`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
584
585
|
- The DEN latch is level-sensitive across the raster counter's increment,
|
|
585
586
|
so its window runs from the last column of line 47 through the last
|
|
586
587
|
column of line 48. The wrap column counts for both the line ending and
|
|
@@ -595,16 +596,16 @@ only catches the rows that happen to move.
|
|
|
595
596
|
next one instead of a fixed +40.
|
|
596
597
|
- All 21 `dmadelay` rows pass under these rules, and they sweep the match
|
|
597
598
|
across the whole line. `D011Test/disable-bad` pins the too-late match.
|
|
598
|
-
- Spec guard: [`vic/display_state_spec.rb`](../spec/badline/vic/display_state_spec.rb),
|
|
599
|
+
- Spec guard: [`vic/display_state_spec.rb`](../spec/badline/chips/vic/display_state_spec.rb),
|
|
599
600
|
one group per rule.
|
|
600
601
|
- The colour nibble of a c-access before AEC is the low nibble of the byte
|
|
601
602
|
at the CPU's PC, which is the opcode it is halted on, as VICE reads it.
|
|
602
|
-
`
|
|
603
|
+
`C64` hands the VIC a lambda for it (`VIC#open_bus=`), called only
|
|
603
604
|
on those accesses. A bare VIC reads colour RAM instead.
|
|
604
605
|
- Pinned by `flibug/blackmail*` and `colorfetchbug/main*`, whose bug
|
|
605
606
|
cells take their colour from the halted opcode.
|
|
606
607
|
- Spec guard: *an FLI match in column 13* in
|
|
607
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
608
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
608
609
|
- On the 6569, a match that opens display state in a g-access column, which
|
|
609
610
|
is a DMA delay out of idle state, moves that column's idle g-access from
|
|
610
611
|
`$3fff` (or `$39ff`) to `$38ff`, but only when YSCROLL is nonzero, so
|
|
@@ -629,7 +630,7 @@ only catches the rows that happen to move.
|
|
|
629
630
|
- Spec guard: *reads the idle byte at $38ff when YSCROLL is nonzero* and
|
|
630
631
|
*reads the idle byte at $3fff when YSCROLL is 0*, plus the 8565's
|
|
631
632
|
*reads the idle byte at $3fff when YSCROLL is nonzero*, in
|
|
632
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
633
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
633
634
|
- These rows can't be read as pixel counts. The sweep became readable by
|
|
634
635
|
OCRing each reference PNG against `lib/badline/roms/character.rom` and
|
|
635
636
|
matching every display row back to its offset in screen memory, so a diff
|
|
@@ -651,7 +652,7 @@ VICE x64sc's `vicii_fetch_graphics` and `draw_graphics8` for the 6569.
|
|
|
651
652
|
between the g-access and the draw, and `fetchsplit` (2939 → 2890 px
|
|
652
653
|
without it), which splits `$d018` and `$dd00` mid-line.
|
|
653
654
|
- Spec guard: *reads the byte in its own column* in
|
|
654
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
655
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
655
656
|
- The g-access still sees BMM for one column after it falls: it addresses
|
|
656
657
|
with `$d011` OR-ed with the BMM bit of the column before
|
|
657
658
|
(`VIC::FETCH_HOLD`). When BMM changes and the access moves from RAM onto
|
|
@@ -663,7 +664,7 @@ VICE x64sc's `vicii_fetch_graphics` and `draw_graphics8` for the 6569.
|
|
|
663
664
|
13/14/9 px).
|
|
664
665
|
- Spec guard: *addresses with a BMM that fell in the same column* and
|
|
665
666
|
*mixes the addresses when BMM falls onto the character ROM* in
|
|
666
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
667
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
667
668
|
- ECM is held for that column too, but only when the access it leaves,
|
|
668
669
|
addressed through the old mode, read the character ROM
|
|
669
670
|
(`VIC::FETCH_HOLD_ROM`). A falling ECM reaches a RAM access at once.
|
|
@@ -680,7 +681,7 @@ VICE x64sc's `vicii_fetch_graphics` and `draw_graphics8` for the 6569.
|
|
|
680
681
|
capture. VICE holds BMM only.
|
|
681
682
|
- Spec guard: *drops a falling ECM at once when the access left RAM* and
|
|
682
683
|
*holds a falling ECM when the access left the character ROM* in
|
|
683
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
684
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
684
685
|
- The byte a group draws loads into the shift register at pixel XSCROLL,
|
|
685
686
|
and that XSCROLL is the one the **column before** saw. It is latched in
|
|
686
687
|
each g-access column with the vertical border open (VICE
|
|
@@ -690,7 +691,7 @@ VICE x64sc's `vicii_fetch_graphics` and `draw_graphics8` for the 6569.
|
|
|
690
691
|
`modesplit` (48 → 144) and `vicii_reg_timing` (pass → 720), and by
|
|
691
692
|
`border-bm-idle`, `border-bm-ysh` and `border-mcbm`.
|
|
692
693
|
- Spec guard: *loads the byte at the XSCROLL the column before saw* in
|
|
693
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
694
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
694
695
|
- A mode change takes hold **inside** the group. ECM and BMM rising show
|
|
695
696
|
at pixel 4 and falling at pixel 6, so a change that clears one bit while
|
|
696
697
|
it sets the other shows the invalid mode's black on pixels 4 and 5. MCM
|
|
@@ -721,7 +722,7 @@ VICE x64sc's `vicii_fetch_graphics` and `draw_graphics8` for the 6569.
|
|
|
721
722
|
- Spec guard: *takes a BMM falling out of hi-res bitmap at pixel 6*,
|
|
722
723
|
*out of ECM+BMM at pixel 5* and *out of multicolour bitmap at
|
|
723
724
|
pixel 5* in
|
|
724
|
-
[`vic/graphics_shifter_spec.rb`](../spec/badline/vic/graphics_shifter_spec.rb).
|
|
725
|
+
[`vic/graphics_shifter_spec.rb`](../spec/badline/chips/vic/graphics_shifter_spec.rb).
|
|
725
726
|
- An MCM that falls out of the invalid ECM+MCM text mode is a pixel
|
|
726
727
|
later on both counts. The lookup stays black through pixel 4 and
|
|
727
728
|
changes at pixel 5, and the pairs are read through pixel 7, with
|
|
@@ -733,10 +734,10 @@ VICE x64sc's `vicii_fetch_graphics` and `draw_graphics8` for the 6569.
|
|
|
733
734
|
`videomode2`, `vicii_reg_timing`, `modesplit` and `videomode-v`,
|
|
734
735
|
`-w`, `-x` and `-y`.
|
|
735
736
|
- Spec guard: *takes an MCM falling out of ECM+MCM a pixel late* in
|
|
736
|
-
[`vic/graphics_shifter_spec.rb`](../spec/badline/vic/graphics_shifter_spec.rb).
|
|
737
|
-
- Spec guard: [`vic/graphics_shifter_spec.rb`](../spec/badline/vic/graphics_shifter_spec.rb),
|
|
737
|
+
[`vic/graphics_shifter_spec.rb`](../spec/badline/chips/vic/graphics_shifter_spec.rb).
|
|
738
|
+
- Spec guard: [`vic/graphics_shifter_spec.rb`](../spec/badline/chips/vic/graphics_shifter_spec.rb),
|
|
738
739
|
one example per pixel, and *a mode change inside a group* in
|
|
739
|
-
[`vic/sequencer_spec.rb`](../spec/badline/vic/sequencer_spec.rb).
|
|
740
|
+
[`vic/sequencer_spec.rb`](../spec/badline/chips/vic/sequencer_spec.rb).
|
|
740
741
|
- The pixels XSCROLL keeps from the previous byte take the **current**
|
|
741
742
|
colour registers: a `$d021`–`$d024` write repaints that byte before it
|
|
742
743
|
shows. The `ColorPatches` +1 px still applies on top.
|
|
@@ -745,7 +746,7 @@ VICE x64sc's `vicii_fetch_graphics` and `draw_graphics8` for the 6569.
|
|
|
745
746
|
`spritefetchbug/test-136-2a` (8 px → pass) go back only when both this
|
|
746
747
|
and the XSCROLL latch are knocked out.
|
|
747
748
|
- Spec guard: *a background write under XSCROLL* in
|
|
748
|
-
[`vic/sequencer_spec.rb`](../spec/badline/vic/sequencer_spec.rb).
|
|
749
|
+
[`vic/sequencer_spec.rb`](../spec/badline/chips/vic/sequencer_spec.rb).
|
|
749
750
|
|
|
750
751
|
## VIC phi1 bus
|
|
751
752
|
|
|
@@ -773,7 +774,7 @@ VICE x64sc's `vicii_fetch_graphics` and `draw_graphics8` for the 6569.
|
|
|
773
774
|
way fails it on 19 of its 63 columns. The refresh counter, display-state
|
|
774
775
|
g-accesses and the DMA s-access follow VICE: `phi1timing` fills
|
|
775
776
|
$3f00–$3ffe with one value and runs with DEN clear and no sprites.
|
|
776
|
-
- Spec guard: *#phi1_data* in [`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
777
|
+
- Spec guard: *#phi1_data* in [`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
777
778
|
|
|
778
779
|
## VIC light pen
|
|
779
780
|
|
|
@@ -795,7 +796,7 @@ VICE x64sc's `vicii_fetch_graphics` and `draw_graphics8` for the 6569.
|
|
|
795
796
|
|
|
796
797
|
## VIC-II 8565
|
|
797
798
|
|
|
798
|
-
The 8565 (`VIC.new(model: :mos8565)`, `
|
|
799
|
+
The 8565 (`VIC.new(model: :mos8565)`, `C64.new(vic_model:
|
|
799
800
|
:mos8565)`), fitted to the C64C, runs every rule above except the ones
|
|
800
801
|
below. They follow VICE x64sc's model checks (`color_latency` clear), and
|
|
801
802
|
each is gated on the model and was knocked out: removing it fails the rows
|
|
@@ -815,11 +816,11 @@ are the row's diff with the rule removed.
|
|
|
815
816
|
and `vicii_reg_timing` (22 px), whose read-modify-write instructions
|
|
816
817
|
store each value twice.
|
|
817
818
|
- Spec guard: the *on the 8565* group in
|
|
818
|
-
[`color_patches_spec.rb`](../spec/badline/vic/color_patches_spec.rb),
|
|
819
|
+
[`color_patches_spec.rb`](../spec/badline/chips/vic/color_patches_spec.rb),
|
|
819
820
|
*shows a grey dot on the pixel before a new sprite color* in
|
|
820
|
-
[`sprites_spec.rb`](../spec/badline/vic/sprites_spec.rb) and *shows a
|
|
821
|
+
[`sprites_spec.rb`](../spec/badline/chips/vic/sprites_spec.rb) and *shows a
|
|
821
822
|
grey dot for a background write of the same color* in
|
|
822
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
823
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
823
824
|
- **Sprite multicolour.** `$d01c` reaches the sprite sequencers a pixel
|
|
824
825
|
sooner, 6 pixels on instead of 7, and works on the multicolour
|
|
825
826
|
flip-flop (VICE `update_sprite_mc_bits_8565`). The X match leaves the
|
|
@@ -836,16 +837,16 @@ are the row's diff with the rule removed.
|
|
|
836
837
|
`ss-mc-hires-exp` (44 px), and the hi-res hold by `ss-mc-hires` and
|
|
837
838
|
`ss-mc-hires-exp` (44 px each).
|
|
838
839
|
- Spec guard: *reaches the multicolor flip-flop six pixels on* in
|
|
839
|
-
[`sprites_spec.rb`](../spec/badline/vic/sprites_spec.rb) and the *with
|
|
840
|
+
[`sprites_spec.rb`](../spec/badline/chips/vic/sprites_spec.rb) and the *with
|
|
840
841
|
an 8565* group of *mid-line writes* in
|
|
841
|
-
[`sprite_spec.rb`](../spec/badline/vic/sprite_spec.rb).
|
|
842
|
+
[`sprite_spec.rb`](../spec/badline/chips/vic/sprite_spec.rb).
|
|
842
843
|
- **The g-access addresses with the `$d011` of the column before**,
|
|
843
844
|
whole, instead of the 6569's hold of BMM and, on the character ROM, ECM.
|
|
844
845
|
- Pinned by `modesplit` (598 px), `vicii_reg_timing` (92, 99/106 px),
|
|
845
846
|
`fetchsplit` (180 px) and every videomode row but `videomode1` (3 to
|
|
846
847
|
16 px).
|
|
847
848
|
- Spec guard: *addresses with the $d011 of the column before* in
|
|
848
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
849
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
849
850
|
- **ECM and BMM take hold at the next group's pixel 0**, rising or
|
|
850
851
|
falling, where the 6569 takes them at pixel 4 as they rise and 5 or 6 as
|
|
851
852
|
they fall. MCM keeps the 6569's timing, but an MCM that falls out of
|
|
@@ -854,7 +855,7 @@ are the row's diff with the rule removed.
|
|
|
854
855
|
100/114 px) and every videomode row (6 to 13 px). The on-time MCM by
|
|
855
856
|
`videomode1` and `videomode-z` (2 px each).
|
|
856
857
|
- Spec guard: the *on the 8565* group in
|
|
857
|
-
[`graphics_shifter_spec.rb`](../spec/badline/vic/graphics_shifter_spec.rb).
|
|
858
|
+
[`graphics_shifter_spec.rb`](../spec/badline/chips/vic/graphics_shifter_spec.rb).
|
|
858
859
|
- **Out of an invalid mode into multicolour bitmap, a background pixel 0
|
|
859
860
|
is still black, and into hi-res text any pixel 0 is.** Into multicolour
|
|
860
861
|
text and ECM text it shows on time.
|
|
@@ -877,12 +878,12 @@ are the row's diff with the rule removed.
|
|
|
877
878
|
into hi-res text*, *shows pixel 0 on time out of an invalid mode into
|
|
878
879
|
multicolour text* and *shows pixel 0 on time out of an invalid mode into
|
|
879
880
|
ECM text* in
|
|
880
|
-
[`graphics_shifter_spec.rb`](../spec/badline/vic/graphics_shifter_spec.rb).
|
|
881
|
+
[`graphics_shifter_spec.rb`](../spec/badline/chips/vic/graphics_shifter_spec.rb).
|
|
881
882
|
- **The light pen latches one extra half-pixel**, where the 6569 adds two.
|
|
882
883
|
- Pinned by `lp-trigger/test2new`, which measures the trigger delay and
|
|
883
884
|
fails with two.
|
|
884
885
|
- Spec guard: *adds one extra half-pixel on the 8565* in
|
|
885
|
-
[`vic_spec.rb`](../spec/badline/vic_spec.rb).
|
|
886
|
+
[`vic_spec.rb`](../spec/badline/chips/vic_spec.rb).
|
|
886
887
|
- **A `$dd00` write that swaps the bank lines shows bank 3 for a cycle.**
|
|
887
888
|
Where one bank line goes high as the other goes low, every VIC access in
|
|
888
889
|
the cycle after the write reads bank 3 (both lines low), and the new bank
|
|
@@ -894,7 +895,7 @@ are the row's diff with the rule removed.
|
|
|
894
895
|
the 6569 reference shows none. `M1` also shows it after the DDR swaps;
|
|
895
896
|
`M7`, which the `-8565` reference is made from, doesn't.
|
|
896
897
|
- Spec guard: the `#sample_lines` group in
|
|
897
|
-
[`bank_spec.rb`](../spec/badline/vic/bank_spec.rb).
|
|
898
|
+
[`bank_spec.rb`](../spec/badline/chips/vic/bank_spec.rb).
|
|
898
899
|
|
|
899
900
|
What the 8565 references don't settle, and so what stays as it is:
|
|
900
901
|
|
|
@@ -1056,8 +1057,8 @@ region moves the sprites. The positions live in `Region::Profile` and
|
|
|
1056
1057
|
of them fails, and every other row of the sprite, phi1, dmadelay, vsp
|
|
1057
1058
|
and screenpos subsets passes as before.
|
|
1058
1059
|
- Spec guard: *sprite DMA cycle stealing on NTSC* and *#phi1_data on
|
|
1059
|
-
NTSC* in [`vic_spec.rb`](../spec/badline/vic_spec.rb), and
|
|
1060
|
-
[`timing_spec.rb`](../spec/badline/vic/sprite/timing_spec.rb).
|
|
1060
|
+
NTSC* in [`vic_spec.rb`](../spec/badline/chips/vic_spec.rb), and
|
|
1061
|
+
[`timing_spec.rb`](../spec/badline/chips/vic/sprite/timing_spec.rb).
|
|
1061
1062
|
- **Display compare.** The 6567R8 turns a sprite's display on and off in
|
|
1062
1063
|
cycle 59 (`sprite_display_cycle`), where the 6567R56A keeps the 6569's
|
|
1063
1064
|
cycle 58. This isn't pinned yet: moving the 6567R8's to 58 or the
|
|
@@ -1115,7 +1116,7 @@ testlist comments that row out, and `testbench-drean`
|
|
|
1115
1116
|
misses $180-$183 (4 bytes), repeating $180-$183 misses $184-$186 (3),
|
|
1116
1117
|
and repeating $17c-$183 or $184-$18b moves 18 bytes. Spec guard: the
|
|
1117
1118
|
6567R8 and 6572 examples in
|
|
1118
|
-
[`timing_spec.rb`](../spec/badline/vic/sprite/timing_spec.rb).
|
|
1119
|
+
[`timing_spec.rb`](../spec/badline/chips/vic/sprite/timing_spec.rb).
|
|
1119
1120
|
- The display compare isn't pinned: the dump matches with it in cycle
|
|
1120
1121
|
58 as well as 59.
|
|
1121
1122
|
- Not matched: `spritegap3`'s 6572 dump has sprite 0 at X = 0 miss the
|
|
@@ -1185,23 +1186,23 @@ testlist comments that row out, and `testbench-drean`
|
|
|
1185
1186
|
timer starts and raises a spurious NMI. Pinned by
|
|
1186
1187
|
`interrupts/branchquirk/branchquirk-nmiold` (first cell only) and
|
|
1187
1188
|
`CPU/Acid800/cpu_bugs` (NMI lands before the BRK instead of hijacking it).
|
|
1188
|
-
- Spec guard: [`cia/timer_spec.rb`](../spec/badline/cia/timer_spec.rb) runs
|
|
1189
|
+
- Spec guard: [`cia/timer_spec.rb`](../spec/badline/chips/cia/timer_spec.rb) runs
|
|
1189
1190
|
the eight `(*1)` cells and the `cia1tab` table. It fails if the IR delay
|
|
1190
1191
|
is dropped. Its *power-on state* group guards the `$ffff` reset.
|
|
1191
|
-
[`cia_spec.rb`](../spec/badline/cia_spec.rb)'s *6526 interrupt
|
|
1192
|
+
[`cia_spec.rb`](../spec/badline/chips/cia_spec.rb)'s *6526 interrupt
|
|
1192
1193
|
acknowledge* and *6526 timer B bug* groups guard the three ICR rules
|
|
1193
1194
|
above, on a bare CIA.
|
|
1194
1195
|
|
|
1195
1196
|
## CIA 6526A interrupt register
|
|
1196
1197
|
|
|
1197
|
-
The 6526A (`CIA.new(model: :mos6526a)`, `
|
|
1198
|
+
The 6526A (`CIA.new(model: :mos6526a)`, `C64.new(cia_model:
|
|
1198
1199
|
:mos6526a)`), fitted to the C64C, differs from the 6526 only in its
|
|
1199
1200
|
interrupt control register. Its timers and shift register run the rules
|
|
1200
1201
|
above unchanged: every `testbench-cia-new` row passes on the 6526's
|
|
1201
1202
|
timer and serial code, the long counter sweeps `cia1tanew`, `cia1tbnew`,
|
|
1202
1203
|
`cia2tanew` and `cia2tbnew` included. VICE's `ciatimer.c` has no model
|
|
1203
1204
|
check either. Each rule below is gated on the model in
|
|
1204
|
-
[`cia/interrupt_register.rb`](../lib/badline/cia/interrupt_register.rb),
|
|
1205
|
+
[`cia/interrupt_register.rb`](../lib/badline/chips/cia/interrupt_register.rb),
|
|
1205
1206
|
and each was knocked out: removing it fails the rows named.
|
|
1206
1207
|
|
|
1207
1208
|
- **IR on the flag's cycle.** A source flag whose mask bit is set raises
|
|
@@ -1248,7 +1249,7 @@ and each was knocked out: removing it fails the rows named.
|
|
|
1248
1249
|
the 6526A, passes every `testbench-cia-new` row, so the 6526A keeps the
|
|
1249
1250
|
6526's behaviour on both.
|
|
1250
1251
|
- Spec guard: *the 6526A interrupt register* in
|
|
1251
|
-
[`cia_spec.rb`](../spec/badline/cia_spec.rb), one example per rule,
|
|
1252
|
+
[`cia_spec.rb`](../spec/badline/chips/cia_spec.rb), one example per rule,
|
|
1252
1253
|
each failing when its rule is knocked out.
|
|
1253
1254
|
|
|
1254
1255
|
## CIA serial shift register
|
|
@@ -1302,7 +1303,7 @@ and each was knocked out: removing it fails the rows named.
|
|
|
1302
1303
|
state one baud carries into the next through the mode-change latch. Run
|
|
1303
1304
|
the test2 sweeps for real (about 5 min each) after changing that path.
|
|
1304
1305
|
- Spec guard: the "serial port in output mode" block in
|
|
1305
|
-
[`cia_spec.rb`](../spec/badline/cia_spec.rb) covers the flag timing, the
|
|
1306
|
+
[`cia_spec.rb`](../spec/badline/chips/cia_spec.rb) covers the flag timing, the
|
|
1306
1307
|
waiting byte, both mode-change reports and the zero-latch stall.
|
|
1307
1308
|
|
|
1308
1309
|
## VIA shift register
|
|
@@ -1338,9 +1339,9 @@ and each was knocked out: removing it fails the rows named.
|
|
|
1338
1339
|
the flag's cycle in the φ2 modes either: no row starts a byte and then
|
|
1339
1340
|
reads IFR.
|
|
1340
1341
|
- Spec guard: the mode blocks in
|
|
1341
|
-
[`shift_register_spec.rb`](../spec/badline/via/shift_register_spec.rb)
|
|
1342
|
+
[`shift_register_spec.rb`](../spec/badline/chips/via/shift_register_spec.rb)
|
|
1342
1343
|
and *the shift register* in
|
|
1343
|
-
[`via_spec.rb`](../spec/badline/via_spec.rb).
|
|
1344
|
+
[`via_spec.rb`](../spec/badline/chips/via_spec.rb).
|
|
1344
1345
|
|
|
1345
1346
|
## 6510 I/O port
|
|
1346
1347
|
|
|
@@ -1352,7 +1353,7 @@ and each was knocked out: removing it fails the rows named.
|
|
|
1352
1353
|
- Pinned by `CPU/cpuport/initvalue.crt`, which runs from a cartridge
|
|
1353
1354
|
before the KERNAL does.
|
|
1354
1355
|
- Spec guard: *when powered on* in
|
|
1355
|
-
[`
|
|
1356
|
+
[`bus_spec.rb`](../spec/badline/c64/bus_spec.rb).
|
|
1356
1357
|
- A write to `$00` or `$01` goes to the port, and the RAM below takes the
|
|
1357
1358
|
byte the VIC fetched in the phi1 half of the same cycle, as in VICE's
|
|
1358
1359
|
`zero_store`. Only the VIC reads that RAM.
|
|
@@ -1361,7 +1362,7 @@ and each was knocked out: removing it fails the rows named.
|
|
|
1361
1362
|
sprite pointer fetches. Both read the RAM back through sprite
|
|
1362
1363
|
collisions.
|
|
1363
1364
|
- Spec guard: *when a program writes to the port* in
|
|
1364
|
-
[`
|
|
1365
|
+
[`bus_spec.rb`](../spec/badline/c64/bus_spec.rb).
|
|
1365
1366
|
|
|
1366
1367
|
## RAM power-on pattern
|
|
1367
1368
|
|
|
@@ -1371,7 +1372,7 @@ and each was knocked out: removing it fails the rows named.
|
|
|
1371
1372
|
C64C (ASSY 250469 R4) in `C64/raminitpattern/readme.txt`
|
|
1372
1373
|
(`-raminitstartvalue 0 -raminitvalueinvert 4 -raminitvalueoffset 2
|
|
1373
1374
|
-raminitpatterninvert 16384 -raminitpatterninvertvalue 255`), without
|
|
1374
|
-
that machine's occasional random bytes. `
|
|
1375
|
+
that machine's occasional random bytes. `C64::Bus::RAM_POWER_ON`
|
|
1375
1376
|
holds it.
|
|
1376
1377
|
- Pinned by `C64/raminitpattern`: `cyberloadtest` fails when
|
|
1377
1378
|
`$f379-$f478` holds one value, `darkstarbbstest` when the first ten
|
|
@@ -1382,7 +1383,7 @@ and each was knocked out: removing it fails the rows named.
|
|
|
1382
1383
|
All-`$00` fails the first three, and each other pattern the readme
|
|
1383
1384
|
lists fails at least one of the four.
|
|
1384
1385
|
- Spec guard: *RAM at power-on* in
|
|
1385
|
-
[`
|
|
1386
|
+
[`bus_spec.rb`](../spec/badline/c64/bus_spec.rb).
|
|
1386
1387
|
- The RAM expansions' extra banks still power on at `$00`.
|
|
1387
1388
|
|
|
1388
1389
|
## VIC-20 RAM power-on pattern
|
|
@@ -1416,16 +1417,16 @@ and each was knocked out: removing it fails the rows named.
|
|
|
1416
1417
|
`dumps/dump6561e.prg`, a real 6561E. The later 6561-101's dump reads
|
|
1417
1418
|
`$20` in the idle cycles instead; badline follows the 6561E.
|
|
1418
1419
|
- Spec guard:
|
|
1419
|
-
[`
|
|
1420
|
+
[`chips/vic_i_split_tests_timing_spec.rb`](../spec/badline/chips/vic_i_split_tests_timing_spec.rb)
|
|
1420
1421
|
(`:slow`), and *the fetches* in
|
|
1421
|
-
[`
|
|
1422
|
+
[`chips/vic_i_video_spec.rb`](../spec/badline/chips/vic_i_video_spec.rb).
|
|
1422
1423
|
- A write to `$900F` or `$900E` takes hold from the second of the four
|
|
1423
1424
|
pixels of the cycle it lands in, the reverse bit two pixels later, and
|
|
1424
1425
|
a character's pixels come out in the two cycles after its pattern
|
|
1425
1426
|
fetch. These match xvic's screenshots of a test of cycle-timed writes
|
|
1426
1427
|
pixel for pixel; no testprog or hardware capture checks them.
|
|
1427
1428
|
- Spec guard: *a colour write* in
|
|
1428
|
-
[`
|
|
1429
|
+
[`chips/vic_i_video_spec.rb`](../spec/badline/chips/vic_i_video_spec.rb).
|
|
1429
1430
|
|
|
1430
1431
|
## VIC-I sound
|
|
1431
1432
|
|
|
@@ -1444,7 +1445,7 @@ wasn't read.
|
|
|
1444
1445
|
and `$A0` 1154.59 and 182.30 Hz, each within 0.001 Hz of the formula
|
|
1445
1446
|
on the PAL clock.
|
|
1446
1447
|
- Spec guard: *a tone voice's counter* in
|
|
1447
|
-
[`
|
|
1448
|
+
[`vic_i/sound_spec.rb`](../spec/badline/chips/vic_i/sound_spec.rb).
|
|
1448
1449
|
- A tone voice's shift register takes bit 7 back into bit 0 inverted while
|
|
1449
1450
|
the voice is on and a zero while it's off, and keeps shifting either way.
|
|
1450
1451
|
Bit 0 is the output, not gated by the enable bit. This is the die-shot
|
|
@@ -1457,7 +1458,7 @@ wasn't read.
|
|
|
1457
1458
|
0.1 dB through the 12th. 10101010 puts the 7th and 9th harmonics
|
|
1458
1459
|
above the fundamental, which a register cleared while off couldn't.
|
|
1459
1460
|
- Spec guard: *a tone voice* in
|
|
1460
|
-
[`
|
|
1461
|
+
[`vic_i/sound_spec.rb`](../spec/badline/chips/vic_i/sound_spec.rb).
|
|
1461
1462
|
- The noise voice's counter steps a 16-bit LFSR: bit 0 takes the XOR of
|
|
1462
1463
|
bits 3, 12, 14 and 15 while the voice is on and a one while it's off.
|
|
1463
1464
|
Each rise of the LFSR's bit 0 shifts the noise voice's own shift
|
|
@@ -1471,14 +1472,14 @@ wasn't read.
|
|
|
1471
1472
|
band levels of noise at `$FE`, `$FD`, `$F0`, `$C0` and `$80` match
|
|
1472
1473
|
xvic's within 0.5 dB up to 8 kHz.
|
|
1473
1474
|
- Spec guard: *the noise voice* in
|
|
1474
|
-
[`
|
|
1475
|
+
[`vic_i/sound_spec.rb`](../spec/badline/chips/vic_i/sound_spec.rb).
|
|
1475
1476
|
- The output is the voices that are high plus 2/9 of a voice, times the
|
|
1476
1477
|
volume, so a volume write steps the output with every voice off, as
|
|
1477
1478
|
4-bit samples played through `$900E` need.
|
|
1478
1479
|
- Pinned by xvic: a volume step from 0 to 15 with every voice off peaks
|
|
1479
1480
|
at 0.218 of a voice turned on at volume 15.
|
|
1480
1481
|
- Spec guard: *the volume* in
|
|
1481
|
-
[`
|
|
1482
|
+
[`vic_i/sound_spec.rb`](../spec/badline/chips/vic_i/sound_spec.rb).
|
|
1482
1483
|
- Not pinned: the volume scales the output linearly. xvic's tone level
|
|
1483
1484
|
per volume step isn't linear (volume 1 is 0.099 of volume 15 and 14
|
|
1484
1485
|
is 1.015), and nothing here says whether the hardware is.
|
|
@@ -1488,7 +1489,35 @@ wasn't read.
|
|
|
1488
1489
|
stages at 1,417 and 158.0 Hz, with an RMS error of 6 against a peak of
|
|
1489
1490
|
11,280. badline's own recording fits 1,420 and 157.6 Hz.
|
|
1490
1491
|
- Spec guard: *a step* in
|
|
1491
|
-
[`
|
|
1492
|
+
[`vic_i/sound/output_spec.rb`](../spec/badline/chips/vic_i/sound/output_spec.rb).
|
|
1493
|
+
|
|
1494
|
+
## TED beam and the 7501 port
|
|
1495
|
+
|
|
1496
|
+
Two places where badline knowingly differs from xplus4 r45942, which was
|
|
1497
|
+
run as a black box. No hardware capture settles either of them. Whoever
|
|
1498
|
+
finds one should start here.
|
|
1499
|
+
|
|
1500
|
+
- The line count steps, and the raster interrupt fires, at horizontal
|
|
1501
|
+
count 376, column 47 of `Chips::TED::Beam`: the datasheet's "Increment
|
|
1502
|
+
Vertical Line" decode, which fits its "8 cycles before the character
|
|
1503
|
+
window" for the raster interrupt. xplus4 steps the line about 3 single
|
|
1504
|
+
clock cycles later, and its raster interrupt reaches the handler 2-3
|
|
1505
|
+
cycles later, on display and border lines alike.
|
|
1506
|
+
- Pinned by the TED datasheet in the *Plus/4 Hardware Manual*, the
|
|
1507
|
+
scanned decode table on sheet 11 (page 62 of `hw.pdf`), not by a test.
|
|
1508
|
+
The comparison with xplus4 used trace probes that sample `$FF1E` and
|
|
1509
|
+
`$FF1D` through the lines, described with #644. The Lorenz plus4 rows
|
|
1510
|
+
don't move either way.
|
|
1511
|
+
- Spec guard: *the beam* in
|
|
1512
|
+
[`chips/ted_spec.rb`](../spec/badline/chips/ted_spec.rb).
|
|
1513
|
+
- `trap10`, `trap12` and `trap14` of the Lorenz suite's plus4 build, and
|
|
1514
|
+
their `ane` and `lxa` variants, pass on badline and fail (`$ff`) on
|
|
1515
|
+
xplus4. They are the trap tests that put their data on the 7501's port
|
|
1516
|
+
at `$00`-`$01` (`Plus4::CPUPort`: a full 8-bit direction register, P5
|
|
1517
|
+
reading 1 as an input). `readme-plus4.txt` says the trap tests don't
|
|
1518
|
+
work on a real 264, so its results don't decide this either.
|
|
1519
|
+
- Pinned by `lorenz-plus4`'s rows for those tests. The xplus4 verdicts
|
|
1520
|
+
are its exit codes with `-debugcart`, one program at a time.
|
|
1492
1521
|
|
|
1493
1522
|
## 1541 serial port
|
|
1494
1523
|
|
|
@@ -1514,7 +1543,7 @@ wasn't read.
|
|
|
1514
1543
|
`drive/skew/skew1` and `drive/iecdelay/iec-bus-delay-auto`.
|
|
1515
1544
|
- Spec guard: *sees an assertion from the host cycle after the one it
|
|
1516
1545
|
lands in* and *shows the drive the C64's CLK from the host cycle after
|
|
1517
|
-
the write* in [`
|
|
1546
|
+
the write* in [`serial_bus_spec.rb`](../spec/badline/drives/serial_bus_spec.rb).
|
|
1518
1547
|
|
|
1519
1548
|
## 1541 disk mechanism
|
|
1520
1549
|
|
|
@@ -1534,7 +1563,7 @@ wasn't read.
|
|
|
1534
1563
|
on.
|
|
1535
1564
|
- Spec guard: *steps in from the stop with the first phase after the
|
|
1536
1565
|
bump* in
|
|
1537
|
-
[`mechanism_spec.rb`](../spec/badline/
|
|
1566
|
+
[`mechanism_spec.rb`](../spec/badline/drives/model1541/mechanism_spec.rb),
|
|
1538
1567
|
and the `format/name-and-id`, `format/bam-free` and
|
|
1539
1568
|
`format/trap-readable` rows of the `drive-scenarios` suite
|
|
1540
1569
|
([`drive_scenarios.rb`](../test/support/drive_scenarios.rb)), which read the
|
|
@@ -1560,9 +1589,9 @@ wasn't read.
|
|
|
1560
1589
|
- Pinned by `drive/scanner` (all six programs, on the `.d64` and the
|
|
1561
1590
|
`.g64`), which reads every track and each track's error map.
|
|
1562
1591
|
- Spec guard: the *at 300 rpm* examples and *turns once in 200 ms* in
|
|
1563
|
-
[`mechanism_spec.rb`](../spec/badline/
|
|
1592
|
+
[`mechanism_spec.rb`](../spec/badline/drives/model1541/mechanism_spec.rb),
|
|
1564
1593
|
and *#cell_at* in
|
|
1565
|
-
[`track_spec.rb`](../spec/badline/
|
|
1594
|
+
[`track_spec.rb`](../spec/badline/drives/model1541/track_spec.rb).
|
|
1566
1595
|
- A write lays its bits one to a cell from the cell under the head. A
|
|
1567
1596
|
half track without data gets a blank track first, as long as a turn at
|
|
1568
1597
|
the rate the drive writes at, not at the rate of the track's own zone,
|
|
@@ -1580,10 +1609,10 @@ wasn't read.
|
|
|
1580
1609
|
194,728 cycles (`exit=$ff`).
|
|
1581
1610
|
- Spec guard: *gives a half track a blank track 7142 bytes around,
|
|
1582
1611
|
written in zone 2* in
|
|
1583
|
-
[`disk_spec.rb`](../spec/badline/
|
|
1612
|
+
[`disk_spec.rb`](../spec/badline/drives/model1541/disk_spec.rb), and *lays
|
|
1584
1613
|
a track written in another zone out again as a turn at the zone
|
|
1585
1614
|
written* and *writes a turn of SYNC that reads back without a break*
|
|
1586
|
-
in [`mechanism_spec.rb`](../spec/badline/
|
|
1615
|
+
in [`mechanism_spec.rb`](../spec/badline/drives/model1541/mechanism_spec.rb).
|
|
1587
1616
|
- A disk made from a `.d64` starts sector 0 of each track where the DOS's
|
|
1588
1617
|
`N:` leaves it: track 1 at the index angle, and each track after it
|
|
1589
1618
|
round from the last by the skew `N:` leaves in its zone, 0.6869 of a
|
|
@@ -1600,7 +1629,7 @@ wasn't read.
|
|
|
1600
1629
|
the same skew made them read track 4 as error 27, which is why
|
|
1601
1630
|
`skew1` failed before.
|
|
1602
1631
|
- Spec guard: *starts sector 0 of track N where the DOS's N: leaves
|
|
1603
|
-
it* in [`disk_spec.rb`](../spec/badline/
|
|
1632
|
+
it* in [`disk_spec.rb`](../spec/badline/drives/model1541/disk_spec.rb).
|
|
1604
1633
|
- The CPU sees BYTE READY on SO a cycle late: BYTE READY sets V for the
|
|
1605
1634
|
next cycle's instruction step, not the one in the cycle it falls in.
|
|
1606
1635
|
- Pinned by `drive/hls-protection`. Its drive code counts the bytes
|
|
@@ -1617,7 +1646,7 @@ wasn't read.
|
|
|
1617
1646
|
the test expects.
|
|
1618
1647
|
- Spec guard: *sets V through SO while CA2 is high, a cycle after BYTE
|
|
1619
1648
|
READY* in
|
|
1620
|
-
[`mechanism_spec.rb`](../spec/badline/
|
|
1649
|
+
[`mechanism_spec.rb`](../spec/badline/drives/model1541/mechanism_spec.rb).
|
|
1621
1650
|
|
|
1622
1651
|
## REU DMA
|
|
1623
1652
|
|
|
@@ -1629,7 +1658,7 @@ testprogs named.
|
|
|
1629
1658
|
`REU/xfertiming` row and `REU/reutiming/reutiming`. /DMA takes the bus
|
|
1630
1659
|
from the CPU from the cycle after the request, even while the REC waits
|
|
1631
1660
|
for BA, and RDY only halts the CPU on a read, so a write the CPU makes
|
|
1632
|
-
then goes nowhere (`
|
|
1661
|
+
then goes nowhere (`C64::Bus#cycle_cpu_off_bus`). That is how an `INC
|
|
1633
1662
|
$FF00` starts an armed transfer without its second write reaching RAM.
|
|
1634
1663
|
Pinned by `REU/rmw-trigger/rmwtrigger-ram` and `rmwtrigger-rom`.
|
|
1635
1664
|
- After reading C64 memory the REC waits out every BA-low cycle. After
|
|
@@ -1704,7 +1733,7 @@ testprogs named.
|
|
|
1704
1733
|
documented `$00`/`$ff` because of it.
|
|
1705
1734
|
- Pinned by `SID/oscinit` (all three).
|
|
1706
1735
|
- Spec guard: *leaves the SID's accumulators alone* in
|
|
1707
|
-
[`
|
|
1736
|
+
[`c64_spec.rb`](../spec/badline/c64_spec.rb). The testbench
|
|
1708
1737
|
only runs `SID/oscinit` from power-on, so only the spec catches a reset
|
|
1709
1738
|
that rebuilds the voices.
|
|
1710
1739
|
- Ring modulation substitutes the triangle's MSB with
|
|
@@ -1736,9 +1765,9 @@ testprogs named.
|
|
|
1736
1765
|
The test pins the delay only. Phase 1's float differs from pulling down
|
|
1737
1766
|
only when pulse+noise is selected across it, and nothing pins that.
|
|
1738
1767
|
- Spec guard: *two cycles after accumulator bit 19 rises* and *around a
|
|
1739
|
-
shift* in [`sid/waveform_spec.rb`](../spec/badline/sid/waveform_spec.rb),
|
|
1768
|
+
shift* in [`sid/waveform_spec.rb`](../spec/badline/chips/sid/waveform_spec.rb),
|
|
1740
1769
|
and *carries a noise shift pending across a span edge* in
|
|
1741
|
-
[`sid_spec.rb`](../spec/badline/sid_spec.rb): a catch-up that
|
|
1770
|
+
[`sid_spec.rb`](../spec/badline/chips/sid_spec.rb): a catch-up that
|
|
1742
1771
|
fast-forwards across a rise carries the shift still in flight into the
|
|
1743
1772
|
next span.
|
|
1744
1773
|
- Setting the test bit onto noise combined with another waveform writes
|
|
@@ -1752,7 +1781,7 @@ testprogs named.
|
|
|
1752
1781
|
shift's phase 2 (below). Pinned by `SID/wf12nsr`'s pulse+noise row,
|
|
1753
1782
|
which sets the test bit onto pulse+noise.
|
|
1754
1783
|
- Spec guard: *as the test bit rises* in
|
|
1755
|
-
[`sid/waveform_spec.rb`](../spec/badline/sid/waveform_spec.rb).
|
|
1784
|
+
[`sid/waveform_spec.rb`](../spec/badline/chips/sid/waveform_spec.rb).
|
|
1756
1785
|
- The test bit does not clear the LFSR. It stalls it halfway through a
|
|
1757
1786
|
shift with bit 22 forced high. While the bit is held, every bit bleeds up
|
|
1758
1787
|
to `$7fffff`: after `$950000` cycles on the 8580 (`SID/bitfade`'s
|
|
@@ -1772,7 +1801,7 @@ testprogs named.
|
|
|
1772
1801
|
that varies with the chip's temperature (`SID/wf12nsr`'s
|
|
1773
1802
|
`quicktest.prg` on a 6581), which nothing scored depends on.
|
|
1774
1803
|
- Spec guard: *bleeding through a held test bit* in
|
|
1775
|
-
[`sid/waveform_spec.rb`](../spec/badline/sid/waveform_spec.rb).
|
|
1804
|
+
[`sid/waveform_spec.rb`](../spec/badline/chips/sid/waveform_spec.rb).
|
|
1776
1805
|
- Before the bit clocks in on release, the old waveform's output is
|
|
1777
1806
|
written back only for some waveform changes. Noise has to have been
|
|
1778
1807
|
combined before the release and still be combined after it, so a change
|
|
@@ -1800,7 +1829,7 @@ testprogs named.
|
|
|
1800
1829
|
`SID/wb_testsuite/samplings`, both chips, reads `F`→`8` as a plain
|
|
1801
1830
|
shift.
|
|
1802
1831
|
- Spec guard: *as the test bit falls* in
|
|
1803
|
-
[`sid/waveform_spec.rb`](../spec/badline/sid/waveform_spec.rb).
|
|
1832
|
+
[`sid/waveform_spec.rb`](../spec/badline/chips/sid/waveform_spec.rb).
|
|
1804
1833
|
- A combined waveform shorts the shapers onto the lines the oscillator reads
|
|
1805
1834
|
back. A low top bit reaches the accumulator MSB through the sawtooth
|
|
1806
1835
|
switch and clears it (`SID/osc_topbit`, all three). With noise selected,
|
|
@@ -1816,7 +1845,7 @@ testprogs named.
|
|
|
1816
1845
|
Noise is ANDed over triangle and sawtooth mixes; pulse+noise is below.
|
|
1817
1846
|
- Not pinned by an exit code: oscsample only scores the single
|
|
1818
1847
|
waveforms, and no scored test reads a combined shape without noise.
|
|
1819
|
-
- Spec guard: [`sid/waveform/combined_spec.rb`](../spec/badline/sid/waveform/combined_spec.rb)
|
|
1848
|
+
- Spec guard: [`sid/waveform/combined_spec.rb`](../spec/badline/chips/sid/waveform/combined_spec.rb)
|
|
1820
1849
|
checks spot values against the dumps.
|
|
1821
1850
|
- Noise in a combined waveform writes its lines back into the LFSR by a
|
|
1822
1851
|
lower threshold than OSC3 reads them by. Two rules follow, both fitted to
|
|
@@ -1862,7 +1891,7 @@ testprogs named.
|
|
|
1862
1891
|
pulse+noise on the 8580*, *reads nothing of pulse+noise on the 6581*,
|
|
1863
1892
|
*with pulse+noise on the 6581*, *as the test bit rises* and *as the
|
|
1864
1893
|
test bit falls* in
|
|
1865
|
-
[`sid/waveform_spec.rb`](../spec/badline/sid/waveform_spec.rb).
|
|
1894
|
+
[`sid/waveform_spec.rb`](../spec/badline/chips/sid/waveform_spec.rb).
|
|
1866
1895
|
- The pulse comparator's output reaches the lines a cycle after the
|
|
1867
1896
|
accumulator it compared, on both chips. Setting the test bit forces it
|
|
1868
1897
|
high at once.
|
|
@@ -1872,7 +1901,7 @@ testprogs named.
|
|
|
1872
1901
|
whose OSC3 reads the phase itself a cycle late. Comparing on time fails
|
|
1873
1902
|
both `waveforms-40` rows.
|
|
1874
1903
|
- Spec guard: *reaches the output a cycle after the accumulator it
|
|
1875
|
-
compared* in [`sid/waveform_spec.rb`](../spec/badline/sid/waveform_spec.rb).
|
|
1904
|
+
compared* in [`sid/waveform_spec.rb`](../spec/badline/chips/sid/waveform_spec.rb).
|
|
1876
1905
|
- Waveform 0 leaves the DAC input floating. It holds the last value a shaper
|
|
1877
1906
|
drove onto it and drains to `$000` after `$4000` cycles.
|
|
1878
1907
|
- Pinned by `SID/osc3-wave0`. `SID/oscinit`'s `allinit` pins the power-on
|
|
@@ -1886,20 +1915,20 @@ testprogs named.
|
|
|
1886
1915
|
a `$ffff` sawtooth and reads OSC3 four cycles later: `3` on the 6581,
|
|
1887
1916
|
`2` on the 8580.
|
|
1888
1917
|
- Spec guard: *#osc3 on the 8580* in
|
|
1889
|
-
[`sid/waveform_spec.rb`](../spec/badline/sid/waveform_spec.rb) and
|
|
1890
|
-
*the 8580* in [`sid_spec.rb`](../spec/badline/sid_spec.rb).
|
|
1918
|
+
[`sid/waveform_spec.rb`](../spec/badline/chips/sid/waveform_spec.rb) and
|
|
1919
|
+
*the 8580* in [`sid_spec.rb`](../spec/badline/chips/sid_spec.rb).
|
|
1891
1920
|
|
|
1892
1921
|
## SID register writes
|
|
1893
1922
|
|
|
1894
1923
|
- The 6581 latches a register write one cycle late. That falls out of the
|
|
1895
|
-
bus order, not from any delay line inside `SID`. `
|
|
1924
|
+
bus order, not from any delay line inside `SID`. `C64#cycle!` clocks
|
|
1896
1925
|
the SID ahead of the CPU, so a write on cycle N first reaches the DSP on
|
|
1897
1926
|
cycle N+1, while a read on cycle N sees N cycles of clocking. Moving
|
|
1898
1927
|
`sid.cycle!` after `cpu.cycle!` breaks this.
|
|
1899
1928
|
- Pinned by `SID/writedelay`, which reads OSC3 four cycles after releasing
|
|
1900
1929
|
the test bit and expects the pulse already high.
|
|
1901
1930
|
- Spec guard: *SID writes against the clock order* in
|
|
1902
|
-
[`
|
|
1931
|
+
[`c64_spec.rb`](../spec/badline/c64_spec.rb). It runs an
|
|
1903
1932
|
`STA $d400` and checks that the DSP has not clocked the new frequency on
|
|
1904
1933
|
the store's own cycle, over both the synthesizing and the idle-replay
|
|
1905
1934
|
paths.
|
|
@@ -1957,7 +1986,7 @@ testprogs named.
|
|
|
1957
1986
|
- Spec guard: *gate edge*, *attack*, *#env3*, *exponential divider*,
|
|
1958
1987
|
*gate falling with a step in flight* and *gate rising as the rate
|
|
1959
1988
|
counter matches* in
|
|
1960
|
-
[`sid/envelope_spec.rb`](../spec/badline/sid/envelope_spec.rb). Its
|
|
1989
|
+
[`sid/envelope_spec.rb`](../spec/badline/chips/sid/envelope_spec.rb). Its
|
|
1961
1990
|
*#fast_forward* examples hold the batched catch-up to the same timing:
|
|
1962
1991
|
between steps a span jumps from one match to the next, and the cycles
|
|
1963
1992
|
around each step run whole.
|
|
@@ -1974,17 +2003,17 @@ testprogs named.
|
|
|
1974
2003
|
- Derived against six OneLoad64 tunes (Galway, Tel, Gray, Dunn, Cooksey).
|
|
1975
2004
|
Green Beret's init sits at `$9fe3` and calls its own code at `$aaca`,
|
|
1976
2005
|
which forces the `$36` below `$a000`.
|
|
1977
|
-
`
|
|
2006
|
+
`SIDTune::File#bank_for` is the one copy of the map: `Driver` wraps both calls
|
|
1978
2007
|
in a `$01` save/bank/restore, and `BarePlayer#dispatch` pokes it before
|
|
1979
2008
|
handing the CPU the stub.
|
|
1980
2009
|
- Spec guard, at both ends: *a tune living under the BASIC ROM* in
|
|
1981
2010
|
[`audio/renderer_spec.rb`](../spec/badline/audio/renderer_spec.rb) (a
|
|
1982
2011
|
fixture at `$a000` that reads peak=0 without the `$01` write), and the
|
|
1983
2012
|
*#driver for a tune under BASIC* and *#bank_for* groups in
|
|
1984
|
-
[`
|
|
2013
|
+
[`sid_tune/file_spec.rb`](../spec/badline/sid_tune/file_spec.rb).
|
|
1985
2014
|
- The boot stub never returns to its caller: after `cli` it spins on
|
|
1986
2015
|
`jmp *` (PSID and RSID). BASIC's READY loop reuses zero page `$19`–`$21`,
|
|
1987
2016
|
which a tune owns. Wizball (Ocean Loader 1) keeps its music-enable flag
|
|
1988
2017
|
in `$19` and goes silent when BASIC writes `$0a` there.
|
|
1989
2018
|
- Spec guard:
|
|
1990
|
-
[`
|
|
2019
|
+
[`sid_tune/file/driver_spec.rb`](../spec/badline/sid_tune/file/driver_spec.rb).
|