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