Player Sprite ASM Example

Animating & Displaying Exported Sprite Data on Real Z80 Hardware
by Norbert of Norbsoft

This example pairs the exported mr_soft_sprite.asm data file with a short demo program that bounces the sprite across the screen on real Z80 hardware. See also the UDG ASM Example and the Z80 Assembly Introduction for the assembly workflow used here.

Player Sprite: Animating a Software Sprite

[Back to top]

The Player Sprite Editor exports a sprite as a set of labelled defb blocks — one block per animation frame and per pre-shift level — together with address lookup tables and an attribute record. mr_soft_demo.asm is a companion program that includes that exported file and animates the sprite across the middle of the screen: it bounces left and right at 50 Hz, cycles through five walk-cycle frames, and uses interleaved mask/sprite bytes to composite the character over the background without leaving a black rectangle behind it.

The Exported Data: mr_soft_sprite.asm

The sprite bundled with this example is 16×24 pixels (2×3 character cells), has 5 animation frames, and is pre-shifted at all 8 sub-character positions (pixel offsets 0–7). Label names follow the convention mr_soft_frameN_shiftM: N is the animation frame (0–4), M is the pixel shift (0–7).

Mask format is interleaved: each sprite byte is immediately preceded by its mask byte, giving the in-memory sequence mask, sprite, mask, sprite, …. A single advancing IX pointer consumes both values without maintaining a separate mask pointer.

The byte layout differs between shift 0 and shifts 1–7, because only a shifted sprite spills into a third screen character column:

  • Shift 0 — the sprite lands exactly on a character boundary and occupies exactly 2 screen columns. Each column section holds 24 mask/sprite pairs (48 bytes), one pair per scan line.
  • Shifts 1–7 — the shifted sprite spills into a third screen column. Each column section holds 24 mask/sprite quads (96 bytes): mask_left, sprite_left, mask_right, sprite_right per scan line, covering two consecutive screen character columns in a single pass.
; Software Sprite Export
; Size: 16×24 (2x3 chars)
; Frames: 5
; Pre-shifts: 8 (0-7 pixels)
; Mask: Interleaved (sprite-mask pairs)

mr_soft_frame0_shift0:
; Column 0
    defb $f8, $07
    defb $f3, $0c
    defb $f7, $08
    defb $f7, $08
    defb $f7, $08
    defb $f7, $08
    defb $f3, $0c
    defb $f8, $07
    defb $fc, $03
    defb $fc, $03
    defb $fc, $03
    defb $f8, $07
    defb $f2, $0d
    defb $f6, $09
    defb $fe, $01
    defb $fe, $01
    defb $fe, $01
    defb $fc, $03
    defb $fd, $02
    defb $fb, $04
    defb $f3, $0c
    defb $ef, $10
    defb $f7, $08
    defb $fb, $04
; Column 1
    defb $3f, $c0
    defb $9f, $60
    defb $df, $20
    defb $df, $20
    defb $df, $20
    defb $df, $20
    defb $9f, $60
    defb $3f, $c0
    defb $7f, $80
    defb $7f, $80
    defb $3f, $c0
    defb $df, $20
    defb $cf, $30
    defb $ef, $10
    defb $ff, $00
    defb $ff, $00
    defb $ff, $00
    defb $7f, $80
    defb $bf, $40
    defb $df, $20
    defb $ef, $10
    defb $f7, $08
    defb $f9, $06
    defb $fb, $04

mr_soft_frame0_shift1:
; Column 0
    defb $fc, $03, $7f, $80
    defb $f9, $06, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fc, $03, $7f, $80
    defb $f9, $06, $7f, $80
    defb $fb, $04, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fd, $02, $ff, $00
    defb $f9, $06, $ff, $00
    defb $f7, $08, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fd, $02, $ff, $00
; Column 1
    defb $9f, $60, $ff, $00
    defb $cf, $30, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $cf, $30, $ff, $00
    defb $9f, $60, $ff, $00
    defb $bf, $40, $ff, $00
    defb $bf, $40, $ff, $00
    defb $9f, $60, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f7, $08, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $bf, $40, $ff, $00
    defb $df, $20, $ff, $00
    defb $ef, $10, $ff, $00
    defb $f7, $08, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00

mr_soft_frame0_shift2:
; Column 0
    defb $fe, $01, $3f, $c0
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $3f, $c0
    defb $fc, $03, $bf, $40
    defb $fd, $02, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $ff, $00
; Column 1
    defb $cf, $30, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $e7, $18, $ff, $00
    defb $cf, $30, $ff, $00
    defb $df, $20, $ff, $00
    defb $df, $20, $ff, $00
    defb $cf, $30, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $df, $20, $ff, $00
    defb $ef, $10, $ff, $00
    defb $f7, $08, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00

mr_soft_frame0_shift3:
; Column 0
    defb $ff, $00, $1f, $e0
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $1f, $e0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $1f, $e0
    defb $fe, $01, $5f, $a0
    defb $fe, $01, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fd, $02, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $7f, $80
; Column 1
    defb $e7, $18, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $e7, $18, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fd, $02, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ef, $10, $ff, $00
    defb $f7, $08, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80

mr_soft_frame0_shift4:
; Column 0
    defb $ff, $00, $8f, $70
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $8f, $70
    defb $ff, $00, $cf, $30
    defb $ff, $00, $cf, $30
    defb $ff, $00, $cf, $30
    defb $ff, $00, $8f, $70
    defb $ff, $00, $2f, $d0
    defb $ff, $00, $6f, $90
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $ff, $00
    defb $ff, $00, $7f, $80
    defb $ff, $00, $bf, $40
; Column 1
    defb $f3, $0c, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $f9, $06, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $f7, $08, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $7f, $80
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40

mr_soft_frame0_shift5:
; Column 0
    defb $ff, $00, $c7, $38
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $9f, $60
    defb $ff, $00, $c7, $38
    defb $ff, $00, $e7, $18
    defb $ff, $00, $e7, $18
    defb $ff, $00, $e7, $18
    defb $ff, $00, $c7, $38
    defb $ff, $00, $97, $68
    defb $ff, $00, $b7, $48
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $ff, $00, $7f, $80
    defb $ff, $00, $bf, $40
    defb $ff, $00, $df, $20
; Column 1
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fc, $03, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $7f, $80
    defb $ff, $00, $bf, $40
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20

mr_soft_frame0_shift6:
; Column 0
    defb $ff, $00, $e3, $1c
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $cf, $30
    defb $ff, $00, $e3, $1c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $e3, $1c
    defb $ff, $00, $cb, $34
    defb $ff, $00, $db, $24
    defb $ff, $00, $fb, $04
    defb $ff, $00, $fb, $04
    defb $ff, $00, $fb, $04
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f7, $08
    defb $ff, $00, $ef, $10
    defb $ff, $00, $cf, $30
    defb $ff, $00, $bf, $40
    defb $ff, $00, $df, $20
    defb $ff, $00, $ef, $10
; Column 1
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $7f, $80
    defb $ff, $00, $bf, $40
    defb $ff, $00, $df, $20
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10

mr_soft_frame0_shift7:
; Column 0
    defb $ff, $00, $f1, $0e
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $e7, $18
    defb $ff, $00, $f1, $0e
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f1, $0e
    defb $ff, $00, $e5, $1a
    defb $ff, $00, $ed, $12
    defb $ff, $00, $fd, $02
    defb $ff, $00, $fd, $02
    defb $ff, $00, $fd, $02
    defb $ff, $00, $f9, $06
    defb $ff, $00, $fb, $04
    defb $ff, $00, $f7, $08
    defb $ff, $00, $e7, $18
    defb $ff, $00, $df, $20
    defb $ff, $00, $ef, $10
    defb $ff, $00, $f7, $08
; Column 1
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $bf, $40
    defb $ff, $00, $9f, $60
    defb $ff, $00, $df, $20
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $7f, $80
    defb $ff, $00, $bf, $40
    defb $ff, $00, $df, $20
    defb $ff, $00, $ef, $10
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f7, $08

mr_soft_frame1_shift0:
; Column 0
    defb $ff, $00
    defb $ff, $00
    defb $f8, $07
    defb $f3, $0c
    defb $f7, $08
    defb $f7, $08
    defb $f7, $08
    defb $f3, $0c
    defb $f9, $06
    defb $fc, $03
    defb $fc, $03
    defb $f8, $07
    defb $f2, $0d
    defb $ce, $31
    defb $de, $21
    defb $fe, $01
    defb $fe, $01
    defb $fc, $03
    defb $fd, $02
    defb $f9, $06
    defb $e3, $1c
    defb $8f, $70
    defb $bf, $40
    defb $9f, $60
; Column 1
    defb $ff, $00
    defb $ff, $00
    defb $1f, $e0
    defb $df, $20
    defb $df, $20
    defb $df, $20
    defb $df, $20
    defb $cf, $30
    defb $cf, $30
    defb $3f, $c0
    defb $7f, $80
    defb $7f, $80
    defb $bf, $40
    defb $9f, $60
    defb $cf, $30
    defb $e7, $18
    defb $ff, $00
    defb $7f, $80
    defb $3f, $c0
    defb $8f, $70
    defb $ef, $10
    defb $cf, $30
    defb $cf, $30
    defb $e7, $18

mr_soft_frame1_shift1:
; Column 0
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fc, $03, $7f, $80
    defb $f9, $06, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fc, $03, $7f, $80
    defb $f9, $06, $7f, $80
    defb $e7, $18, $7f, $80
    defb $ef, $10, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fc, $03, $ff, $00
    defb $f1, $0e, $ff, $00
    defb $c7, $38, $ff, $00
    defb $df, $20, $ff, $00
    defb $cf, $30, $ff, $00
; Column 1
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $8f, $70, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $e7, $18, $ff, $00
    defb $9f, $60, $ff, $00
    defb $bf, $40, $ff, $00
    defb $bf, $40, $ff, $00
    defb $df, $20, $ff, $00
    defb $cf, $30, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $ff, $00, $ff, $00
    defb $bf, $40, $ff, $00
    defb $9f, $60, $ff, $00
    defb $c7, $38, $ff, $00
    defb $f7, $08, $ff, $00
    defb $e7, $18, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f3, $0c, $ff, $00

mr_soft_frame1_shift2:
; Column 0
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fe, $01, $3f, $c0
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $3f, $c0
    defb $fc, $03, $bf, $40
    defb $f3, $0c, $bf, $40
    defb $f7, $08, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $f8, $07, $ff, $00
    defb $e3, $1c, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
; Column 1
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $c7, $38, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $cf, $30, $ff, $00
    defb $df, $20, $ff, $00
    defb $df, $20, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f9, $06, $ff, $00
    defb $ff, $00, $ff, $00
    defb $df, $20, $ff, $00
    defb $cf, $30, $ff, $00
    defb $e3, $1c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f9, $06, $ff, $00

mr_soft_frame1_shift3:
; Column 0
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $1f, $e0
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $1f, $e0
    defb $fe, $01, $5f, $a0
    defb $f9, $06, $df, $20
    defb $fb, $04, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $fc, $03, $7f, $80
    defb $f1, $0e, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
; Column 1
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $e3, $1c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $f9, $06, $ff, $00
    defb $e7, $18, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f1, $0e, $ff, $00
    defb $fd, $02, $ff, $00
    defb $f9, $06, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00

mr_soft_frame1_shift4:
; Column 0
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $8f, $70
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $cf, $30
    defb $ff, $00, $cf, $30
    defb $ff, $00, $8f, $70
    defb $ff, $00, $2f, $d0
    defb $fc, $03, $ef, $10
    defb $fd, $02, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $fe, $01, $3f, $c0
    defb $f8, $07, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
; Column 1
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $f1, $0e, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fc, $03, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f8, $07, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80

mr_soft_frame1_shift5:
; Column 0
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $c7, $38
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $9f, $60
    defb $ff, $00, $cf, $30
    defb $ff, $00, $e7, $18
    defb $ff, $00, $e7, $18
    defb $ff, $00, $c7, $38
    defb $ff, $00, $97, $68
    defb $fe, $01, $77, $88
    defb $fe, $01, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10
    defb $ff, $00, $cf, $30
    defb $ff, $00, $1f, $e0
    defb $fc, $03, $7f, $80
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
; Column 1
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $f8, $07, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $f9, $06, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0

mr_soft_frame1_shift6:
; Column 0
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $e3, $1c
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $cf, $30
    defb $ff, $00, $e7, $18
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $e3, $1c
    defb $ff, $00, $cb, $34
    defb $ff, $00, $3b, $c4
    defb $ff, $00, $7b, $84
    defb $ff, $00, $fb, $04
    defb $ff, $00, $fb, $04
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f7, $08
    defb $ff, $00, $e7, $18
    defb $ff, $00, $8f, $70
    defb $fe, $01, $3f, $c0
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
; Column 1
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fc, $03, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $9f, $60

mr_soft_frame1_shift7:
; Column 0
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $f1, $0e
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $e7, $18
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f1, $0e
    defb $ff, $00, $e5, $1a
    defb $ff, $00, $9d, $62
    defb $ff, $00, $bd, $42
    defb $ff, $00, $fd, $02
    defb $ff, $00, $fd, $02
    defb $ff, $00, $f9, $06
    defb $ff, $00, $fb, $04
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $c7, $38
    defb $ff, $00, $1f, $e0
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
; Column 1
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fe, $01, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $cf, $30
    defb $ff, $00, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $1f, $e0
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $cf, $30

mr_soft_frame2_shift0:
; Column 0
    defb $fc, $03
    defb $f9, $06
    defb $fb, $04
    defb $f7, $08
    defb $f7, $08
    defb $f7, $08
    defb $f1, $0e
    defb $fc, $03
    defb $fc, $03
    defb $fc, $03
    defb $fc, $03
    defb $fc, $03
    defb $fa, $05
    defb $fa, $05
    defb $fa, $05
    defb $fe, $01
    defb $fe, $01
    defb $fe, $01
    defb $fe, $01
    defb $fe, $01
    defb $f0, $0f
    defb $e6, $19
    defb $ee, $11
    defb $fe, $01
; Column 1
    defb $3f, $c0
    defb $bf, $40
    defb $df, $20
    defb $df, $20
    defb $df, $20
    defb $df, $20
    defb $bf, $40
    defb $3f, $c0
    defb $ff, $00
    defb $7f, $80
    defb $7f, $80
    defb $7f, $80
    defb $3f, $c0
    defb $bf, $40
    defb $bf, $40
    defb $7f, $80
    defb $7f, $80
    defb $bf, $40
    defb $9f, $60
    defb $7f, $80
    defb $ff, $00
    defb $ff, $00
    defb $ff, $00
    defb $3f, $c0

mr_soft_frame2_shift1:
; Column 0
    defb $fe, $01, $7f, $80
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f8, $07, $ff, $00
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fd, $02, $7f, $80
    defb $fd, $02, $7f, $80
    defb $fd, $02, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $f8, $07, $7f, $80
    defb $f3, $0c, $7f, $80
    defb $f7, $08, $7f, $80
    defb $ff, $00, $7f, $80
; Column 1
    defb $9f, $60, $ff, $00
    defb $df, $20, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $df, $20, $ff, $00
    defb $9f, $60, $ff, $00
    defb $ff, $00, $ff, $00
    defb $bf, $40, $ff, $00
    defb $bf, $40, $ff, $00
    defb $bf, $40, $ff, $00
    defb $9f, $60, $ff, $00
    defb $df, $20, $ff, $00
    defb $df, $20, $ff, $00
    defb $bf, $40, $ff, $00
    defb $bf, $40, $ff, $00
    defb $df, $20, $ff, $00
    defb $cf, $30, $ff, $00
    defb $bf, $40, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $9f, $60, $ff, $00

mr_soft_frame2_shift2:
; Column 0
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $bf, $40
    defb $fe, $01, $bf, $40
    defb $fe, $01, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $fc, $03, $3f, $c0
    defb $f9, $06, $bf, $40
    defb $fb, $04, $bf, $40
    defb $ff, $00, $bf, $40
; Column 1
    defb $cf, $30, $ff, $00
    defb $ef, $10, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $ef, $10, $ff, $00
    defb $cf, $30, $ff, $00
    defb $ff, $00, $ff, $00
    defb $df, $20, $ff, $00
    defb $df, $20, $ff, $00
    defb $df, $20, $ff, $00
    defb $cf, $30, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $df, $20, $ff, $00
    defb $df, $20, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $df, $20, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $cf, $30, $ff, $00

mr_soft_frame2_shift3:
; Column 0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $3f, $c0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $5f, $a0
    defb $ff, $00, $5f, $a0
    defb $ff, $00, $5f, $a0
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $fe, $01, $1f, $e0
    defb $fc, $03, $df, $20
    defb $fd, $02, $df, $20
    defb $ff, $00, $df, $20
; Column 1
    defb $e7, $18, $ff, $00
    defb $f7, $08, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f7, $08, $ff, $00
    defb $e7, $18, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $e7, $18, $ff, $00

mr_soft_frame2_shift4:
; Column 0
    defb $ff, $00, $cf, $30
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $1f, $e0
    defb $ff, $00, $cf, $30
    defb $ff, $00, $cf, $30
    defb $ff, $00, $cf, $30
    defb $ff, $00, $cf, $30
    defb $ff, $00, $cf, $30
    defb $ff, $00, $af, $50
    defb $ff, $00, $af, $50
    defb $ff, $00, $af, $50
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $0f, $f0
    defb $fe, $01, $6f, $90
    defb $fe, $01, $ef, $10
    defb $ff, $00, $ef, $10
; Column 1
    defb $f3, $0c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $ff, $00, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $f7, $08, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $f3, $0c, $ff, $00

mr_soft_frame2_shift5:
; Column 0
    defb $ff, $00, $e7, $18
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $8f, $70
    defb $ff, $00, $e7, $18
    defb $ff, $00, $e7, $18
    defb $ff, $00, $e7, $18
    defb $ff, $00, $e7, $18
    defb $ff, $00, $e7, $18
    defb $ff, $00, $d7, $28
    defb $ff, $00, $d7, $28
    defb $ff, $00, $d7, $28
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $87, $78
    defb $ff, $00, $37, $c8
    defb $ff, $00, $77, $88
    defb $ff, $00, $f7, $08
; Column 1
    defb $f9, $06, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fd, $02, $ff, $00
    defb $f9, $06, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fb, $04, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $f9, $06, $ff, $00

mr_soft_frame2_shift6:
; Column 0
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $c7, $38
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $eb, $14
    defb $ff, $00, $eb, $14
    defb $ff, $00, $eb, $14
    defb $ff, $00, $fb, $04
    defb $ff, $00, $fb, $04
    defb $ff, $00, $fb, $04
    defb $ff, $00, $fb, $04
    defb $ff, $00, $fb, $04
    defb $ff, $00, $c3, $3c
    defb $ff, $00, $9b, $64
    defb $ff, $00, $bb, $44
    defb $ff, $00, $fb, $04
; Column 1
    defb $fc, $03, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fc, $03, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $fd, $02, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fc, $03, $ff, $00

mr_soft_frame2_shift7:
; Column 0
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f7, $08
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $e3, $1c
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f5, $0a
    defb $ff, $00, $f5, $0a
    defb $ff, $00, $f5, $0a
    defb $ff, $00, $fd, $02
    defb $ff, $00, $fd, $02
    defb $ff, $00, $fd, $02
    defb $ff, $00, $fd, $02
    defb $ff, $00, $fd, $02
    defb $ff, $00, $e1, $1e
    defb $ff, $00, $cd, $32
    defb $ff, $00, $dd, $22
    defb $ff, $00, $fd, $02
; Column 1
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $ff, $00, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fe, $01, $7f, $80

mr_soft_frame3_shift0:
; Column 0
    defb $fc, $03
    defb $f3, $0c
    defb $f7, $08
    defb $f3, $0c
    defb $f8, $07
    defb $fe, $01
    defb $fc, $03
    defb $fc, $03
    defb $fa, $05
    defb $f2, $0d
    defb $f2, $0d
    defb $fa, $05
    defb $fc, $03
    defb $fe, $01
    defb $fe, $01
    defb $fc, $03
    defb $fd, $02
    defb $f9, $06
    defb $fb, $04
    defb $f7, $08
    defb $e7, $18
    defb $ef, $10
    defb $ef, $10
    defb $c3, $3c
; Column 1
    defb $3f, $c0
    defb $9f, $60
    defb $df, $20
    defb $df, $20
    defb $df, $20
    defb $1f, $e0
    defb $ff, $00
    defb $7f, $80
    defb $7f, $80
    defb $3f, $c0
    defb $9f, $60
    defb $df, $20
    defb $cf, $30
    defb $ef, $10
    defb $ff, $00
    defb $7f, $80
    defb $9f, $60
    defb $cf, $30
    defb $ef, $10
    defb $cf, $30
    defb $df, $20
    defb $9f, $60
    defb $8f, $70
    defb $ff, $00

mr_soft_frame3_shift1:
; Column 0
    defb $fe, $01, $7f, $80
    defb $f9, $06, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fd, $02, $7f, $80
    defb $f9, $06, $7f, $80
    defb $f9, $06, $7f, $80
    defb $fd, $02, $7f, $80
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $e1, $1e, $ff, $00
; Column 1
    defb $9f, $60, $ff, $00
    defb $cf, $30, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $8f, $70, $ff, $00
    defb $ff, $00, $ff, $00
    defb $bf, $40, $ff, $00
    defb $bf, $40, $ff, $00
    defb $9f, $60, $ff, $00
    defb $cf, $30, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f7, $08, $ff, $00
    defb $ff, $00, $ff, $00
    defb $bf, $40, $ff, $00
    defb $cf, $30, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f7, $08, $ff, $00
    defb $e7, $18, $ff, $00
    defb $ef, $10, $ff, $00
    defb $cf, $30, $ff, $00
    defb $c7, $38, $ff, $00
    defb $ff, $00, $ff, $00

mr_soft_frame3_shift2:
; Column 0
    defb $ff, $00, $3f, $c0
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $bf, $40
    defb $fc, $03, $bf, $40
    defb $fc, $03, $bf, $40
    defb $fe, $01, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fd, $02, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f0, $0f, $ff, $00
; Column 1
    defb $cf, $30, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $c7, $38, $ff, $00
    defb $ff, $00, $ff, $00
    defb $df, $20, $ff, $00
    defb $df, $20, $ff, $00
    defb $cf, $30, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $ff, $00, $ff, $00
    defb $df, $20, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f7, $08, $ff, $00
    defb $e7, $18, $ff, $00
    defb $e3, $1c, $ff, $00
    defb $ff, $00, $ff, $00

mr_soft_frame3_shift3:
; Column 0
    defb $ff, $00, $9f, $60
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $1f, $e0
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $5f, $a0
    defb $fe, $01, $5f, $a0
    defb $fe, $01, $5f, $a0
    defb $ff, $00, $5f, $a0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $f8, $07, $7f, $80
; Column 1
    defb $e7, $18, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $e3, $1c, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fd, $02, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ef, $10, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fd, $02, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f1, $0e, $ff, $00
    defb $ff, $00, $ff, $00

mr_soft_frame3_shift4:
; Column 0
    defb $ff, $00, $cf, $30
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $8f, $70
    defb $ff, $00, $ef, $10
    defb $ff, $00, $cf, $30
    defb $ff, $00, $cf, $30
    defb $ff, $00, $af, $50
    defb $ff, $00, $2f, $d0
    defb $ff, $00, $2f, $d0
    defb $ff, $00, $af, $50
    defb $ff, $00, $cf, $30
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fc, $03, $3f, $c0
; Column 1
    defb $f3, $0c, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $f1, $0e, $ff, $00
    defb $ff, $00, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $f9, $06, $ff, $00
    defb $f8, $07, $ff, $00
    defb $ff, $00, $ff, $00

mr_soft_frame3_shift5:
; Column 0
    defb $ff, $00, $e7, $18
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $9f, $60
    defb $ff, $00, $c7, $38
    defb $ff, $00, $f7, $08
    defb $ff, $00, $e7, $18
    defb $ff, $00, $e7, $18
    defb $ff, $00, $d7, $28
    defb $ff, $00, $97, $68
    defb $ff, $00, $97, $68
    defb $ff, $00, $d7, $28
    defb $ff, $00, $e7, $18
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $1f, $e0
; Column 1
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $f8, $07, $ff, $00
    defb $ff, $00, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fc, $03, $7f, $80
    defb $ff, $00, $ff, $00

mr_soft_frame3_shift6:
; Column 0
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $cf, $30
    defb $ff, $00, $e3, $1c
    defb $ff, $00, $fb, $04
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $eb, $14
    defb $ff, $00, $cb, $34
    defb $ff, $00, $cb, $34
    defb $ff, $00, $eb, $14
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $fb, $04
    defb $ff, $00, $fb, $04
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f7, $08
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $0f, $f0
; Column 1
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fc, $03, $7f, $80
    defb $ff, $00, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $3f, $c0
    defb $ff, $00, $ff, $00

mr_soft_frame3_shift7:
; Column 0
    defb $ff, $00, $f9, $06
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10
    defb $ff, $00, $e7, $18
    defb $ff, $00, $f1, $0e
    defb $ff, $00, $fd, $02
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f5, $0a
    defb $ff, $00, $e5, $1a
    defb $ff, $00, $e5, $1a
    defb $ff, $00, $f5, $0a
    defb $ff, $00, $f9, $06
    defb $ff, $00, $fd, $02
    defb $ff, $00, $fd, $02
    defb $ff, $00, $f9, $06
    defb $ff, $00, $fb, $04
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f7, $08
    defb $ff, $00, $ef, $10
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $87, $78
; Column 1
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $fe, $01, $3f, $c0
    defb $ff, $00, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $9f, $60
    defb $ff, $00, $df, $20
    defb $ff, $00, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $1f, $e0
    defb $ff, $00, $ff, $00

mr_soft_frame4_shift0:
; Column 0
    defb $fc, $03
    defb $f3, $0c
    defb $f7, $08
    defb $f7, $08
    defb $f7, $08
    defb $f3, $0c
    defb $fb, $04
    defb $f8, $07
    defb $fc, $03
    defb $fc, $03
    defb $fc, $03
    defb $fa, $05
    defb $fa, $05
    defb $f2, $0d
    defb $f6, $09
    defb $fe, $01
    defb $fc, $03
    defb $fd, $02
    defb $fd, $02
    defb $fd, $02
    defb $f9, $06
    defb $e3, $1c
    defb $cf, $30
    defb $87, $78
; Column 1
    defb $7f, $80
    defb $1f, $e0
    defb $df, $20
    defb $df, $20
    defb $df, $20
    defb $cf, $30
    defb $8f, $70
    defb $3f, $c0
    defb $7f, $80
    defb $7f, $80
    defb $3f, $c0
    defb $3f, $c0
    defb $cf, $30
    defb $e7, $18
    defb $ff, $00
    defb $7f, $80
    defb $7f, $80
    defb $bf, $40
    defb $9f, $60
    defb $cf, $30
    defb $e7, $18
    defb $f7, $08
    defb $f1, $0e
    defb $fb, $04

mr_soft_frame4_shift1:
; Column 0
    defb $fe, $01, $7f, $80
    defb $f9, $06, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fd, $02, $7f, $80
    defb $fd, $02, $7f, $80
    defb $f9, $06, $7f, $80
    defb $fb, $04, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fc, $03, $ff, $00
    defb $f1, $0e, $ff, $00
    defb $e7, $18, $ff, $00
    defb $c3, $3c, $ff, $00
; Column 1
    defb $bf, $40, $ff, $00
    defb $8f, $70, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $c7, $38, $ff, $00
    defb $9f, $60, $ff, $00
    defb $bf, $40, $ff, $00
    defb $bf, $40, $ff, $00
    defb $9f, $60, $ff, $00
    defb $9f, $60, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $ff, $00, $ff, $00
    defb $bf, $40, $ff, $00
    defb $bf, $40, $ff, $00
    defb $df, $20, $ff, $00
    defb $cf, $30, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f8, $07, $ff, $00
    defb $fd, $02, $ff, $00

mr_soft_frame4_shift2:
; Column 0
    defb $ff, $00, $3f, $c0
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $bf, $40
    defb $fe, $01, $bf, $40
    defb $fc, $03, $bf, $40
    defb $fd, $02, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $fe, $01, $7f, $80
    defb $f8, $07, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $e1, $1e, $ff, $00
; Column 1
    defb $df, $20, $ff, $00
    defb $c7, $38, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $e3, $1c, $ff, $00
    defb $cf, $30, $ff, $00
    defb $df, $20, $ff, $00
    defb $df, $20, $ff, $00
    defb $cf, $30, $ff, $00
    defb $cf, $30, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f9, $06, $ff, $00
    defb $ff, $00, $ff, $00
    defb $df, $20, $ff, $00
    defb $df, $20, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $7f, $80
    defb $fe, $01, $ff, $00

mr_soft_frame4_shift3:
; Column 0
    defb $ff, $00, $9f, $60
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $1f, $e0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $9f, $60
    defb $ff, $00, $5f, $a0
    defb $ff, $00, $5f, $a0
    defb $fe, $01, $5f, $a0
    defb $fe, $01, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $3f, $c0
    defb $fc, $03, $7f, $80
    defb $f9, $06, $ff, $00
    defb $f0, $0f, $ff, $00
; Column 1
    defb $ef, $10, $ff, $00
    defb $e3, $1c, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $f1, $0e, $ff, $00
    defb $e7, $18, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $e7, $18, $ff, $00
    defb $e7, $18, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00
    defb $ff, $00, $ff, $00
    defb $ef, $10, $ff, $00
    defb $ef, $10, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $3f, $c0
    defb $ff, $00, $7f, $80

mr_soft_frame4_shift4:
; Column 0
    defb $ff, $00, $cf, $30
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $8f, $70
    defb $ff, $00, $cf, $30
    defb $ff, $00, $cf, $30
    defb $ff, $00, $cf, $30
    defb $ff, $00, $af, $50
    defb $ff, $00, $af, $50
    defb $ff, $00, $2f, $d0
    defb $ff, $00, $6f, $90
    defb $ff, $00, $ef, $10
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $9f, $60
    defb $fe, $01, $3f, $c0
    defb $fc, $03, $ff, $00
    defb $f8, $07, $7f, $80
; Column 1
    defb $f7, $08, $ff, $00
    defb $f1, $0e, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $f8, $07, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $f3, $0c, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $ff, $00
    defb $f7, $08, $ff, $00
    defb $f7, $08, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $1f, $e0
    defb $ff, $00, $bf, $40

mr_soft_frame4_shift5:
; Column 0
    defb $ff, $00, $e7, $18
    defb $ff, $00, $9f, $60
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $9f, $60
    defb $ff, $00, $df, $20
    defb $ff, $00, $c7, $38
    defb $ff, $00, $e7, $18
    defb $ff, $00, $e7, $18
    defb $ff, $00, $e7, $18
    defb $ff, $00, $d7, $28
    defb $ff, $00, $d7, $28
    defb $ff, $00, $97, $68
    defb $ff, $00, $b7, $48
    defb $ff, $00, $f7, $08
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $cf, $30
    defb $ff, $00, $1f, $e0
    defb $fe, $01, $7f, $80
    defb $fc, $03, $3f, $c0
; Column 1
    defb $fb, $04, $ff, $00
    defb $f8, $07, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $fc, $03, $7f, $80
    defb $f9, $06, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $f9, $06, $ff, $00
    defb $f9, $06, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fb, $04, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $8f, $70
    defb $ff, $00, $df, $20

mr_soft_frame4_shift6:
; Column 0
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $cf, $30
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $df, $20
    defb $ff, $00, $cf, $30
    defb $ff, $00, $ef, $10
    defb $ff, $00, $e3, $1c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $eb, $14
    defb $ff, $00, $eb, $14
    defb $ff, $00, $cb, $34
    defb $ff, $00, $db, $24
    defb $ff, $00, $fb, $04
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f7, $08
    defb $ff, $00, $e7, $18
    defb $ff, $00, $8f, $70
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $1f, $e0
; Column 1
    defb $fd, $02, $ff, $00
    defb $fc, $03, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $fe, $01, $3f, $c0
    defb $fc, $03, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fc, $03, $ff, $00
    defb $fc, $03, $ff, $00
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fd, $02, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $df, $20
    defb $ff, $00, $c7, $38
    defb $ff, $00, $ef, $10

mr_soft_frame4_shift7:
; Column 0
    defb $ff, $00, $f9, $06
    defb $ff, $00, $e7, $18
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $ef, $10
    defb $ff, $00, $e7, $18
    defb $ff, $00, $f7, $08
    defb $ff, $00, $f1, $0e
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f9, $06
    defb $ff, $00, $f5, $0a
    defb $ff, $00, $f5, $0a
    defb $ff, $00, $e5, $1a
    defb $ff, $00, $ed, $12
    defb $ff, $00, $fd, $02
    defb $ff, $00, $f9, $06
    defb $ff, $00, $fb, $04
    defb $ff, $00, $fb, $04
    defb $ff, $00, $fb, $04
    defb $ff, $00, $f3, $0c
    defb $ff, $00, $c7, $38
    defb $ff, $00, $9f, $60
    defb $ff, $00, $0f, $f0
; Column 1
    defb $fe, $01, $ff, $00
    defb $fe, $01, $3f, $c0
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $bf, $40
    defb $ff, $00, $9f, $60
    defb $ff, $00, $1f, $e0
    defb $fe, $01, $7f, $80
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $7f, $80
    defb $fe, $01, $7f, $80
    defb $ff, $00, $9f, $60
    defb $ff, $00, $cf, $30
    defb $ff, $00, $ff, $00
    defb $fe, $01, $ff, $00
    defb $fe, $01, $ff, $00
    defb $ff, $00, $7f, $80
    defb $ff, $00, $3f, $c0
    defb $ff, $00, $9f, $60
    defb $ff, $00, $cf, $30
    defb $ff, $00, $ef, $10
    defb $ff, $00, $e3, $1c
    defb $ff, $00, $f7, $08

mr_soft_frames:
    defw mr_soft_frame0_shift0
    defw mr_soft_frame1_shift0
    defw mr_soft_frame2_shift0
    defw mr_soft_frame3_shift0
    defw mr_soft_frame4_shift0
mr_soft_frame_count: equ 5

mr_soft_frame0_shifts:
    defw mr_soft_frame0_shift0
    defw mr_soft_frame0_shift1
    defw mr_soft_frame0_shift2
    defw mr_soft_frame0_shift3
    defw mr_soft_frame0_shift4
    defw mr_soft_frame0_shift5
    defw mr_soft_frame0_shift6
    defw mr_soft_frame0_shift7
mr_soft_frame1_shifts:
    defw mr_soft_frame1_shift0
    defw mr_soft_frame1_shift1
    defw mr_soft_frame1_shift2
    defw mr_soft_frame1_shift3
    defw mr_soft_frame1_shift4
    defw mr_soft_frame1_shift5
    defw mr_soft_frame1_shift6
    defw mr_soft_frame1_shift7
mr_soft_frame2_shifts:
    defw mr_soft_frame2_shift0
    defw mr_soft_frame2_shift1
    defw mr_soft_frame2_shift2
    defw mr_soft_frame2_shift3
    defw mr_soft_frame2_shift4
    defw mr_soft_frame2_shift5
    defw mr_soft_frame2_shift6
    defw mr_soft_frame2_shift7
mr_soft_frame3_shifts:
    defw mr_soft_frame3_shift0
    defw mr_soft_frame3_shift1
    defw mr_soft_frame3_shift2
    defw mr_soft_frame3_shift3
    defw mr_soft_frame3_shift4
    defw mr_soft_frame3_shift5
    defw mr_soft_frame3_shift6
    defw mr_soft_frame3_shift7
mr_soft_frame4_shifts:
    defw mr_soft_frame4_shift0
    defw mr_soft_frame4_shift1
    defw mr_soft_frame4_shift2
    defw mr_soft_frame4_shift3
    defw mr_soft_frame4_shift4
    defw mr_soft_frame4_shift5
    defw mr_soft_frame4_shift6
    defw mr_soft_frame4_shift7

mr_soft_attr:
    defb $47, $47
    defb $47, $47
    defb $47, $47

Each shifts table is exactly 16 bytes (8 × 2), and all five frame tables are contiguous in memory immediately following the pixel data. This contiguous layout is what lets DRAW_SPRITE locate any frame/shift combination with a single multiply-by-16 and a table dereference — no division or pointer-of-pointers indirection required.

mr_soft_attr holds the attribute bytes recorded when the sprite was exported (white paper, black ink, bright in this case). The demo applies a uniform colour scheme to the entire screen at startup and does not use these bytes at runtime — they are preserved in the export so that programs that do set per-character-cell colours can read them directly.

Masks and the AND/OR Blit

A mask byte has a 0 bit wherever the sprite is opaque and a 1 bit wherever it is transparent. Before writing any sprite byte into screen memory the blitter applies:

new_screen_byte = (old_screen_byte AND mask) OR sprite_byte

The AND step clears the pixels the sprite is about to fill; the OR step stamps the sprite's set pixels on top. Background pixels behind transparent (mask = 1) positions are preserved, so the character composites cleanly over whatever was already drawn without blacking out a rectangle around it. Because the demo erases the sprite's screen columns to a known background before each draw, the two-pass blit used for shifts 1–7 composes correctly: the first pass writes onto clean memory, and the second pass ANDs and ORs on top without artefacts.

Screen Memory Addressing

The demo places the sprite at character row 8, so its three character rows (8, 9, 10) lie entirely within the middle screen third ($4800–$4FFF, covering character rows 8–15). Staying within one third removes the need for the full ZX Spectrum bit-juggling address formula.

The pixel address for scan line S (0–7 within a character row) at character row R, column C is:

  • High byte: $48 + S — adding 1 to the high byte steps down one scan line within the same row
  • Low byte: (R − 8) × 32 + C — the row's offset within the third, plus the column

Each of the three character rows therefore has a fixed low-byte base:

char row 8:   low-byte base = $00 + C  (row_in_third = 0, pixel base $4800)
char row 9:   low-byte base = $20 + C  (row_in_third = 1, pixel base $4820)
char row 10:  low-byte base = $40 + C  (row_in_third = 2, pixel base $4840)

After writing all 8 scan lines of a character row, the blitter resets the high byte back to $48 and adds $20 or $40 to the low-byte base for the next row. Attribute memory at $5800 is linear, so the attribute address for row R, column C is $5900 + (R − 8) × 32 + C — the same low byte, different high byte.

Pre-shifted Data and the Two Blitters

A 16-pixel-wide sprite can appear at any of 256 horizontal pixel positions, so its left edge can land at any of 8 offsets (0–7) within its character column. Choosing the pre-shifted variant whose built-in shift matches sprite_x AND 7 at draw time avoids an 8-step software shift loop on every frame — the work is done once, at export time.

Two helper routines handle the two data shapes:

BLIT_PAIR_SECTION (shift 0): blits 24 scan lines of mask/sprite pairs from IX into a single screen character column C. It processes the 8 scan lines of character row 8, then row 9, then row 10 in order, resetting the pixel high byte to $48 between rows and recomputing the low-byte offset. IX advances by 2 per scan line (48 bytes total per call). DRAW_SPRITE calls it twice: once for the col-0 data section (screen column draw_col), then once for the col-1 data section (screen column draw_col + 1).

BLIT_QUAD_SECTION (shifts 1–7): blits 24 quads from IX into two consecutive screen character columns per scan line. For each scan line it writes (ix+0)/(ix+1) to column C and (ix+2)/(ix+3) to column C+1, keeping all four data accesses sequential in memory. IX advances by 4 per scan line (96 bytes total per call). DRAW_SPRITE calls it twice: once for the col-0 data section (writing screen columns draw_col and draw_col+1), then — with C incremented by one — once for the col-1 data section (writing screen columns draw_col+1 and draw_col+2). Screen column draw_col+1 therefore receives two sequential AND/OR passes; the mask data in the exported file is pre-computed so these passes compose correctly.

Resolving the Frame/Shift Pointer

At draw time, DRAW_SPRITE resolves sprite_frame (0–4) and draw_shift (0–7) into the address of the correct data block. The frame-N shifts table starts at mr_soft_frame0_shifts + N × 16 (each table is 8 × 2 = 16 bytes), and the correct entry is at byte offset shift × 2 within it:

        ld      a, (sprite_frame)
        ld      l, a
        ld      h, 0
        add     hl, hl          ; x2
        add     hl, hl          ; x4
        add     hl, hl          ; x8
        add     hl, hl          ; x16 (= frame x table stride)
        ld      de, mr_soft_frame0_shifts
        add     hl, de          ; HL = base of frame N's shift table

        ld      a, (draw_shift)
        ld      e, a
        ld      d, 0
        add     hl, de
        add     hl, de          ; += shift x 2 (each defw is 2 bytes)

        ld      e, (hl)
        inc     hl
        ld      d, (hl)
        push    de
        pop     ix              ; IX = pointer to the frame/shift data block

No division is required: the stride of 16 bytes per frame is a power-of-two, reached by four doublings of HL. The contiguous layout of the shift tables in the exported file is what makes this stride reliable.

The Animation Loop

The main loop is synchronised to the 50 Hz television frame rate:

MAIN_LOOP:
        halt                    ; suspend until next maskable interrupt (50 Hz)
        call    ERASE_SPRITE    ; zero pixel rows + reset attributes

        ; Update horizontal position
        ld      a, (sprite_x)
        ld      b, a
        ld      a, (sprite_dir)
        add     a, b            ; x += dir  (dir is +1 or $FF = -1)
        ld      (sprite_x), a
        ; ... boundary checks flip sprite_dir at x = 8 and x = 232 ...

        ; Advance animation frame every 8 moves
        ld      a, (frame_tick)
        inc     a
        and     $07
        ld      (frame_tick), a
        jr      nz, DO_DRAW     ; only advance frame when tick wraps to 0
        ; ... increment sprite_frame modulo 5 ...
DO_DRAW:
        call    DRAW_SPRITE
        jr      MAIN_LOOP

halt suspends the CPU until the next maskable interrupt, which the ZX Spectrum raises at 50 Hz once per television frame. This synchronises the loop to the display, preventing tearing and giving smooth, constant-speed motion. The animation frame advances every 8 main-loop iterations, cycling through the 5-frame walk cycle at approximately 6 frame changes per second.

ERASE_SPRITE always zeros 3 character columns (not 2), because shifts 1–7 spread the sprite across 3 screen columns. Erasing only the 2 columns of the unshifted sprite would leave a stale column of pixels on frames where the sub-character shift changes.

Source: mr_soft_demo.asm

This is the complete demo. Its include line references mr_soft_sprite.asm — the file the Player Sprite Editor exported for this example. To use your own sprite instead: export it from the editor, place the .asm file in the same folder as the demo, update the include line to match the filename you used, and replace every occurrence of mr_soft in the demo with your sprite's label prefix. The demo assumes a 16×24-pixel (2×3-character) sprite placed at character row 8; for sprites of a different size or screen position you will also need to adjust the screen address constants ($4800, $4820, $4840), the boundary values for sprite_x, and the erase routine's column count.

; ============================================================
; MR SOFT SPRITE DEMO - ZX Spectrum 48K
; ============================================================
; Assemble with: pasmo --tapbas mr_soft_demo.asm mr_soft_demo.tap
;
; Sprite: 16x24 pixels (2x3 chars), 5 animation frames
; Pre-shifted data: 8 pixel shifts (0-7)
; Mask format: interleaved (mask byte, sprite byte per pixel column)
;
; The sprite bounces left <-> right across the middle of the screen.
; Animation frames advance every 4 pixels of movement.
;
; Screen Y is fixed at character row 8 (vertical middle band).
; The sprite occupies screen char rows 8, 9, 10.
;
; ZX Spectrum screen address layout used here (all in middle third):
;   Pixel addr = 0x4800 + scan(0-7)*0x100 + char_row_offset + col
;   char row 8:  offset = 0x00  (row_in_third=0)
;   char row 9:  offset = 0x20  (row_in_third=1)
;   char row 10: offset = 0x40  (row_in_third=2)
;
; Attribute addresses:
;   row 8:  0x5900 + col
;   row 9:  0x5920 + col
;   row 10: 0x5940 + col
; ============================================================

        org     $8000

; -------------------------------------------------------
; Entry point (called by BASIC: RANDOMIZE USR 32768)
; -------------------------------------------------------
START:
        ld      a, 0
        out     ($FE), a        ; Black border

        call    CLS
        call    SET_ATTRS

        ; Initialise state
        ld      a, 232
        ld      (sprite_x), a   ; Start near right edge
        ld      a, $FF
        ld      (sprite_dir), a ; Direction: $FF = -1 = moving left
        xor     a
        ld      (sprite_frame), a
        ld      (frame_tick), a

; -------------------------------------------------------
; MAIN LOOP  (runs forever, halts for 50Hz vsync)
; -------------------------------------------------------
MAIN_LOOP:
        halt                    ; Wait for interrupt (frame sync)

        call    ERASE_SPRITE

        ; Move sprite
        ld      a, (sprite_x)
        ld      b, a
        ld      a, (sprite_dir)
        add     a, b            ; new_x = x + dir
        ld      (sprite_x), a

        ; Boundary check: right edge (x > 232)
        cp      233
        jr      nc, BOUNCE_RIGHT

        ; Boundary check: left edge (x < 8)
        cp      8
        jr      c,  BOUNCE_LEFT
        jr      ADVANCE_FRAME

BOUNCE_RIGHT:
        ld      a, 232
        ld      (sprite_x), a
        ld      a, $FF          ; dir = -1
        ld      (sprite_dir), a
        jr      ADVANCE_FRAME

BOUNCE_LEFT:
        ld      a, 8
        ld      (sprite_x), a
        ld      a, 1            ; dir = +1
        ld      (sprite_dir), a

ADVANCE_FRAME:
        ; Advance animation frame every 8 movement steps
        ld      a, (frame_tick)
        inc     a
        and     $07             ; mod 8
        ld      (frame_tick), a
        jr      nz, DO_DRAW

        ld      a, (sprite_frame)
        inc     a
        cp      5               ; mr_soft_frame_count
        jr      c, SAVE_FRAME
        xor     a
SAVE_FRAME:
        ld      (sprite_frame), a

DO_DRAW:
        call    DRAW_SPRITE
        jr      MAIN_LOOP

; -------------------------------------------------------
; CLS  -  zero all pixel RAM ($4000-$57FF)
; -------------------------------------------------------
CLS:
        ld      hl, $4000
        ld      de, $4001
        ld      bc, $17FF
        ld      (hl), 0
        ldir
        ret

; -------------------------------------------------------
; SET_ATTRS  -  white paper / black ink across full screen
; -------------------------------------------------------
SET_ATTRS:
        ld      hl, $5800
        ld      de, $5801
        ld      bc, $02FF
        ld      (hl), $38       ; white paper, black ink
        ldir
        ret

; -------------------------------------------------------
; ERASE_SPRITE
; Clears up to 3 character columns across sprite char rows 8-10.
; Shift1-7 sprites spill into a 3rd char column, so always erase 3.
; -------------------------------------------------------
ERASE_SPRITE:
        ld      a, (sprite_x)
        rrca
        rrca
        rrca
        and     $1F             ; A = char column

        ; Erase 3 char cols across screen char rows 8, 9, 10
        ld      c, a            ; C = first char col

        ; -- Char row 8 (base $4800 + scan*$100 + col) --
        ld      b, 8            ; 8 scan lines
        ld      d, $48
ER_ROW8:
        ld      h, d
        ld      l, c
        ld      (hl), 0
        inc     l
        ld      (hl), 0
        inc     l
        ld      (hl), 0
        inc     d               ; next scan line: +$100
        djnz    ER_ROW8

        ; -- Char row 9 (base $4820 + scan*$100 + col) --
        ld      b, 8
        ld      d, $48
        ld      a, $20
        add     a, c            ; base low byte = $20 + col
        ld      e, a
ER_ROW9:
        ld      h, d
        ld      l, e
        ld      (hl), 0
        inc     l
        ld      (hl), 0
        inc     l
        ld      (hl), 0
        inc     d
        djnz    ER_ROW9

        ; -- Char row 10 (base $4840 + scan*$100 + col) --
        ld      b, 8
        ld      d, $48
        ld      a, $40
        add     a, c
        ld      e, a
ER_ROW10:
        ld      h, d
        ld      l, e
        ld      (hl), 0
        inc     l
        ld      (hl), 0
        inc     l
        ld      (hl), 0
        inc     d
        djnz    ER_ROW10

        ; -- Clear attributes for those 3 char cols x 3 char rows --
        ld      hl, $5900
        ld      a, l
        add     a, c
        ld      l, a
        ld      (hl), $38
        inc     l
        ld      (hl), $38
        inc     l
        ld      (hl), $38

        ld      hl, $5920
        ld      a, l
        add     a, c
        ld      l, a
        ld      (hl), $38
        inc     l
        ld      (hl), $38
        inc     l
        ld      (hl), $38

        ld      hl, $5940
        ld      a, l
        add     a, c
        ld      l, a
        ld      (hl), $38
        inc     l
        ld      (hl), $38
        inc     l
        ld      (hl), $38

        ret

; -------------------------------------------------------
; DRAW_SPRITE
; Draws the current animation frame at sprite_x (pixel coords).
; Fixed Y = character row 8 on screen.
; -------------------------------------------------------
DRAW_SPRITE:
        ; Decompose pixel X into char column and sub-pixel shift
        ld      a, (sprite_x)
        ld      b, a
        rrca
        rrca
        rrca
        and     $1F
        ld      (draw_col), a   ; char column 0-31

        ld      a, b
        and     $07
        ld      (draw_shift), a ; pixel shift 0-7

        ; -------------------------------------------------
        ; Resolve pointer: mr_soft_frameN_shifts[shift]
        ; Frame shift tables are contiguous: each table is
        ; 8 x defw = 16 bytes. Table for frame N starts at
        ; mr_soft_frame0_shifts + N*16.
        ; -------------------------------------------------
        ld      a, (sprite_frame)
        ld      l, a
        ld      h, 0
        add     hl, hl          ; *2
        add     hl, hl          ; *4
        add     hl, hl          ; *8
        add     hl, hl          ; *16
        ld      de, mr_soft_frame0_shifts
        add     hl, de          ; HL = base of frame's shifts table

        ; Index by pixel shift (*2 for defw)
        ld      a, (draw_shift)
        ld      e, a
        ld      d, 0
        add     hl, de
        add     hl, de          ; HL += shift * 2

        ; Dereference to get sprite data pointer -> IX
        ld      e, (hl)
        inc     hl
        ld      d, (hl)
        push    de
        pop     ix              ; IX = pointer to sprite data block

        ; -------------------------------------------------
        ; Dispatch to shift0 or shiftN blitter
        ; -------------------------------------------------
        ld      a, (draw_shift)
        or      a
        jr      z,  DRAW_S0

        ; --- ShiftN blitter (shift 1-7) ---
        ; Data layout: col0 section (24 quads = 96 bytes), col1 section (24 quads)
        ; Each quad: [mask_colA, spr_colA, mask_colB, spr_colB]
        ; col0 section writes screen cols: draw_col, draw_col+1
        ; col1 section writes screen cols: draw_col+1, draw_col+2

        ld      a, (draw_col)
        ld      c, a            ; C = first screen col

        ; Draw col0 section -- IX advances 96 bytes naturally, landing at col1 section
        call    BLIT_QUAD_SECTION

        ; Draw col1 section (starts one char col to the right)
        inc     c
        call    BLIT_QUAD_SECTION
        ret

DRAW_S0:
        ; --- Shift0 blitter ---
        ; Data layout: col0 section (24 pairs = 48 bytes), col1 section (24 pairs)
        ; Each pair: [mask, sprite]

        ld      a, (draw_col)
        ld      c, a

        ; Draw col0 section -- IX advances 48 bytes naturally, landing at col1 section
        call    BLIT_PAIR_SECTION

        ; Draw col1 section (one char col to the right)
        inc     c
        call    BLIT_PAIR_SECTION
        ret

; -------------------------------------------------------
; BLIT_PAIR_SECTION
; Blits 24 scan lines (3 char rows x 8) of mask/sprite pairs
; from IX into a single screen character column C.
;
; Entry: IX = sprite data pointer (pairs: mask, sprite)
;        C  = screen char column to write
; IX advances by 48 bytes (24 pairs).
; Trashes: A, B, D, E, H, L
; -------------------------------------------------------
BLIT_PAIR_SECTION:
        ; -- Char row 8: base $4800+col, scan lines 0-7 --
        ld      d, $48          ; high byte of screen addr (scan 0)
        ld      b, 8
BPS_R8:
        ld      h, d
        ld      l, c
        ld      a, (ix+0)       ; mask
        and     (hl)
        or      (ix+1)          ; sprite
        ld      (hl), a
        inc     d               ; +$100 to next scan line
        inc     ix
        inc     ix
        djnz    BPS_R8

        ; -- Char row 9: base $4820+col --
        ld      d, $48
        ld      a, $20
        add     a, c
        ld      e, a            ; E = $20 + col (low byte offset)
        ld      b, 8
BPS_R9:
        ld      h, d
        ld      l, e
        ld      a, (ix+0)
        and     (hl)
        or      (ix+1)
        ld      (hl), a
        inc     d
        inc     ix
        inc     ix
        djnz    BPS_R9

        ; -- Char row 10: base $4840+col --
        ld      d, $48
        ld      a, $40
        add     a, c
        ld      e, a
        ld      b, 8
BPS_R10:
        ld      h, d
        ld      l, e
        ld      a, (ix+0)
        and     (hl)
        or      (ix+1)
        ld      (hl), a
        inc     d
        inc     ix
        inc     ix
        djnz    BPS_R10

        ret

; -------------------------------------------------------
; BLIT_QUAD_SECTION
; Blits 24 scan lines (3 char rows x 8) of mask/sprite quads
; from IX into TWO consecutive screen char columns C and C+1.
;
; Entry: IX = sprite data pointer (quads: m0,s0,m1,s1)
;        C  = first screen char column to write
; IX advances by 96 bytes (24 quads).
; Trashes: A, B, D, E, H, L
; -------------------------------------------------------
BLIT_QUAD_SECTION:
        ; -- Char row 8 --
        ld      d, $48
        ld      b, 8
BQS_R8:
        ld      h, d
        ld      l, c
        ld      a, (ix+0)       ; mask for col
        and     (hl)
        or      (ix+1)          ; sprite for col
        ld      (hl), a
        inc     l               ; next char col
        ld      a, (ix+2)       ; mask for col+1
        and     (hl)
        or      (ix+3)          ; sprite for col+1
        ld      (hl), a
        inc     d               ; +$100 next scan line
        inc     ix
        inc     ix
        inc     ix
        inc     ix
        djnz    BQS_R8

        ; -- Char row 9 --
        ld      d, $48
        ld      a, $20
        add     a, c
        ld      e, a
        ld      b, 8
BQS_R9:
        ld      h, d
        ld      l, e
        ld      a, (ix+0)
        and     (hl)
        or      (ix+1)
        ld      (hl), a
        inc     l
        ld      a, (ix+2)
        and     (hl)
        or      (ix+3)
        ld      (hl), a
        inc     d
        inc     ix
        inc     ix
        inc     ix
        inc     ix
        djnz    BQS_R9

        ; -- Char row 10 --
        ld      d, $48
        ld      a, $40
        add     a, c
        ld      e, a
        ld      b, 8
BQS_R10:
        ld      h, d
        ld      l, e
        ld      a, (ix+0)
        and     (hl)
        or      (ix+1)
        ld      (hl), a
        inc     l
        ld      a, (ix+2)
        and     (hl)
        or      (ix+3)
        ld      (hl), a
        inc     d
        inc     ix
        inc     ix
        inc     ix
        inc     ix
        djnz    BQS_R10

        ret

; -------------------------------------------------------
; VARIABLES  (in RAM, above code)
; -------------------------------------------------------
sprite_x:       defb 232
sprite_dir:     defb $FF
sprite_frame:   defb 0
frame_tick:     defb 0
draw_col:       defb 0
draw_shift:     defb 0

; -------------------------------------------------------
; SPRITE DATA (included from the exported file)
; -------------------------------------------------------
        include "mr_soft_sprite.asm"

        end     START

Assembling and Running

Place mr_soft_sprite.asm and mr_soft_demo.asm in the same folder, then assemble and run as described in the Z80 Assembly Introduction:

pasmo --tapbas mr_soft_demo.asm mr_soft_demo.tap && fuse --tape mr_soft_demo.tap --auto-load

The --tapbas flag wraps the assembled machine code in a BASIC loader so the .tap image auto-runs when loaded; --auto-load tells Fuse to insert and start the tape immediately on launch. You should see a white-paper screen with the sprite appearing near the right edge and bouncing back and forth, cycling through its walk animation. To use your own sprite, export it from the Player Sprite Editor, swap in the new .asm file, and follow the label-substitution steps described above; the bouncing loop itself adapts automatically.