!cpu 6510 ; CAT VIBING TO IEVAN POLKKA ; CatJAM-inspired original sprite drawing: six multicolor head tiles plus ; two high-resolution face overlays, four rotated poses, all hardware-expanded. ; Traditional Finnish melody; new SID bass/percussion arrangement. ; Melody reference: John Chambers / Ben Hemmendinger transcription (Bm): ; https://abcnotation.com/tunePage?a=trillian.mit.edu/~jc/music/abc/session/Oivan_Ilo/Ievan_Polkka/Ievan_Polkka-Bm-32-2/0000 ; Folk melody background: https://www.loituma.fi/en/ievan-polkka-en/ ; Visual reference: https://knowyourmeme.com/memes/catjam-vibing-cat ; No recording, lyrics, or sampled audio. One sequencer clocks SID and head bob. ; ; Layout: BASIC $0801, code $1000, custom scene charset $2000, ; four 512-byte sprite poses $3000, screen/color/song tables $4000 onward. * = $0801 !word basic_end,10 !byte $9e !text "4096" !byte 0 basic_end: !word 0 * = $1000 start: jsr save_state lda #0 sta $d020 sta $d021 lda #147 jsr $ffd2 jsr show_splash jsr initialize main: ; All eight sprite positions and pointers change in the lower border. jsr wait_frame jsr controls lda quitting beq keep_running jmp exit keep_running: lda paused bne main ; Normalize NTSC's 60 frames to the same 50 Hz sequencer as PAL. lda $02a6 bne pal_tick inc ntsc_divider lda ntsc_divider cmp #6 bcc pal_tick lda #0 sta ntsc_divider jmp main pal_tick: jsr music_tick jsr animate_cat jsr animate_meters jmp main save_state: ldx #0 save_positions: lda $d000,x sta old_vic,x inx cpx #25 bne save_positions ldx #0 save_extra: lda $d01b,x sta old_extra,x inx cpx #20 bne save_extra ldx #0 save_pointers: lda $07f8,x sta old_pointers,x inx cpx #8 bne save_pointers ldx #0 save_sid: lda $d400,x sta old_sid,x inx cpx #25 bne save_sid ldx #0 save_zp: lda $fb,x sta old_zp,x inx cpx #4 bne save_zp lda $dd00 sta old_bank lda $0286 sta old_text_color rts initialize: lda #0 sta $d020 sta $d015 sta paused sta muted sta quitting sta unit_tick sta song_step sta ntsc_divider lda #6 sta $d021 sta frames_per_unit lda old_bank ora #3 sta $dd00 lda #$1b sta $d011 lda #8 sta $d016 lda #$18 sta $d018 ldx #0 copy_scene: lda scene_screen,x sta $0400,x lda scene_screen+256,x sta $0500,x lda scene_screen+512,x sta $0600,x lda scene_screen+768,x sta $0700,x lda scene_colors,x sta $d800,x lda scene_colors+256,x sta $d900,x lda scene_colors+512,x sta $da00,x lda scene_colors+768,x sta $db00,x inx bne copy_scene ; Frequency tables for the actual machine's SID clock. ldx #95 copy_frequencies: lda $02a6 beq copy_ntsc lda pal_lo,x sta freq_lo,x lda pal_hi,x sta freq_hi,x jmp next_frequency copy_ntsc: lda ntsc_lo,x sta freq_lo,x lda ntsc_hi,x sta freq_hi,x next_frequency: dex bpl copy_frequencies lda #0 sta $d010 sta $d01b lda #$ff sta $d017 sta $d01d lda #$fc sta $d01c lda #1 sta $d025 lda #15 sta $d026 lda #11 sta $d027 sta $d028 ldx #2 sprite_colors: lda #10 sta $d027,x inx cpx #8 bne sprite_colors jsr initialize_sid jsr sequence_step jsr animate_cat jsr animate_meters lda #$ff sta $d015 rts wait_frame: lda #250 wait_line: cmp $d012 bne wait_line leave_line: cmp $d012 beq leave_line rts music_tick: inc unit_tick lda unit_tick cmp frames_per_unit bcc instrument_tick lda #0 sta unit_tick inc song_step jsr sequence_step instrument_tick: lda muted bne tick_done ; Release the lead just before a new note, but sustain across tied steps. lda frames_per_unit sec sbc #1 cmp unit_tick bne drum_envelope ldx song_step inx lda melody,x beq drum_envelope lda #$40 sta $d404 drum_envelope: lda frames_per_unit sec sbc #1 cmp unit_tick bne drum_release lda song_step and #1 beq drum_release lda #$10 sta $d40b drum_release: lda unit_tick cmp #2 bne pulse_motion lda #$80 sta $d412 pulse_motion: lda unit_tick asl asl clc adc #$40 sta $d402 tick_done: rts sequence_step: lda muted bne sequence_done ldx song_step lda melody,x beq accompaniment tax lda freq_lo,x sta $d400 lda freq_hi,x sta $d401 lda #$41 sta $d404 accompaniment: lda song_step and #1 bne sequence_done ; Oom-pah bass: roots/fifths on beats, short upper notes off the beat. ldx song_step lda bass_notes,x tax lda freq_lo,x sta $d407 lda freq_hi,x sta $d408 lda #$11 sta $d40b lda song_step and #2 beq bass_drum lda #$30 sta $d40e lda #$1c sta $d40f lda #$02 sta $d413 jmp play_drum bass_drum: lda #$40 sta $d40e lda #$03 sta $d40f lda #$04 sta $d413 play_drum: lda #$81 sta $d412 sequence_done: rts initialize_sid: ldx #24 clear_sid: lda #0 sta $d400,x dex bpl clear_sid lda #$08 sta $d405 lda #$89 sta $d406 lda #$40 sta $d402 lda #$08 sta $d403 lda #$09 sta $d40c lda #$48 sta $d40d lda #$08 sta $d414 lda #15 sta $d418 rts animate_cat: ; 16 animation phases per quarter note, tied to the song position. lda song_step and #3 asl asl sta bob_phase lda unit_tick asl cmp frames_per_unit bcc first_half inc bob_phase inc bob_phase first_half: ldx bob_phase lda head_x,x sta head_origin_x lda head_y,x sta head_origin_y lda head_pose,x asl asl asl clc adc #$c0 sta sprite_pointer ldx #0 position_sprites: lda head_origin_x clc adc sprite_dx,x sta sprite_x lda head_origin_y clc adc sprite_dy,x sta sprite_y txa asl tay lda sprite_x sta $d000,y lda sprite_y sta $d001,y lda sprite_pointer sta $07f8,x inc sprite_pointer inx cpx #8 bne position_sprites rts animate_meters: ; Three small rhythm lamps under the bench; no character-ROM graphics. lda song_step and #7 tax lda lamp_colors,x sta $db83 lda lamp_colors+2,x sta $db86 lda lamp_colors+4,x sta $db89 rts controls: jsr $ffe4 cmp #81 bne check_pause lda #1 sta quitting rts check_pause: cmp #32 bne check_mute lda paused eor #1 sta paused bne quiet lda muted bne controls_done lda #15 sta $d418 rts check_mute: cmp #77 bne check_restart lda muted eor #1 sta muted bne quiet lda paused bne quiet jsr initialize_sid jsr sequence_step rts quiet: lda #0 sta $d418 rts check_restart: cmp #82 bne speed_one lda #0 sta song_step sta unit_tick jsr sequence_step rts speed_one: cmp #49 bne speed_two lda #7 sta frames_per_unit rts speed_two: cmp #50 bne speed_three lda #6 sta frames_per_unit rts speed_three: cmp #51 bne controls_done lda #5 sta frames_per_unit controls_done: rts show_splash: lda #splash sta $fc print_splash: ldy #0 lda ($fb),y beq wait_space jsr $ffd2 inc $fb bne print_splash inc $fc jmp print_splash wait_space: jsr $ffe4 cmp #32 bne wait_space rts exit: lda #0 sta $d015 sta $d418 ldx #0 restore_sid: lda old_sid,x sta $d400,x inx cpx #25 bne restore_sid ldx #0 restore_pointers: lda old_pointers,x sta $07f8,x inx cpx #8 bne restore_pointers ldx #0 restore_extra: lda old_extra,x sta $d01b,x inx cpx #20 bne restore_extra ldx #0 restore_vic: lda old_vic,x sta $d000,x inx cpx #25 bne restore_vic lda old_bank sta $dd00 lda old_text_color sta $0286 lda #147 jsr $ffd2 ldx #0 restore_zp: lda old_zp,x sta $fb,x inx cpx #4 bne restore_zp rts sprite_dx: !byte 24,72,0,48,96,0,48,96 sprite_dy: !byte 28,28,0,0,0,42,42,42 head_x: !byte 67,67,68,68,69,69,70,70,71,71,70,70,69,69,68,68 head_y: !byte 94,95,98,100,103,105,106,107,106,104,101,98,96,94,93,93 head_pose: !byte 0,0,0,1,1,1,2,2,2,2,2,3,3,3,0,0 lamp_colors: !byte 7,8,2,9,13,5,6,6,7,8,2,9 old_vic: !fill 25,0 old_extra: !fill 20,0 old_sid: !fill 25,0 old_pointers: !fill 8,0 old_zp: !fill 4,0 old_bank: !byte 0 old_text_color: !byte 0 paused: !byte 0 muted: !byte 0 quitting: !byte 0 unit_tick: !byte 0 song_step: !byte 0 ntsc_divider: !byte 0 frames_per_unit: !byte 6 bob_phase: !byte 0 head_origin_x: !byte 0 head_origin_y: !byte 0 sprite_pointer: !byte 0 sprite_x: !byte 0 sprite_y: !byte 0 freq_lo: !fill 96,0 freq_hi: !fill 96,0 splash: !byte 13,13,13,154 !text " CAT VIBING TO IEVAN POLKKA" !byte 13,13,5 !text " ONE WHITE CAT. ONE FINNISH POLKA." !byte 13,13,13,153 !text " CONTROLS" !byte 13,13,158 !text " 1-3" !byte 5 !text " TEMPO " !byte 158 !text "M" !byte 5 !text " MUSIC " !byte 158 !text "R" !byte 5 !text " RESTART" !byte 13,158 !text " SPACE" !byte 5 !text " PAUSE " !byte 158 !text "Q" !byte 5 !text " QUIT" !byte 13,13,13,5 !text " HTTPS://C64.P20.DEV" !byte 13,13,152 !text " RELEASED 29 OCTOBER 2026" !byte 13,13,13,158 !text " PRESS SPACE TO START" !byte 0 ; Original pixel drawings encoded as VIC-II data. No ROM glyphs in the scene. * = $2000 scene_charset: !byte 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255 !byte 0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,255 !byte 255,192,192,192,192,192,0,0,255,255,255,255,0,0,0,0 !byte 255,255,255,255,255,255,0,0,255,255,255,255,255,0,0,0 !byte 0,255,255,255,255,255,255,255,192,192,192,192,192,192,192,0 !byte 192,192,192,192,192,192,192,192,0,0,0,0,0,0,0,255 !byte 255,255,255,0,0,0,0,0,0,0,255,255,255,255,255,255 !byte 63,63,63,63,63,63,63,63,1,0,0,0,0,0,0,0 !byte 63,127,255,255,255,255,255,255,128,0,0,0,0,0,0,0 !byte 255,0,0,0,0,0,0,0,192,192,192,192,192,255,255,192 !byte 0,0,0,0,0,255,255,0,255,255,255,255,255,255,255,254 !byte 127,127,255,255,255,255,255,255,0,0,0,0,48,48,0,0 !byte 0,6,6,0,0,0,0,0,0,0,0,0,0,0,192,192 !byte 0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,7 !byte 0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,192 !byte 0,0,12,12,0,0,0,0,248,252,254,255,255,255,255,255 !byte 14,28,56,48,112,224,192,128,255,192,192,192,192,192,192,192 !byte 63,255,255,255,255,255,255,255,1,1,1,1,1,1,1,1 !byte 7,7,7,7,7,7,7,7,253,251,251,251,247,247,239,239 !byte 254,255,255,255,255,255,255,255,31,255,255,255,255,255,255,255 !byte 255,255,255,255,255,255,254,254,240,240,240,240,240,240,240,240 !byte 0,255,255,255,255,255,255,0,0,0,0,1,15,30,62,252 !byte 0,0,0,128,0,0,0,0,0,1,3,7,7,7,15,15 !byte 252,248,248,248,248,248,240,248,15,15,15,31,15,15,15,15 !byte 248,248,248,248,252,252,254,254,15,7,7,7,3,1,0,0 !byte 0,128,192,240,252,255,255,255,0,0,0,0,0,239,255,255 !byte 0,0,0,16,96,192,128,128,0,0,0,0,0,128,192,224 !byte 3,3,0,0,0,0,0,0,0,0,0,0,0,12,14,7 !byte 0,0,0,0,0,0,0,56,63,31,15,1,0,0,0,0 !byte 255,255,255,255,8,0,0,0,254,252,248,192,0,0,0,0 !byte 0,0,0,0,0,6,7,3,0,0,0,0,0,0,0,28 !byte 112,56,28,14,7,3,3,1,7,7,7,7,7,7,135,199 !byte 0,0,0,3,7,6,14,28,3,1,0,0,0,0,0,0 !byte 128,192,224,112,56,24,28,14,56,56,56,56,56,56,56,56 !byte 0,0,0,24,56,48,112,224,192,224,112,56,28,12,14,7 !byte 28,28,28,28,28,28,28,28,0,0,0,128,192,224,96,112 !byte 231,119,63,31,15,7,7,7,0,0,0,0,0,1,1,3 !byte 24,56,112,96,224,192,128,128,0,0,0,12,14,7,3,3 !byte 7,3,1,0,0,0,0,128,56,184,248,248,120,56,56,56 !byte 0,1,3,3,7,14,12,28,192,192,128,0,0,0,0,0 !byte 0,0,0,0,0,0,16,255,0,0,0,0,0,96,96,0 !byte 0,0,0,6,7,3,1,1,3,1,0,0,0,128,128,192 !byte 156,220,252,124,60,28,28,28,0,0,1,1,3,7,6,14 !byte 56,28,12,14,7,3,1,0,7,7,7,7,7,135,199,199 !byte 7,14,12,28,56,48,112,224,3,7,6,14,28,56,48,112 !byte 192,224,96,112,56,28,14,6,56,56,56,56,57,57,59,63 !byte 56,112,96,224,192,129,129,3,24,56,48,112,224,192,128,128 !byte 0,0,0,1,1,3,1,1,0,0,0,0,0,128,128,128 !byte 224,112,48,56,28,14,7,3,28,28,28,28,28,28,29,31 !byte 28,56,48,112,224,192,192,129,0,128,192,192,224,112,48,56 !byte 231,115,59,27,31,15,7,3,192,192,129,131,135,134,142,156 !byte 224,192,192,128,0,3,7,6,0,0,0,0,0,0,0,1 !byte 0,12,14,6,7,3,1,1,7,3,1,0,0,128,128,192 !byte 62,158,220,220,252,124,60,28,7,6,14,28,56,48,112,224 !byte 0,0,0,0,0,24,56,48,255,127,63,7,0,0,0,0 !byte 255,255,255,255,16,0,0,0,0,2,7,63,255,255,1,1 !byte 0,6,7,3,3,1,0,0,3,1,0,0,128,192,192,224 !byte 159,207,238,110,126,62,30,14,3,3,7,14,28,24,56,112 !byte 28,12,14,7,3,3,1,128,3,3,3,3,3,131,195,195 !byte 152,184,240,224,192,192,129,129,0,0,0,0,0,0,0,12 !byte 224,96,112,56,24,28,14,6,28,29,31,31,30,30,28,28 !byte 192,192,129,1,3,7,14,12,112,224,192,128,128,0,0,0 !byte 128,0,127,127,127,127,127,63,28,28,255,255,255,255,255,255 !byte 1,1,255,255,255,255,255,254,0,0,0,0,0,0,0,6 !byte 112,48,56,28,12,14,7,3,14,14,15,15,15,15,14,14 !byte 96,224,192,128,1,3,7,6,192,192,224,96,112,56,24,28 !byte 227,115,51,59,31,15,15,7,131,135,142,140,156,184,240,224 !byte 128,0,3,7,14,12,28,56,14,6,7,3,3,1,0,0 !byte 7,3,1,1,128,192,192,224,28,156,156,220,252,125,127,63 !byte 28,56,112,96,224,192,128,1,0,0,24,56,112,96,224,192 !byte 63,31,31,15,7,3,1,0,255,255,255,192,192,255,255,255 !byte 254,252,252,24,16,224,192,128,7,3,3,1,1,0,0,0 !byte 3,1,128,128,192,224,96,112,142,206,206,238,126,62,63,31 !byte 31,30,28,28,28,28,0,0,3,7,6,14,28,56,0,0 !byte 0,0,0,15,15,31,31,63,0,0,63,255,255,255,255,255 !byte 3,255,255,255,255,255,255,255,0,0,0,0,0,0,63,31 !byte 15,15,14,14,14,14,0,0,0,115,51,59,27,31,15,15 !byte 0,157,159,223,223,254,0,0,63,127,127,252,240,128,128,128 !byte 255,255,255,127,63,63,31,31,240,240,248,240,224,192,192,128 !byte 0,14,15,47,47,63,62,62,7,3,3,3,3,3,3,3 !byte 15,15,15,0,0,0,0,15,255,255,255,0,0,0,0,7 !byte 255,255,255,0,0,0,0,31,3,7,7,15,7,6,7,7 !byte 127,255,255,255,255,255,255,127,240,240,248,248,252,252,254,252 !byte 255,255,255,255,255,255,253,0,255,255,254,252,252,248,240,0 !byte 255,255,255,254,254,252,252,248,64,224,240,240,240,240,240,240 !byte 240,240,240,0,0,0,0,240,30,14,14,14,14,14,14,15 !byte 15,15,15,15,0,0,0,0,255,255,255,254,0,0,0,0 !byte 0,7,63,255,255,255,255,255,224,255,255,255,255,255,255,254 !byte 3,15,31,63,127,255,255,255,248,254,255,255,255,255,255,255 !byte 255,255,255,127,0,0,0,0,252,252,252,252,0,0,0,0 !byte 192,224,240,248,252,254,254,255,31,127,252,224,192,224,252,127 !byte 0,2,255,255,255,255,255,2,0,0,254,255,255,255,254,0 !byte 192,240,252,60,30,60,252,240,240,224,224,224,224,224,224,192 !byte 0,0,0,0,192,255,255,192,15,15,15,15,15,0,0,0 !byte 255,255,255,254,252,0,0,0,31,63,255,255,255,255,255,255 !byte 252,252,248,248,240,240,224,224,248,248,252,252,254,254,255,255 !byte 254,254,255,255,255,0,0,0,255,255,255,255,255,255,127,127 !byte 192,224,224,224,224,240,240,240,0,0,253,255,255,255,255,255 !byte 0,1,255,255,255,255,255,255,31,31,63,31,31,31,63,63 !byte 63,63,63,63,127,0,0,0,240,240,240,240,240,0,0,0 !byte 31,31,63,63,63,63,63,63,14,14,14,14,14,14,14,0 !byte 127,127,127,63,63,32,32,0,248,248,248,248,252,0,0,0 !byte 255,255,127,127,63,63,63,31,254,254,254,252,252,252,248,249 !byte 63,127,127,127,255,15,7,0,64,64,192,192,192,192,192,0 !byte 0,0,255,255,255,254,254,253,0,0,254,254,254,254,254,254 !byte 252,252,252,248,252,252,0,0,63,63,127,63,63,63,63,63 !byte 127,127,63,127,127,127,0,0,31,31,31,31,31,31,31,31 !byte 254,254,254,255,255,255,255,255,159,143,207,207,255,255,63,63 !byte 249,240,242,242,254,254,224,224,248,252,252,252,252,254,254,254 !byte 0,0,63,63,63,63,63,63,0,255,255,255,254,254,253,253 !byte 0,254,254,255,255,255,255,255,255,255,255,255,255,127,63,31 !byte 63,63,63,31,31,31,31,15,0,127,127,255,255,255,255,255 !byte 0,247,247,247,239,239,223,223,0,254,254,254,253,253,251,251 !byte 192,255,255,255,255,255,255,255,15,15,15,15,15,15,15,15 !byte 0,59,59,59,55,55,47,47,239,223,223,191,191,191,127,127 !byte 253,251,251,247,247,247,239,239,15,7,15,15,31,31,63,31 !byte 240,248,248,252,255,255,255,255,255,255,255,255,255,63,31,15 !byte 254,252,252,248,248,240,224,224,223,191,191,127,127,127,255,255 !byte 251,247,247,239,239,239,223,223,255,255,255,255,255,255,251,251 !byte 47,31,31,63,63,63,63,63,223,223,223,191,191,127,127,127 !byte 224,240,240,252,254,255,255,255,253,253,253,253,253,127,15,0 !byte 253,253,253,253,253,253,255,8,255,255,255,255,255,255,248,0 !byte 255,255,255,255,255,255,63,0,255,255,255,254,254,254,254,254 !byte 255,255,255,127,127,127,127,127,255,255,255,255,255,255,255,248 !byte 0,0,0,0,28,63,191,191,255,255,255,255,255,255,4,0 !byte 255,255,255,254,248,224,0,0,253,253,253,251,251,247,247,247 !byte 255,255,255,255,255,254,254,254,191,191,191,127,127,255,255,255 !byte 247,247,247,239,239,223,223,223,254,254,253,253,253,251,251,247 * = $3000 ; Four poses, two hires face overlays followed by six multicolor head tiles. cat_poses: !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128 !byte 0,0,248,0,0,255,0,0,63,224,0,0,224,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,63,0,0,0,254,0 !byte 0,0,0,0,126,0,15,192,1,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,192,0,7,192,0 !byte 63,224,0,255,0,1,192,0,1,0,0,0,0,0,0,0 !byte 0,0,0,7,0,1,248,0,7,0,16,0,0,16,0,0 !byte 16,3,255,124,0,0,193,192,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,80,0,0,84,0,0,85,0,0,85,80,0,89,84 !byte 0,90,85,85,90,165,85,90,165,85,22,165,85,22,149,85 !byte 22,159,255,22,191,255,86,117,85,85,85,85,85,85,85,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,1,21,84 !byte 5,85,85,85,85,85,85,85,85,85,85,85,85,85,85,95 !byte 245,85,119,213,85,85,85,85,85,85,85,85,85,85,85,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,80,0,1 !byte 80,0,5,80,0,21,80,0,85,144,0,86,144,0,90,144 !byte 0,90,144,0,106,164,0,106,164,0,86,164,0,253,100,0 !byte 255,85,0,85,85,0,85,117,64,85,125,64,85,127,212,0 !byte 85,85,85,21,85,85,21,85,85,21,85,85,21,85,85,21 !byte 85,85,21,85,85,21,85,85,21,85,85,5,85,85,1,85 !byte 85,0,85,85,0,85,85,0,85,85,0,21,85,0,21,87 !byte 0,21,85,0,0,85,0,0,5,0,0,1,0,0,0,0 !byte 85,85,85,85,85,85,85,85,85,85,170,149,85,170,165,85 !byte 170,165,85,170,149,85,90,85,85,85,85,85,85,85,85,85 !byte 85,85,85,85,85,85,85,85,85,87,87,255,255,255,255,255 !byte 127,255,253,85,85,85,85,85,85,85,85,85,84,0,0,0 !byte 85,95,244,85,95,244,85,95,244,85,95,244,85,95,244,85 !byte 95,244,85,95,244,85,127,212,85,127,244,85,255,212,87,255 !byte 80,95,253,64,127,253,64,255,245,0,255,85,0,213,84,0 !byte 85,84,0,85,64,0,84,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,252 !byte 0,0,255,128,0,31,240,0,0,112,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,126,0,0,1,252,0,0,0,0 !byte 0,252,0,63,0,0,0,0,7,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0 !byte 1,240,0,31,240,0,255,128,0,224,0,0,0,0,0,0 !byte 0,0,0,0,0,0,7,0,1,248,32,14,0,32,0,0 !byte 32,0,0,248,7,254,7,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5 !byte 64,0,5,80,0,5,84,0,5,149,0,5,165,64,5,169 !byte 85,5,170,85,5,170,85,5,169,85,5,165,85,5,167,255 !byte 21,159,255,21,85,85,21,85,85,21,85,85,21,85,85,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,85,85 !byte 64,85,85,85,85,85,85,85,85,85,85,85,85,253,85,85 !byte 245,85,95,85,85,85,85,85,85,85,85,85,85,85,85,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 5,0,0,21,0,0,85,0,1,85,0,5,89,0,21,105 !byte 0,85,169,0,85,169,0,86,169,0,90,169,0,85,169,0 !byte 255,89,0,255,213,0,85,85,64,85,93,64,85,95,80,0 !byte 21,85,85,21,85,85,21,85,85,21,85,85,21,85,85,21 !byte 85,85,21,85,85,5,85,85,5,85,85,1,85,85,1,85 !byte 85,1,85,85,0,85,85,0,85,85,0,85,95,0,5,85 !byte 0,1,85,0,0,85,0,0,21,0,0,5,0,0,0,0 !byte 85,85,85,85,85,85,85,85,85,85,170,149,85,170,165,85 !byte 170,165,85,170,149,85,90,85,85,85,85,85,85,85,85,85 !byte 85,85,85,85,85,85,85,85,85,85,255,255,255,255,255,255 !byte 95,255,255,85,85,85,85,85,85,85,85,85,0,0,0,0 !byte 85,95,80,85,95,212,85,95,244,85,95,244,85,95,244,85 !byte 95,244,85,95,244,85,95,244,85,127,244,85,255,212,87,255 !byte 208,95,255,80,127,253,64,255,245,0,255,213,0,253,84,0 !byte 85,80,0,85,64,0,84,0,0,64,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,24,0,0,63,0,0,127 !byte 192,0,15,248,0,0,56,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,126,0,0,3,248,0,0,0,0,1,248,0 !byte 126,0,0,0,0,1,0,0,28,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,12,0,0,248,0,15,248,0,127,192,0,112,0,0,0 !byte 0,0,0,0,0,0,0,0,0,7,64,3,240,64,28,0 !byte 64,0,0,240,0,0,28,31,248,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,20,0,0,20,0,0,84,0,0 !byte 85,0,0,89,64,0,89,80,0,90,84,0,90,149,0,90 !byte 165,0,90,165,1,106,85,1,105,85,5,101,255,5,87,255 !byte 5,85,85,5,85,85,5,85,85,5,85,85,21,85,85,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,84,0,0,85,85 !byte 84,85,85,85,85,85,85,85,85,85,253,85,85,255,85,85 !byte 85,85,85,85,85,87,85,85,85,85,85,85,85,85,85,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,1,80,0,5,80,0,21,80,0,85 !byte 80,1,86,144,85,90,144,85,90,144,85,170,64,86,170,64 !byte 85,106,64,255,214,64,127,246,64,85,85,64,85,85,80,0 !byte 21,85,85,21,85,85,21,85,85,21,85,85,21,85,85,5 !byte 85,85,5,85,85,1,85,85,5,85,85,5,85,85,1,85 !byte 85,1,85,85,1,85,85,0,21,127,0,21,87,0,5,85 !byte 0,5,85,0,1,85,0,0,85,0,0,0,0,0,0,0 !byte 85,85,85,85,85,85,85,85,85,85,170,149,85,170,165,85 !byte 170,165,85,170,149,85,90,85,85,85,85,85,85,85,85,85 !byte 85,85,85,85,85,85,85,245,85,85,255,255,247,127,255,255 !byte 95,255,255,85,85,85,85,85,85,21,85,85,0,0,4,0 !byte 85,87,80,85,95,80,85,95,80,85,95,212,85,95,244,85 !byte 95,244,85,95,244,85,95,244,85,95,244,85,255,244,87,255 !byte 208,95,255,80,127,255,64,255,253,64,255,213,0,255,84,0 !byte 245,84,0,85,64,0,84,0,0,64,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,252 !byte 0,0,255,128,0,31,240,0,0,112,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,126,0,0,1,252,0,0,0,0 !byte 0,252,0,63,0,0,0,0,7,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0 !byte 1,240,0,31,240,0,255,128,0,224,0,0,0,0,0,0 !byte 0,0,0,0,0,0,7,0,1,248,32,14,0,32,0,0 !byte 32,0,0,248,7,254,7,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5 !byte 64,0,5,80,0,5,84,0,5,149,0,5,165,64,5,169 !byte 85,5,170,85,5,170,85,5,169,85,5,165,85,5,167,255 !byte 21,159,255,21,85,85,21,85,85,21,85,85,21,85,85,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,85,85 !byte 64,85,85,85,85,85,85,85,85,85,85,85,85,253,85,85 !byte 245,85,95,85,85,85,85,85,85,85,85,85,85,85,85,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 5,0,0,21,0,0,85,0,1,85,0,5,89,0,21,105 !byte 0,85,169,0,85,169,0,86,169,0,90,169,0,85,169,0 !byte 255,89,0,255,213,0,85,85,64,85,93,64,85,95,80,0 !byte 21,85,85,21,85,85,21,85,85,21,85,85,21,85,85,21 !byte 85,85,21,85,85,5,85,85,5,85,85,1,85,85,1,85 !byte 85,1,85,85,0,85,85,0,85,85,0,85,95,0,5,85 !byte 0,1,85,0,0,85,0,0,21,0,0,5,0,0,0,0 !byte 85,85,85,85,85,85,85,85,85,85,170,149,85,170,165,85 !byte 170,165,85,170,149,85,90,85,85,85,85,85,85,85,85,85 !byte 85,85,85,85,85,85,85,85,85,85,255,255,255,255,255,255 !byte 95,255,255,85,85,85,85,85,85,85,85,85,0,0,0,0 !byte 85,95,80,85,95,212,85,95,244,85,95,244,85,95,244,85 !byte 95,244,85,95,244,85,95,244,85,127,244,85,255,212,87,255 !byte 208,95,255,80,127,253,64,255,245,0,255,213,0,253,84,0 !byte 85,80,0,85,64,0,84,0,0,64,0,0,0,0,0,0 * = $4000 scene_screen: !byte 0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,23,24,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,43,44,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,25,0,45 !byte 46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,0 !byte 0,0,0,24,0,0,0,47,48,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 !byte 26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49 !byte 1,50,51,52,0,0,0,0,53,27,0,0,0,0,0,0 !byte 0,26,54,0,0,0,0,0,0,0,0,55,0,56,0,0 !byte 0,0,0,0,0,0,0,0,57,58,59,0,60,28,61,0 !byte 62,63,0,64,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,65,66,67,0,68,0,0,0,0,0,0,0,0 !byte 0,0,0,0,15,69,70,0,71,72,73,74,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,75,76,77,78,79 !byte 0,0,0,0,27,80,29,81,0,0,0,0,82,83,84,85 !byte 86,87,88,89,0,0,0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,15,90,91,92,93,0,30,0,94,16,1,31,95 !byte 0,0,0,0,0,96,97,98,99,100,101,102,0,0,0,0 !byte 0,0,0,0,103,28,0,0,0,0,30,104,105,106,107,108 !byte 0,0,0,0,109,110,111,17,0,0,0,0,112,113,114,115 !byte 116,117,118,32,0,0,0,0,0,0,0,0,15,17,0,0 !byte 0,0,0,119,120,121,122,123,0,0,0,0,124,125,126,17 !byte 0,0,0,0,127,128,129,130,131,132,133,134,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,135,136,137,138,139 !byte 0,0,0,0,140,141,142,0,0,0,0,0,143,144,145,32 !byte 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 !byte 2,2,2,2,2,146,147,2,2,2,2,148,149,150,31,151 !byte 2,2,2,2,2,2,152,2,33,153,33,18,4,2,4,2 !byte 4,2,4,2,4,2,4,2,4,2,4,2,4,154,4,2 !byte 4,2,4,155,156,1,1,157,4,2,4,2,4,18,158,18 !byte 10,159,10,160,3,3,3,3,3,3,3,3,12,12,12,161 !byte 3,3,12,162,3,3,3,3,3,3,163,164,165,166,167,168 !byte 169,3,3,3,170,0,171,0,19,20,19,172,5,5,5,5 !byte 5,173,174,34,1,1,1,1,175,176,1,177,178,5,5,5 !byte 5,5,179,180,181,182,183,184,185,5,5,5,186,20,19,20 !byte 10,35,10,187,7,7,7,188,189,1,1,1,1,1,1,1 !byte 190,1,1,1,191,7,7,7,7,7,192,193,194,195,196,197 !byte 198,7,7,7,199,0,36,0,10,35,10,11,9,11,9,16 !byte 1,1,1,1,1,1,1,1,200,1,1,1,1,201,9,11 !byte 9,11,9,202,203,204,205,206,207,11,9,11,9,29,36,0 !byte 208,13,209,6,6,6,210,1,1,1,1,1,1,1,1,1 !byte 211,1,1,1,1,212,6,6,6,6,6,213,214,215,216,217 !byte 6,6,6,6,6,218,13,13,37,1,38,8,219,14,220,221 !byte 1,1,1,1,1,1,1,1,222,1,1,1,21,223,224,8 !byte 8,8,225,39,1,226,39,38,8,8,227,228,8,34,1,1 !byte 229,1,1,1,230,14,1,231,1,1,1,1,1,1,1,1 !byte 232,233,1,1,234,40,235,1,1,1,236,1,1,1,237,1 !byte 1,1,41,238,1,1,1,1,1,1,1,1,239,14,1,240 !byte 241,242,243,244,1,245,1,246,247,248,249,250,16,251,1,1 !byte 1,252,253,1,1,1,254,1,1,1,41,14,1,1,1,1 !byte 1,1,1,255,168,253,7,21,239,1,1,1,1,177,8,8 !byte 34,22,1,1,1,1,1,1,1,1,245,42,42,252,253,124 !byte 182,50,176,19,193,1,1,1,1,1,1,254,175,8,8,255 !byte 1,1,1,21,235,1,1,1,236,1,1,1,1,22,1,1 !byte 1,229,1,1,1,37,1,1,1,31,13,13,22,1,1,1 !byte 1,1,1,16,1,1,1,1,1,1,1,251,1,1,1,40 !byte 235,1,1,1,236,1,1,1,237,1,1,1,1,229,1,1 !byte 1,37,1,1,1,1,1,1,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 scene_colors: !byte 6,6,6,6,6,6,6,14,6,6,6,6,6,6,6,6 !byte 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 !byte 6,6,6,6,6,6,6,6,14,14,6,6,6,6,6,6 !byte 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 !byte 6,6,6,6,6,6,6,6,15,15,6,6,6,6,6,6 !byte 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 !byte 6,6,6,6,6,6,6,6,6,6,6,6,6,14,6,15 !byte 15,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 !byte 6,6,6,6,6,6,6,6,6,6,6,6,6,6,14,6 !byte 6,6,6,14,6,6,6,15,15,6,6,6,6,6,6,6 !byte 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 !byte 14,6,6,6,6,6,6,6,6,6,6,6,6,6,6,15 !byte 15,15,15,15,6,6,6,6,0,0,6,6,6,6,6,6 !byte 6,14,14,6,6,6,6,6,6,6,6,0,6,0,6,6 !byte 6,6,6,6,6,6,6,6,15,15,15,6,0,0,0,6 !byte 0,0,6,0,6,6,6,6,6,6,6,6,6,6,6,6 !byte 6,6,6,0,0,0,6,0,6,6,6,6,6,6,6,6 !byte 6,6,6,6,0,0,0,6,0,0,0,0,6,6,6,6 !byte 6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0 !byte 6,6,6,6,9,9,9,14,6,6,6,6,0,0,0,0 !byte 0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6 !byte 6,6,6,0,0,0,0,0,6,14,6,9,9,9,9,9 !byte 6,6,6,6,6,0,0,0,0,0,0,0,6,6,6,6 !byte 6,6,6,6,14,14,6,6,6,6,14,0,0,0,0,0 !byte 6,6,6,6,9,9,10,9,6,6,6,6,0,0,0,0 !byte 0,0,0,0,6,6,6,6,6,6,6,6,14,14,6,6 !byte 6,6,6,0,0,0,0,0,6,6,6,6,10,10,10,10 !byte 6,6,6,6,0,0,0,0,0,0,0,0,6,6,6,6 !byte 6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0 !byte 6,6,6,6,10,10,10,6,6,6,6,6,0,0,0,0 !byte 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12 !byte 12,12,12,12,12,0,0,12,12,12,12,0,0,0,0,12 !byte 12,12,12,12,12,12,0,12,12,0,12,12,12,9,12,9 !byte 12,9,12,9,12,9,12,9,12,9,12,9,12,0,12,9 !byte 12,9,12,0,0,0,0,0,12,9,12,9,12,12,0,12 !byte 12,0,12,9,9,9,9,9,9,9,9,9,9,9,9,9 !byte 9,9,9,9,9,9,9,9,9,9,0,10,10,0,0,10 !byte 0,9,9,9,9,6,0,6,12,12,12,9,9,9,9,9 !byte 9,9,1,1,1,1,1,1,1,15,15,15,9,9,9,9 !byte 9,9,9,0,7,15,15,7,0,9,9,9,12,12,12,12 !byte 12,0,12,9,9,9,9,9,1,1,1,1,1,1,1,1 !byte 1,15,15,15,15,9,9,9,9,9,9,0,0,9,9,0 !byte 9,9,9,9,9,6,0,6,12,0,12,8,12,8,12,1 !byte 1,1,1,1,1,1,1,1,15,15,15,15,15,0,12,8 !byte 12,8,12,0,0,9,9,0,12,8,12,8,12,8,0,6 !byte 11,11,11,8,8,8,8,1,1,1,1,1,1,1,1,1 !byte 15,15,15,15,15,8,8,8,8,8,8,11,11,9,9,11 !byte 8,8,8,8,8,11,11,11,11,11,11,11,11,0,11,1 !byte 1,1,1,1,1,1,1,1,15,15,15,15,15,11,11,11 !byte 11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11 !byte 11,11,11,11,11,0,11,1,1,1,1,1,1,1,1,1 !byte 1,15,15,15,15,11,11,11,11,11,11,11,11,11,11,11 !byte 11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11 !byte 1,1,1,1,1,1,1,1,1,11,15,15,11,11,11,11 !byte 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11 !byte 11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11 !byte 11,11,11,7,11,11,7,11,11,7,11,0,0,11,11,0 !byte 0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11 !byte 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11 !byte 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11 !byte 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11 !byte 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11 !byte 11,11,11,11,11,11,11,11,6,6,6,6,6,6,6,6 !byte 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 ; B minor, 32 bars AABB, one entry per sixteenth. Zero means a held note. melody: !byte 71,0,0,73,71,0,73,0,74,0,71,0,71,0,74,0 !byte 73,0,69,0,69,0,73,0,74,73,71,69,71,0,66,0 !byte 71,0,0,73,71,0,73,0,74,0,71,0,71,0,74,0 !byte 76,0,0,0,74,0,73,0,71,0,69,0,71,0,0,0 !byte 71,0,0,73,71,0,73,0,74,0,71,0,71,0,74,0 !byte 73,0,69,0,69,0,73,0,74,73,71,69,71,0,66,0 !byte 71,0,0,73,71,0,73,0,74,0,71,0,71,0,74,0 !byte 76,0,0,0,74,0,73,0,71,0,69,0,71,0,0,0 !byte 78,0,0,74,74,0,78,0,76,0,73,0,73,0,74,0 !byte 76,0,78,76,74,0,73,0,71,0,73,0,74,0,71,0 !byte 78,0,0,0,74,0,78,0,76,0,73,0,73,0,74,0 !byte 76,0,78,76,74,0,73,0,71,0,69,0,71,0,0,0 !byte 78,0,0,74,74,0,78,0,76,0,73,0,73,0,74,0 !byte 76,0,78,76,74,0,73,0,71,0,73,0,74,0,71,0 !byte 78,0,0,0,74,0,78,0,76,0,73,0,73,0,74,0 !byte 76,0,78,76,74,0,73,0,71,0,69,0,71,0,0,0 bass_notes: !byte 47,47,62,62,54,54,66,66,47,47,62,62,54,54,66,66 !byte 42,42,57,57,49,49,61,61,42,42,57,57,49,49,61,61 !byte 47,47,62,62,54,54,66,66,42,42,57,57,49,49,61,61 !byte 42,42,57,57,49,49,61,61,47,47,62,62,54,54,66,66 !byte 47,47,62,62,54,54,66,66,47,47,62,62,54,54,66,66 !byte 42,42,57,57,49,49,61,61,42,42,57,57,49,49,61,61 !byte 47,47,62,62,54,54,66,66,42,42,57,57,49,49,61,61 !byte 42,42,57,57,49,49,61,61,47,47,62,62,54,54,66,66 !byte 47,47,62,62,54,54,66,66,47,47,62,62,54,54,66,66 !byte 42,42,57,57,49,49,61,61,42,42,57,57,49,49,61,61 !byte 47,47,62,62,54,54,66,66,42,42,57,57,49,49,61,61 !byte 42,42,57,57,49,49,61,61,47,47,62,62,54,54,66,66 !byte 47,47,62,62,54,54,66,66,47,47,62,62,54,54,66,66 !byte 42,42,57,57,49,49,61,61,42,42,57,57,49,49,61,61 !byte 47,47,62,62,54,54,66,66,42,42,57,57,49,49,61,61 !byte 42,42,57,57,49,49,61,61,47,47,62,62,54,54,66,66 pal_lo: !byte 139,147,156,166,175,186,197,209,221,234,248,7,22,39,57,75 !byte 95,116,138,161,186,212,240,14,45,78,113,150,190,231,20,66 !byte 116,169,224,27,90,156,226,45,123,207,39,133,232,81,193,55 !byte 180,56,196,89,247,157,78,10,208,162,129,109,103,112,137,178 !byte 237,59,156,19,160,69,2,218,206,224,17,100,218,118,57,38 !byte 64,137,4,180,156,192,35,200,180,235,114,76,128,18,8,104 pal_hi: !byte 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1 !byte 1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3 !byte 3,3,3,4,4,4,4,5,5,5,6,6,6,7,7,8 !byte 8,9,9,10,10,11,12,13,13,14,15,16,17,18,19,20 !byte 21,23,24,26,27,29,31,32,34,36,39,41,43,46,49,52 !byte 55,58,62,65,69,73,78,82,87,92,98,104,110,117,124,131 ntsc_lo: !byte 134,142,151,159,169,179,190,201,213,226,239,253,12,28,45,63 !byte 82,102,123,146,170,195,222,250,24,56,90,126,164,204,247,36 !byte 84,134,188,245,49,113,180,252,72,152,237,72,167,12,120,233 !byte 98,226,105,248,144,48,219,143,78,25,240,211,196,195,209,240 !byte 31,97,182,30,157,50,223,166,136,134,163,224,63,194,107,61 !byte 58,100,190,76,15,12,70,191,125,132,214,122,115,200,125,151 ntsc_hi: !byte 0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1 !byte 1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3 !byte 3,3,3,3,4,4,4,4,5,5,5,6,6,7,7,7 !byte 8,8,9,9,10,11,11,12,13,14,14,15,16,17,18,19 !byte 21,22,23,25,26,28,29,31,33,35,37,39,42,44,47,50 !byte 53,56,59,63,67,71,75,79,84,89,94,100,106,112,119,126