diff --git a/Rad_Player.asm b/Rad_Player.asm index 0b3c851..7d12641 100644 --- a/Rad_Player.asm +++ b/Rad_Player.asm @@ -495,7 +495,7 @@ RAD_PLAYNOTES setas LDA #<`PATTERNS STA RAD_PTN_DEST + 2 - LDY #128 * 2 + LDY #SCREEN_WIDTH * 2 JSR DISPLAY_RAD_PTN_DEST ; display the address of the pattern setal @@ -507,7 +507,7 @@ RAD_PLAYNOTES LDA @lUNSIGNED_MULT_RESULT INC A ; skip the line number byte - LDY #128 + 2 + LDY #SCREEN_WIDTH + 2 JSR WRITE_A_LNG ; display the line offset from the pattern address TAY ; Y contains the line offset @@ -748,7 +748,7 @@ RAD_EFFECT_NOTE_SLIDE_DOWN LDA [OPL2_IND_ADDY_LL],Y ; read low fnumber byte setxl TYX - LDY #128 + 10 + LDY #SCREEN_WIDTH + 10 JSR WRITE_HEX TXY setxs @@ -762,11 +762,11 @@ RAD_EFFECT_NOTE_SLIDE_DOWN STA RAD_TEMP ; store the entire value of $B0 setxl TYX - LDY #256 + 8 + LDY #SCREEN_WIDTH * 2 + 8 JSR WRITE_HEX AND #3 - LDY #128 + 8 + LDY #SCREEN_WIDTH + 8 JSR WRITE_HEX TXY diff --git a/bpm-to-timer-count.xlsx b/bpm-to-timer-count.xlsx index 3b99d0b..78f3a27 100644 Binary files a/bpm-to-timer-count.xlsx and b/bpm-to-timer-count.xlsx differ diff --git a/ch376_attic.asm b/ch376_attic.asm index bc8c962..7708c79 100644 --- a/ch376_attic.asm +++ b/ch376_attic.asm @@ -119,7 +119,7 @@ CH376_READ_FILE ; Display the file name setxl LDX #0 - LDY #128 * 23 + 50 + LDY #SCREEN_WIDTH * 23 + 50 LF_DISPLAY_FILE_NAME LDA @lSDOS_FILE_NAME,X INX diff --git a/display.asm b/display.asm index 9d630b1..bd7ddd1 100644 --- a/display.asm +++ b/display.asm @@ -1,17 +1,16 @@ ; each line is 80 characters SCREEN_WIDTH = 80 -UNUSED_SCR = 128 - SCREEN_WIDTH TRACKER_SCREEN line1 .byte $D5 .fill SCREEN_WIDTH - 2, $C3 .byte $C9 - .fill 128 - SCREEN_WIDTH, 0 + ;.fill UNUSED_SCR, 0 line2 .byte $c2 .fill SCREEN_WIDTH - 2, 0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line3 .byte $c2 .fill (SCREEN_WIDTH - 40) / 2, 0 @@ -20,12 +19,12 @@ line3 .byte $c2 .text '[Version 0.3.1]' ; 15 characters .fill (SCREEN_WIDTH - 40) / 2, 0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line4 .byte $c2 .fill SCREEN_WIDTH - 2, 0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line5 .byte $ab .fill 50, $C3 @@ -34,7 +33,7 @@ line5 .byte $ab .byte $b2 .fill SCREEN_WIDTH - 50 -11, $C3 .byte $b3 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line6 .byte $c2 .fill 2, 0 @@ -54,7 +53,7 @@ line6 .byte $c2 .text 'MIDI' .fill 14,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line7 .byte $ab .fill 2, $C3 @@ -83,7 +82,7 @@ line7 .byte $ab .byte $db .fill SCREEN_WIDTH - 50 -11, $C3 .byte $b3 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines8 .byte $c2 @@ -105,7 +104,7 @@ lines8 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines9 .byte $c2 @@ -127,7 +126,7 @@ lines9 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines10 .byte $c2 @@ -149,7 +148,7 @@ lines10 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines11 .byte $c2 @@ -171,7 +170,7 @@ lines11 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines12 .byte $c2 @@ -193,7 +192,7 @@ lines12 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines13 .byte $c2 @@ -215,7 +214,7 @@ lines13 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines14 .byte $c2 @@ -237,7 +236,7 @@ lines14 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines15 .byte $c2 @@ -259,7 +258,7 @@ lines15 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines16 .byte $c2 @@ -281,7 +280,7 @@ lines16 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines17 .byte $c2 @@ -303,7 +302,7 @@ lines17 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines18 .byte $c2 @@ -325,7 +324,7 @@ lines18 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 lines19 .byte $c2 @@ -347,7 +346,7 @@ lines19 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line20 .byte $ab .fill 11, $C3 @@ -368,7 +367,7 @@ line20 .byte $ab .byte $c2 .fill SCREEN_WIDTH - 50 -11, 0 .byte $C2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line21 .byte $c2 @@ -390,7 +389,7 @@ line21 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line22 .byte $c2 @@ -412,7 +411,7 @@ line22 .byte $c2 .fill SCREEN_WIDTH - 50 -11,0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line23 .byte $ab .fill 8, $C3 ; line @@ -439,7 +438,7 @@ line23 .byte $ab .byte $b1 .fill SCREEN_WIDTH - 50 -11, $C3 .byte $b3 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line24 .byte $c2 @@ -455,7 +454,7 @@ line24 .text 'File: ' ; 17 chars .fill 17, 0 .byte $c2 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 line25 .byte $ca .fill 8, $C3 ; line @@ -470,50 +469,55 @@ line25 .byte $ca .byte $c3 .fill 27, $C3 .byte $cb - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 top_line .rept 8 ; 8 * 9 .fill 8,$c3 .byte $b2 .next .fill 8,$c3 - .fill UNUSED_SCR, 0 + ;.fill UNUSED_SCR, 0 -line27 .for col = '1', col <= '9', col += 1 +line27 .for col = '1', col <= '8', col += 1 .text ' - ',col,' - ' .byte $c2 .next - .fill UNUSED_SCR-1, 0 + .text ' - 9 - ' + ;.fill UNUSED_SCR-1, 0 -btm_line .rept 9 +btm_line .rept 8 .fill 8,$c3 .byte $b1 .next - .fill UNUSED_SCR-1, 0 + .fill 8,$c3 + ;.fill UNUSED_SCR-1, 0 blank_line .fill 80, $20 - .fill 48, 0 + ;.fill 48, 0 tick_line - .rept 9 + .rept 8 .text '--- ----' .byte $db .next - .fill UNUSED_SCR-1, 0 + .text '--- ----' + ;.fill UNUSED_SCR-1, 0 untick_line - .rept 9 + .rept 8 .text '--- ----' .byte $c2 .next - .fill UNUSED_SCR-1, 0 + .text '--- ----' + ;.fill UNUSED_SCR-1, 0 -line60 .rept 9 +line60 .rept 8 .fill 8,$c3 .byte $b1 .next - .fill UNUSED_SCR-1, 0 + .fill 8,$c3 + ;.fill UNUSED_SCR-1, 0 FNXFONT .binary "Font/FOENIX-CHARACTER-ASCII-2.bin", 0, 2048 @@ -557,5 +561,5 @@ FILE_LOAD_SCREEN ; 20 x 40 array .byte $cb ; when the arrow keys are used to navigate on screen -FIELD_ORDER .word 6 * 128 + 8 -HIGHLIGHT_ORDER .word 6 * 128 + 2 \ No newline at end of file +FIELD_ORDER .word 6 * SCREEN_WIDTH + 8 +HIGHLIGHT_ORDER .word 6 * SCREEN_WIDTH + 2 \ No newline at end of file diff --git a/display_func.asm b/display_func.asm index b3e82ec..5402cb5 100644 --- a/display_func.asm +++ b/display_func.asm @@ -3,7 +3,7 @@ ; * 80 columns by 60 rows DRAW_DISPLAY ; set the display size - 128 x 64 - LDA #128 + LDA #SCREEN_WIDTH STA COLS_PER_LINE LDA #64 STA LINES_MAX @@ -44,7 +44,7 @@ DRAW_DISPLAY ; copy screen data from TRACKER_SCREEN to CS_TEXT_MEM_PTR setaxl - LDA #128*28-1 + LDA #SCREEN_WIDTH*28-1 LDX #<>TRACKER_SCREEN LDY #<>CS_TEXT_MEM_PTR MVN #`TRACKER_SCREEN,#$AF @@ -87,7 +87,7 @@ DRAW_DISPLAY STA BG_CHAR_LUT_PTR + 22; ; set the character bg and fg color - LDX #128*64 + LDX #SCREEN_WIDTH*64 setas LDA #$20 SETTEXTCOLOR @@ -95,7 +95,7 @@ SETTEXTCOLOR DEX BNE SETTEXTCOLOR - LDY #38 * 128 + LDY #38 * SCREEN_WIDTH JSR REVERSE_LUT JSR HIGHLIGHT_MODE @@ -248,7 +248,7 @@ DISPLAY_PATTERN LDA PATTERN_NUM ; this is a BCD value so it won't work once values are above 9 ; display the pattern number - LDY #23*128 + 19 + LDY #23*SCREEN_WIDTH + 19 JSR WRITE_HEX ; find the starting address of the pattern and write it to the PTRN_ADDR @@ -265,14 +265,14 @@ DISPLAY_PATTERN ; Draw the line number in the heading LDA LINE_NUM_DEC ; display the line number at the 'Line:' field - LDY #23*128 + 7 + LDY #23*SCREEN_WIDTH + 7 JSR WRITE_HEX ; Draw the pattern grid LDA #32 STA REM_LINES - LDY #<>CS_TEXT_MEM_PTR + 128 * 28 ; top of the pattern display + LDY #<>CS_TEXT_MEM_PTR + SCREEN_WIDTH * 28 ; top of the pattern display LDA LINE_NUM_HEX CMP #10 BCS DRAW_DATA ; if line# is greater than 10, skip blank lines and topline @@ -286,7 +286,7 @@ DRAW_BLANK_LINES STA TAB_COUNTER BLANKS_LOOP setal - LDA #127 + LDA #SCREEN_WIDTH-1 LDX #<>blank_line MVN #`blank_line,#$AF setas @@ -296,7 +296,7 @@ BLANKS_LOOP DRAW_TOP_LINE setal - LDA #127 + LDA #SCREEN_WIDTH-1 LDX #<>top_line MVN #`top_line,#$AF setas @@ -334,7 +334,7 @@ TRIPLET BEQ draw_tick_line setal - LDA #127 + LDA #SCREEN_WIDTH-1 LDX #<>untick_line MVN #`untick_line,#$AF setas @@ -344,7 +344,7 @@ TRIPLET draw_tick_line setal - LDA #127 + LDA #SCREEN_WIDTH-1 LDX #<>tick_line MVN #`tick_line,#$AF setas @@ -362,7 +362,7 @@ next_line DRAW_BOTTOM_BAR setal - LDA #127 + LDA #SCREEN_WIDTH-1 LDX #<>btm_line MVN #`btm_line,#$AF setas @@ -371,7 +371,7 @@ DRAW_BOTTOM_BAR BLANKS_BTM_LOOP setal - LDA #127 + LDA #SCREEN_WIDTH-1 LDX #<>blank_line MVN #`blank_line,#$AF setas @@ -387,7 +387,7 @@ DISPLAY_FILENAME .as .xl LDY #0 - LDX #23*128 + 51 + LDX #23*SCREEN_WIDTH + 51 DF_LOOP LDA [SDOS_FILE_REC_PTR],Y PHY @@ -444,7 +444,7 @@ DRAW_LINE_DATA setal TYA ; copy Y into A SEC - SBC #$A080 + SBC #$A000 + SCREEN_WIDTH TAX setas @@ -702,21 +702,21 @@ REVERSE_LUT_TABS ; *********************************************************************** ; * Display Beats per minute ; *********************************************************************** -INSTR_HL_SCR = 128 * 5 + 6 -INSTR_NUM_HL_SCR = 128 * 6 + 4 -ORDER_HL_SCR = 128 * 5 + 53 -PTTRN_HL_SCR = 128 * 26 + 1 +INSTR_HL_SCR = SCREEN_WIDTH * 5 + 6 +INSTR_NUM_HL_SCR = SCREEN_WIDTH * 6 + 4 +ORDER_HL_SCR = SCREEN_WIDTH * 5 + 53 +PTTRN_HL_SCR = SCREEN_WIDTH * 26 + 1 DISPLAY_SPEED .as PHY LDA @lTuneInfo.InitialSpeed - LDY #23*128 + 40 + LDY #23*SCREEN_WIDTH + 40 JSR WRITE_HEX LDA @lTuneInfo.hasSlowTimer BEQ DS_DONE LDA #'*' - LDY #23*128 + 39 + LDY #23*SCREEN_WIDTH + 39 STA [SCREENBEGIN], Y DS_DONE PLY @@ -809,7 +809,7 @@ DISPLAY_ORDERS DO_DISPLAY_ORDERS STA TAB_COUNTER LDX #0 - LDY #128 * 7 + 53 + LDY #SCREEN_WIDTH * 7 + 53 setal LDA #<>ORDERS @@ -836,7 +836,7 @@ DISPLAY_ORDERS setal TYA CLC - ADC #128 - 3 + ADC #SCREEN_WIDTH - 3 TAY setas DEC TAB_COUNTER @@ -849,7 +849,7 @@ DISPLAY_ORDERS ; ************************************************************************ DISPLAY_ACTIVE_CHANNELS LDX #9 - LDY #$2000 + 128 * 26 + 75 + LDY #$2000 + SCREEN_WIDTH * 26 + 75 DAC_LOOP LDA CHANNELS-1,X BEQ INACTIVE_CHANNEL @@ -890,14 +890,14 @@ DISPLAY_CHAR PLY RTL -DISPLAY_NEXT_LINE +DISPLAY_NEXT_LINE_dep .as .xl setal LDA CURSORX - AND #$FF80 ; lines are $0, $80, etc + AND #$FFE0 ; lines are $0, 80, 160, etc CLC - ADC #128+31 ; move to the next line and offset to the file box + ADC #SCREEN_WIDTH + 31 ; move to the next line and offset to the file box STA CURSORX setas RTL @@ -916,7 +916,7 @@ DISPLAY_MSG JSL DISPLAY_CHAR INX BRA MSG_LOOP - MSG_DONE JSL DISPLAY_NEXT_LINE + MSG_DONE ;JSL DISPLAY_NEXT_LINE PLB @@ -996,11 +996,11 @@ TEXT_COLOUR_SELECTED LDA SDOS_LINE_SELECT STA UNSIGNED_MULT_A - LDA #128 + LDA #SCREEN_WIDTH STA UNSIGNED_MULT_B LDA UNSIGNED_MULT_RESULT CLC - ADC #128 * 11 + 31 + ADC #SCREEN_WIDTH * 11 + 31 TAY setas diff --git a/file_load.asm b/file_load.asm index 2555cfe..674811a 100644 --- a/file_load.asm +++ b/file_load.asm @@ -76,10 +76,10 @@ SHOW_FILE_MENU STA CURSORPOS+2 ; copy a 20 x 40 portion of the screen into memory - LDY #128 * 10 + 30 + LDY #SCREEN_WIDTH * 10 + 30 LDA #40 ; lines to copy STA LINE_COPY - LDX #128 * 11 + 31 ; initialize the cursor position for file display + LDX #SCREEN_WIDTH * 11 + 31 ; initialize the cursor position for file display STX CURSORX LDX #0 @@ -101,7 +101,7 @@ COPY_CHAR LDA FILE_LOAD_SCREEN,X setal TYA CLC - ADC #108 ; skip to next line + ADC #SCREEN_WIDTH - 20 ; skip to next line TAY setas DEC LINE_COPY @@ -129,8 +129,14 @@ POPULATE_FILES BEQ PF_DONE JSL DISPLAY_FAT_RECORD - JSL DISPLAY_NEXT_LINE ; Print the character + + ;JSL DISPLAY_NEXT_LINE ; Print the character setal + LDA CURSORX + CLC + ADC #SCREEN_WIDTH - 18 + STA CURSORX + LDA SDOS_FILE_REC_PTR ADC #18 STA SDOS_FILE_REC_PTR diff --git a/file_load2.asm b/file_load2.asm deleted file mode 100644 index 2555cfe..0000000 --- a/file_load2.asm +++ /dev/null @@ -1,200 +0,0 @@ -LOAD_FILE_DISPLAY - .as - .xs - setxl - LDA #2 - STA STATE_MACHINE - - ; initialize the SD Card - JSL ISDOS_INIT - - LOAD_DIRECTORY - ; no file selected - LDA #0 - STA SDOS_LINE_SELECT - - ; Set the pointer to the beginning of the struct array - LDA #`SDCARD_LIST - STA SDOS_FILE_REC_PTR+2 - STZ SDOS_FILE_REC_PTR+1 - STZ SDOS_FILE_REC_PTR - - JSR LOAD_SDCARD_DATA - JSR SHOW_FILE_MENU - JSR POPULATE_FILES - setxs - RTL - -; **************************************************** -; * Load SD card data at SDCARD_LIST -; **************************************************** -LOAD_SDCARD_DATA - .as - .xl - ; clear 1K of RAM - LDA #0 - LDY #1024 ; each struct is 18 bytes long, so this allows to load a 64 entries directory - CLEAR_FILE_AREA - STA [SDOS_FILE_REC_PTR], Y - DEY - BNE CLEAR_FILE_AREA - - ; check if the SD card is present - LDA SDCARD_PRSNT_MNT - BEQ LOAD_SDCARD_DATA_DONE ; if SD not present, exit - - ; show files from the SDRAM - JSL ISDOS_READ_MBR_BOOT - ; read the root directory - JSL ISDOS_PARSE_ROOT_DIR - - setal - LDA #FAT_DATA - STA SD_DATA - LDA #0 - STA SD_DATA + 2 - STA SD_DATA_FAT_PAGE - JSL ISDOS_READ_FAT_SECTOR - setas - LOAD_SDCARD_DATA_DONE - - RTS -; **************************************************** -; * Display the file menu box -; **************************************************** -SHOW_FILE_MENU - .as - setaxl - LDA #<>CS_TEXT_MEM_PTR ; store the initial screen buffer location - STA SCREENBEGIN - LDA #<>CS_COLOR_MEM_PTR ; store the initial colour buffer location - STA CURSORPOS - setas - - LDA #`CS_TEXT_MEM_PTR - STA SCREENBEGIN+2 - STA CURSORPOS+2 - - ; copy a 20 x 40 portion of the screen into memory - LDY #128 * 10 + 30 - LDA #40 ; lines to copy - STA LINE_COPY - LDX #128 * 11 + 31 ; initialize the cursor position for file display - STX CURSORX - - LDX #0 - - ; build the screen -COPY_LINE LDA #20 ; columns to copy - STA CHAR_COPY - -COPY_CHAR LDA FILE_LOAD_SCREEN,X - STA [SCREENBEGIN],Y - LDA #$50 ; yellow - STA [CURSORPOS],Y - - INY - INX - DEC CHAR_COPY - BNE COPY_CHAR - - setal - TYA - CLC - ADC #108 ; skip to next line - TAY - setas - DEC LINE_COPY - BNE COPY_LINE - - RTS - -; **************************************************************** -; * Populate the file menu box with the files from SDCARD_LIST -; **************************************************************** -POPULATE_FILES - .as - .xl - ; reset the file pointer - STZ SDOS_FILE_REC_PTR - STZ SDOS_FILE_REC_PTR+1 - LDA #`SDCARD_LIST - STA SDOS_FILE_REC_PTR+2 - - LDX #0 - ; read the record type - if zero, then we're done - PF_NEXT_FILE - LDY #11 - LDA [SDOS_FILE_REC_PTR],Y - BEQ PF_DONE - - JSL DISPLAY_FAT_RECORD - JSL DISPLAY_NEXT_LINE ; Print the character - setal - LDA SDOS_FILE_REC_PTR - ADC #18 - STA SDOS_FILE_REC_PTR - CMP #1152 - BCS PF_DONE - INX - CPX #38 - BEQ PF_DONE - - setas - BRA PF_NEXT_FILE - - PF_DONE - setas - ; Highlight the currently selected items - LDA #5 ; Yellow Background - JSL TEXT_COLOUR_SELECTED - RTS - -READ_FILE - .as - .xl - LDA #0 - XBA - LDA SDOS_LINE_SELECT - setaxl - STA UNSIGNED_MULT_A - ; multiply by 18 - LDA #18 - STA UNSIGNED_MULT_B - LDA UNSIGNED_MULT_RESULT - STA SDOS_FILE_REC_PTR - - ; prepare the file pointer - LDA #<>RAD_FILE_TEMP - STA SD_DATA - LDA #`RAD_FILE_TEMP - STA SD_DATA + 2 - - ; get the cluster number - LDY #16 - LDA [SDOS_FILE_REC_PTR],Y - JSL ISDOS_READ_FILE - - setas - - JSL OPL2_INIT - - ; load the song - JSL RAD_INIT_PLAYER - ; close the file loading menu - JSL EXIT_FILE - RTL -; **************************************************************** -; * EXIT the Load File Screen -; **************************************************************** -EXIT_FILE - .as - .xl - JSR RESET_STATE_MACHINE - JSR DRAW_DISPLAY - JSR DISPLAY_FILENAME - JSR DISPLAY_PATTERN - JSR DISPLAY_ORDERS - JSR DISPLAY_SPEED - - RTL diff --git a/interrupt_def.asm b/interrupt_def.asm index f825be7..7e5e1df 100644 --- a/interrupt_def.asm +++ b/interrupt_def.asm @@ -2,21 +2,25 @@ INT_PENDING_REG0 = $000140 ; INT_PENDING_REG1 = $000141 ; INT_PENDING_REG2 = $000142 ; +INT_PENDING_REG3 = $000143 ; FMX Model ; Polarity Set INT_POL_REG0 = $000144 ; INT_POL_REG1 = $000145 ; INT_POL_REG2 = $000146 ; +INT_POL_REG7 = $000147 ; FMX Model ; Edge Detection Enable INT_EDGE_REG0 = $000148 ; INT_EDGE_REG1 = $000149 ; INT_EDGE_REG2 = $00014A ; +INT_EDGE_REG3 = $00014B ; FMX Model ; Mask INT_MASK_REG0 = $00014C ; INT_MASK_REG1 = $00014D ; INT_MASK_REG2 = $00014E ; +INT_MASK_REG3 = $00014F ; FMX Model ; Interrupt Bit Definition ; Register Block 0 @@ -31,20 +35,30 @@ FNX0_INT07_MOUSE = $80 ; Mouse Interrupt (INT12 in SuperIO IOspace) ; Register Block 1 FNX1_INT00_KBD = $01 ;Keyboard Interrupt -FNX1_INT01_SC0 = $02 ;Sprite 2 Sprite Collision -FNX1_INT02_SC1 = $04 ;Sprite 2 Tiles Collision +FNX1_INT01_SC0 = $02 ;VICKY_II (INT2) Sprite 2 Sprite Collision +FNX1_INT02_SC1 = $04 ;VICKY_II (INT3) Sprite 2 Tiles Collision FNX1_INT03_COM2 = $08 ;Serial Port 2 FNX1_INT04_COM1 = $10 ;Serial Port 1 FNX1_INT05_MPU401 = $20 ;Midi Controller Interrupt FNX1_INT06_LPT = $40 ;Parallel Port -FNX1_INT07_SDCARD = $80 ;SD Card Controller Interrupt +FNX1_INT07_SDCARD = $80 ;SD Card Controller Interrupt (CH376S) ; Register Block 2 -FNX2_INT00_OPL2R = $01 ;OPl2 Right Channel -FNX2_INT01_OPL2L = $02 ;OPL2 Left Channel -FNX2_INT02_BTX_INT= $04 ;Beatrix Interrupt (TBD) -FNX2_INT03_SDMA = $08 ;System DMA -FNX2_INT04_VDMA = $10 ;Video DMA -FNX2_INT05_DACHP = $20 ;DAC Hot Plug -FNX2_INT06_EXT = $40 ;External Expansion -FNX2_INT07_ALLONE = $80 ; Not Used - Always 1 +FNX2_INT00_OPL3 = $01 ;OPl3 +FNX2_INT01_GABE_INT0 = $02 ;GABE (INT0) - TBD +FNX2_INT02_GABE_INT1 = $04 ;GABE (INT1) - TBD +FNX2_INT03_SDMA = $08 ;VICKY_II (INT4) +FNX2_INT04_VDMA = $10 ;VICKY_II (INT5) +FNX2_INT05_GABE_INT2 = $20 ;GABE (INT2) - TBD +FNX2_INT06_EXT = $40 ;External Expansion +FNX2_INT07_SDCARD_INS = $80 ; SDCARD Insertion + +; Register Block 3 (FMX Expansion) +FNX3_INT00_OPN2 = $01 ;OPN2 +FNX3_INT01_OPM = $02 ;OPM +FNX3_INT02_IDE = $04 ;HDD IDE INTERRUPT +FNX3_INT03_TBD = $08 ;TBD +FNX3_INT04_TBD = $10 ;TBD +FNX3_INT05_TBD = $20 ;GABE (INT2) - TBD +FNX3_INT06_TBD = $40 ;External Expansion +FNX3_INT07_TBD = $80 ; SDCARD Insertion diff --git a/kernel_inc.asm b/kernel_inc.asm index 3e63cc3..fcca180 100644 --- a/kernel_inc.asm +++ b/kernel_inc.asm @@ -43,16 +43,35 @@ CSRUP = $001098 ; CSRDOWN = $00109C ; CSRHOME = $0010A0 ; SCROLLUP = $0010A4 ; Scroll the screen up one line. Creates an empty line at the bottom. -SCRREADLINE = $0010A8 ; Loads the MCMDADDR/BCMDADDR variable with the address of the current line on the screen. This is called when the RETURN key is pressed and is the first step in processing an immediate mode command. -SCRGETWORD = $0010AC ; Read a current word on the screen. A word ends with a space, punctuation (except _), or any control character (value < 32). Loads the address into CMPTEXT_VAL and length into CMPTEXT_LEN variables. -CLRSCREEN = $0010B0 ; Clear the screen -INITCHLUT = $0010B4 ; Init character look-up table -INITSUPERIO = $0010B8 ; Init Super-IO chip -INITKEYBOARD = $0010BC ; Init keyboard -INITRTC = $0010C0 ; Init Real-Time Clock -INITCURSOR = $0010C4 ; Init the Cursors registers -INITFONTSET = $0010C8 ; Init the Internal FONT Memory -INITGAMMATABLE = $0010CC ; Init the RGB GAMMA Look Up Table -INITALLLUT = $0010D0 ; Init the Graphic Engine (Bitmap/Tile/Sprites) LUT -INITVKYTXTMODE = $0010D4 ; Init the Text Mode @ Reset Time -INITVKYGRPMODE = $0010D8 ; Init the Basic Registers for the Graphic Mode +; Undefined label for: SCRGETWORD = %ADDR% ; Read a current word on the screen. A word ends with a space, punctuation (except _), or any control character (value < 32). Loads the address into CMPTEXT_VAL and length into CMPTEXT_LEN variables. +CLRSCREEN = $0010A8 ; Clear the screen +INITCHLUT = $0010AC ; Init character look-up table +INITSUPERIO = $0010B0 ; Init Super-IO chip +INITKEYBOARD = $0010B4 ; Init keyboard +; Undefined label for: INITRTC = %ADDR% ; Init Real-Time Clock +INITCURSOR = $0010BC ; Init the Cursors registers +INITFONTSET = $0010C0 ; Init the Internal FONT Memory +INITGAMMATABLE = $0010C4 ; Init the RGB GAMMA Look Up Table +INITALLLUT = $0010C8 ; Init the Graphic Engine (Bitmap/Tile/Sprites) LUT +INITVKYTXTMODE = $0010CC ; Init the Text Mode @ Reset Time +INITVKYGRPMODE = $0010D0 ; Init the Basic Registers for the Graphic Mode +SETSIZES = $00112C ; Set the text screen size variables based on the border and screen resolution. +F_OPEN = $0010F0 ; open a file for reading/writing/creating +F_CREATE = $0010F4 ; create a new file +F_CLOSE = $0010F8 ; close a file (make sure last cluster is written) +F_WRITE = $0010FC ; write the current cluster to the file +F_READ = $001100 ; read the next cluster from the file +F_DELETE = $001104 ; delete a file / directory +; Undefined label for: F_RENAME = %ADDR% ; rename a file +F_DIROPEN = $001108 ; open a directory and seek the first directory entry +F_DIRNEXT = $00110C ; seek to the next directory of an open directory +F_DIRREAD = $001110 ; Read the directory entry for the specified file +F_DIRWRITE = $001114 ; Write any changes in the current directory cluster back to the drive +F_LOAD = $001118 ; load a binary file into memory, supports multiple file formats +F_SAVE = $00111C ; Save memory to a binary file +CMDBLOCK = $001120 ; Send a command to a block device +F_RUN = $001124 ; Load and run an executable binary file +F_MOUNT = $001128 ; Mount the designated block device +F_COPY = $001130 ; Copy a file +F_ALLOCFD = $001134 ; Allocate a file descriptor +F_FREEFD = $001138 ; Free a file descriptor diff --git a/keyboard_def.asm b/keyboard_def.asm index 369d774..0cbcd49 100644 --- a/keyboard_def.asm +++ b/keyboard_def.asm @@ -1,4 +1,8 @@ -; +;;; +;;; Register address and constant definitions for the keyboard interface +;;; + +; Register addresses STATUS_PORT = $AF1064 KBD_OUT_BUF = $AF1060 KBD_INPT_BUF = $AF1060 diff --git a/midi.asm b/midi.asm index a6f95ce..3056a22 100644 --- a/midi.asm +++ b/midi.asm @@ -18,7 +18,7 @@ INIT_MIDI LDA #$3F STA @lMIDI_STATUS_REG - LDY #10 * 128 + 70 + LDY #10 * SCREEN_WIDTH + 70 MORE_DATA LDA @lMIDI_DATA_REG JSR WRITE_HEX INY @@ -92,13 +92,13 @@ NOTE_ON ; we need two data bytes: the note and the velocity setxl LDA MIDI_CTRL - LDY #12*128 + 66 + LDY #12*SCREEN_WIDTH + 66 JSR WRITE_HEX ; NOTE VALUE LDA MIDI_DATA1 STA @lD0_OPERAND_B - LDY #12*128 + 68 + LDY #12*SCREEN_WIDTH + 68 JSR WRITE_HEX LDA #0 @@ -111,17 +111,17 @@ NOTE_ON ; we need two data bytes: the note and the velocity LDA @lD0_RESULT SBC #2 STA OPL2_OCTAVE - LDY #12*128 + 72 + LDY #12*SCREEN_WIDTH + 72 JSR WRITE_HEX LDA @lD0_REMAINDER STA OPL2_NOTE - LDY #12*128 + 74 + LDY #12*SCREEN_WIDTH + 74 JSR WRITE_HEX ; VELOCITY VALUE LDA MIDI_DATA2 - LDY #12*128 + 76 + LDY #12*SCREEN_WIDTH + 76 JSR WRITE_HEX ; /// if velocity is zero, turn note off @@ -129,7 +129,7 @@ NOTE_ON ; we need two data bytes: the note and the velocity BNE PLAY_NOTE_ON ; otherwise, turn note on STA OPL2_PARAMETER0 LDA #$FF - LDY #12*128 + 78 + LDY #12*SCREEN_WIDTH + 78 JSR WRITE_HEX JSR OPL2_SET_KEYON @@ -165,15 +165,15 @@ PITCH_BEND setxl LDA MIDI_CTRL - LDY #14*128 + 66 + LDY #14*SCREEN_WIDTH + 66 JSR WRITE_HEX LDA MIDI_DATA1 - LDY #14*128+68 + LDY #14*SCREEN_WIDTH+68 JSR WRITE_HEX LDA MIDI_DATA2 - LDY #14*128+70 + LDY #14*SCREEN_WIDTH+70 JSR WRITE_HEX STZ MIDI_COUNTER @@ -189,11 +189,11 @@ CHANNEL_PRESSURE PHA setxl LDA MIDI_CTRL - LDY #15*128 + 66 + LDY #15*SCREEN_WIDTH + 66 JSR WRITE_HEX PLA - LDY #15*128 + 68 + LDY #15*SCREEN_WIDTH + 68 JSR WRITE_HEX LDA #16 @@ -210,7 +210,7 @@ SYSTEM_COMMAND LDA #0 DISPLAY_COUNTER - LDY #16*128 + 66 + LDY #16*SCREEN_WIDTH + 66 JSR WRITE_HEX STA @lTIMING_CNTR RTS diff --git a/sdcard.asm b/sdcard.asm index d1c371e..49849c1 100644 --- a/sdcard.asm +++ b/sdcard.asm @@ -106,7 +106,7 @@ CLEAR_DISPLAY .as .xl setal - LDA #128 + LDA #SCREEN_WIDTH STA COLS_PER_LINE LDA #64 STA LINES_MAX diff --git a/tracker.asm b/tracker.asm index 0647cc7..4d90e0d 100644 --- a/tracker.asm +++ b/tracker.asm @@ -30,8 +30,8 @@ LINE_NUM_DEC .byte 1 ; line being display/played LINE_COPY = $80 CHAR_COPY = $81 -ORDER_EDITOR_SCR = 128 * 7 + 53 -PTRN_EDITOR_SCR = 128 * 27 + 4 +ORDER_EDITOR_SCR = SCREEN_WIDTH * 7 + 53 +PTRN_EDITOR_SCR = SCREEN_WIDTH * 27 + 4 * = HRESET CLC @@ -241,7 +241,7 @@ INCREMENT_ORDER LOAD_ORDER STA @lRAD_ORDER_NUM TAX - LDY #128 * 5 + LDY #SCREEN_WIDTH * 5 JSR WRITE_HEX LDA @lORDERS,X ; load the pattern from the order list @@ -377,7 +377,7 @@ LOAD_INSTRUMENT setas ; Y still contains the instrument number LDA @lINSTR_NUMBER - LDY #5 * 128 + 19 + LDY #5 * SCREEN_WIDTH + 19 JSR WRITE_HEX LDA [INSTR_ADDR] @@ -434,7 +434,7 @@ LOAD_INSTRUMENT STA INSTR_ADDR setas ;display instrument name - LDY #5 * 128 + 24 + LDY #5 * SCREEN_WIDTH + 24 JSR WRITE_INSTRUMENT_NAME DRUM_SET @@ -449,27 +449,27 @@ LOAD_AM_VIB_MULT PHA STA @lOPL3_R_AM_VID_EG_KSR_MULT,X AND #TREMOLO - LDY #7 * 128 + 13 + LDY #7 * SCREEN_WIDTH + 13 JSR WRITE_OFF_ON PLA AND #VIBRATO - LDY #8 * 128 + 13 + LDY #8 * SCREEN_WIDTH + 13 JSR WRITE_OFF_ON PLA AND #SUSTAINING - LDY #9 * 128 + 13 + LDY #9 * SCREEN_WIDTH + 13 JSR WRITE_OFF_ON PLA AND #KSR - LDY #10 * 128 + 13 + LDY #10 * SCREEN_WIDTH + 13 JSR WRITE_OFF_ON PLA AND #MULTIPLIER - LDY #11 * 128 + 14 + LDY #11 * SCREEN_WIDTH + 14 JSR WRITE_HEX LDY #6 @@ -480,27 +480,27 @@ LOAD_AM_VIB_MULT PHA STA @lOPL3_R_AM_VID_EG_KSR_MULT + 3,X AND #TREMOLO - LDY #7 * 128 + 39 + LDY #7 * SCREEN_WIDTH + 39 JSR WRITE_OFF_ON PLA AND #VIBRATO - LDY #8 * 128 + 39 + LDY #8 * SCREEN_WIDTH + 39 JSR WRITE_OFF_ON PLA AND #SUSTAINING - LDY #9 * 128 + 39 + LDY #9 * SCREEN_WIDTH + 39 JSR WRITE_OFF_ON PLA AND #KSR - LDY #10 * 128 + 39 + LDY #10 * SCREEN_WIDTH + 39 JSR WRITE_OFF_ON PLA AND #MULTIPLIER - LDY #11 * 128 + 40 + LDY #11 * SCREEN_WIDTH + 40 JSR WRITE_HEX RTS @@ -515,12 +515,12 @@ LOAD_KEY_OP_LVL ROL A ROL A ROL A - LDY #12 * 128 + 14 + LDY #12 * SCREEN_WIDTH + 14 JSR WRITE_HEX PLA AND #OP_LEVEL - LDY #13 * 128 + 14 + LDY #13 * SCREEN_WIDTH + 14 JSR WRITE_HEX ; Operator 2 @@ -532,12 +532,12 @@ LOAD_KEY_OP_LVL ROL A ROL A ROL A - LDY #12 * 128 + 40 + LDY #12 * SCREEN_WIDTH + 40 JSR WRITE_HEX PLA AND #OP_LEVEL - LDY #13 * 128 + 40 + LDY #13 * SCREEN_WIDTH + 40 JSR WRITE_HEX RTS @@ -551,12 +551,12 @@ LOAD_ATT_DEC_RATE LSR A LSR A LSR A - LDY #14 * 128 + 14 + LDY #14 * SCREEN_WIDTH + 14 JSR WRITE_HEX PLA AND #DECAY_RT - LDY #15 * 128 + 14 + LDY #15 * SCREEN_WIDTH + 14 JSR WRITE_HEX LDY #6 @@ -568,12 +568,12 @@ LOAD_ATT_DEC_RATE LSR A LSR A LSR A - LDY #14 * 128 + 40 + LDY #14 * SCREEN_WIDTH + 40 JSR WRITE_HEX PLA AND #DECAY_RT - LDY #15 * 128 + 40 + LDY #15 * SCREEN_WIDTH + 40 JSR WRITE_HEX RTS @@ -586,12 +586,12 @@ LOAD_SUSTAIN_RELEASE_RATE LSR A LSR A LSR A - LDY #16 * 128 + 14 + LDY #16 * SCREEN_WIDTH + 14 JSR WRITE_HEX PLA AND #DECAY_RT - LDY #17 * 128 + 14 + LDY #17 * SCREEN_WIDTH + 14 JSR WRITE_HEX LDY #6 @@ -603,12 +603,12 @@ LOAD_SUSTAIN_RELEASE_RATE LSR A LSR A LSR A - LDY #16 * 128 + 40 + LDY #16 * SCREEN_WIDTH + 40 JSR WRITE_HEX PLA AND #DECAY_RT - LDY #17 * 128 + 40 + LDY #17 * SCREEN_WIDTH + 40 JSR WRITE_HEX RTS @@ -619,12 +619,12 @@ LOAD_FEEDBACK_ALGO STA @lOPL3_R_FEEDBACK,X AND #FEEDBACK LSR A - LDY #20 * 128 + 40 + LDY #20 * SCREEN_WIDTH + 40 JSR WRITE_HEX PLA AND #ALGORITHM - LDY #21 * 128 + 40 + LDY #21 * SCREEN_WIDTH + 40 JSR WRITE_HEX RTS @@ -633,14 +633,14 @@ LOAD_WAVE LDA [INSTR_ADDR] STA @lOPL3_R_WAVE_SELECT,X AND #$7 - LDY #18 * 128 + 14 + LDY #18 * SCREEN_WIDTH + 14 JSR WRITE_HEX LDY #5 LDA [INSTR_ADDR],Y STA @lOPL3_R_WAVE_SELECT+3,X AND #$7 - LDY #18 * 128 + 40 + LDY #18 * SCREEN_WIDTH + 40 JSR WRITE_HEX RTS @@ -869,7 +869,7 @@ PLAY_TRACKER_NOTE LDA @lSCAN_TO_NOTE, X setxl - LDY #128 + 70 + LDY #SCREEN_WIDTH + 70 JSR WRITE_HEX STA @lOPL2_NOTE diff --git a/tracker.hex b/tracker.hex index a6cacbc..fffc029 100644 --- a/tracker.hex +++ b/tracker.hex @@ -1,9 +1,9 @@ :1700600000000000000000000000170001010101000000000000006E :020000040038C2 :1A0F000000000000003031323334353637383941424344454600007D0101B6 -:07FF000018FB785CD769389B -:11FF6000C2308B0B48DA5A22A457387AFA682BAB4045 -:20FFE0005CD7693810FF20FF30FF40FF000060FF5CD7693810FF20FF30FF40FF00FF60FF64 +:07FF000018FB785CD36338A5 +:11FF6000C2308B0B48DA5A22A451387AFA682BAB404B +:20FFE0005CD3633810FF20FF30FF40FF000060FF5CD3633810FF20FF30FF40FF00FF60FF78 :201000006B0181019801B001CA01E50102022002410263028702AE0200010208090A1011A1 :20102000120304050B0C0D131415101314121511100804020120406080E0C000244FF20B54 :20104000000E3100520B004143434F52444E2020200031436E17010222058B0C0242414714 @@ -348,472 +348,424 @@ :203B6000000000000000000000000000000000000000000000000000000000000000000045 :203B8000D5C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3B3 :203BA000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3A5 -:203BC000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C900000000000000000000000000000000AF +:203BC000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C9C2000000000000000000000000000000ED :203BE0000000000000000000000000000000000000000000000000000000000000000000C5 -:203C0000C200000000000000000000000000000000000000000000000000000000000000E2 -:203C2000000000000000000000000000000000000000000000000000000000000000000084 -:203C4000000000000000000000000000000000C200000000000000000000000000000000A2 -:203C6000000000000000000000000000000000000000000000000000000000000000000044 -:203C8000C200000000000000000000000000000000000000004332353620466F656E6978F9 -:203CA00020547261636B6572000000005B56657273696F6E20302E332E315D00000000006A -:203CC000000000000000000000000000000000C20000000000000000000000000000000022 -:203CE0000000000000000000000000000000000000000000000000000000000000000000C4 -:203D0000C200000000000000000000000000000000000000000000000000000000000000E1 -:203D2000000000000000000000000000000000000000000000000000000000000000000083 -:203D4000000000000000000000000000000000C200000000000000000000000000000000A1 -:203D6000000000000000000000000000000000000000000000000000000000000000000043 -:203D8000ABC3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3DB -:203DA000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3B2C3C3C3C3C5 -:203DC000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3B300000000000000000000000000000000C3 -:203DE0000000000000000000000000000000000000000000000000000000000000000000C3 -:203E0000C20000B0C3AE496E737472756D656E74205B2D2D2D5D3A0000202020202020200D -:203E20002020202020000000000000000000B0C3AE0000C2004F7264657200C2004D494467 -:203E4000490000000000000000000000000000C20000000000000000000000000000000057 -:203E6000000000000000000000000000000000000000000000000000000000000000000042 -:203E8000ABC3C3BD31ADC3C3C3C3C3C3B2C3C3C3B2C3C3C3C3C3C3C3C3C399C3C3C3C3C3D4 -:203EA000C3C3C3C3C3C3B2C3C3C3B2C3C3C3BD32ADC3C3DBC3C3C3B2C3C3C3DBC3C3C3C352 -:203EC000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3B300000000000000000000000000000000C2 -:203EE0000000000000000000000000000000000000000000000000000000000000000000C2 -:203F0000C25472656D6F6C6F20202020C24F6666C20000000000000000009A5472656D6F3D -:203F20006C6F20202020C24F6666C20000000000000000C2000000C2000000C20000000041 -:203F4000000000000000000000000000000000C2000000000000000000000000000000009F -:203F6000000000000000000000000000000000000000000000000000000000000000000041 -:203F8000C25669627261746F20202020C24F6666C20000000000000000009A5669627261DB -:203FA000746F20202020C24F6666C20000000000000000C2000000C2000000C200000000B9 -:203FC000000000000000000000000000000000C2000000000000000000000000000000001F -:203FE0000000000000000000000000000000000000000000000000000000000000000000C1 -:20400000C25375737461696E696E6720C24F6666C20000000000000000009A537573746150 -:20402000696E696E6720C24F6666C20000000000000000C2000000C2000000C20000000066 -:20404000000000000000000000000000000000C2000000000000000000000000000000009E -:20406000000000000000000000000000000000000000000000000000000000000000000040 -:20408000C25363616C65205261746520C24F6666C20000000000000000009A5363616C6589 -:2040A000205261746520C24F6666C20000000000000000C2000000C2000000C2000000004F -:2040C000000000000000000000000000000000C2000000000000000000000000000000001E -:2040E0000000000000000000000000000000000000000000000000000000000000000000C0 -:20410000C24D756C7469706C69657220C2203030C20000000000000000009A4D756C7469ED -:20412000706C69657220C2203030C20000000000000000C2000000C2000000C200000000F9 -:20414000000000000000000000000000000000C2000000000000000000000000000000009D -:2041600000000000000000000000000000000000000000000000000000000000000000003F -:20418000C25363616C65204C6576656CC2203030C20000000000000000009A5363616C65D7 -:2041A000204C6576656CC2203030C20000000000000000C2000000C2000000C2000000009D -:2041C000000000000000000000000000000000C2000000000000000000000000000000001D -:2041E0000000000000000000000000000000000000000000000000000000000000000000BF -:20420000C2566F6C756D652020202020C2203030C20000000000000000009A566F6C756D13 -:20422000652020202020C2203030C20000000000000000C2000000C2000000C2000000002F -:20424000000000000000000000000000000000C2000000000000000000000000000000009C -:2042600000000000000000000000000000000000000000000000000000000000000000003E -:20428000C241747461636B2020202020C2203030C20000000000000000009A4174746163D9 -:2042A0006B2020202020C2203030C20000000000000000C2000000C2000000C200000000A9 -:2042C000000000000000000000000000000000C2000000000000000000000000000000001C -:2042E0000000000000000000000000000000000000000000000000000000000000000000BE -:20430000C24465636179202020202020C2203030C20000000000000000009A4465636179B1 -:20432000202020202020C2203030C20000000000000000C2000000C2000000C20000000073 -:20434000000000000000000000000000000000C2000000000000000000000000000000009B -:2043600000000000000000000000000000000000000000000000000000000000000000003D -:20438000C25375737461696E20202020C2203030C20000000000000000009A537573746146 -:2043A000696E20202020C2203030C20000000000000000C2000000C2000000C2000000005C -:2043C000000000000000000000000000000000C2000000000000000000000000000000001B -:2043E0000000000000000000000000000000000000000000000000000000000000000000BD -:20440000C252656C6561736520202020C2203030C20000000000000000009A52656C656112 -:20442000736520202020C2203030C20000000000000000C2000000C2000000C200000000DA -:20444000000000000000000000000000000000C2000000000000000000000000000000009A -:2044600000000000000000000000000000000000000000000000000000000000000000003C -:20448000C25761766520547970652020C2203030C20000000000000000009A576176652074 -:2044A000547970652020C2203030C20000000000000000C2000000C2000000C200000000D0 -:2044C000000000000000000000000000000000C2000000000000000000000000000000001A -:2044E0000000000000000000000000000000000000000000000000000000000000000000BC -:20450000ABC3C3C3C3C3C3C3C3C3C3C3DBC3C3C3DBC3C3C3C3C3C3C3C3C39BC3C3C3C3C34B -:20452000C3C3C3C3C3C3DBC3C3C3DBC3C3C3C3C3C3C3C3B3000000C2000000C2000000009B -:20454000000000000000000000000000000000C20000000000000000000000000000000099 -:2045600000000000000000000000000000000000000000000000000000000000000000003B -:20458000C250616E6E696E6720202020C2203030C20000000000000000009A2046656564DC -:2045A0006261636B2020C2203030C20000000000000000C2000000C2000000C200000000E0 -:2045C000000000000000000000000000000000C20000000000000000000000000000000019 -:2045E0000000000000000000000000000000000000000000000000000000000000000000BB -:20460000C25269666620537065656420C2203030C20000000000000000009A20416C676FDF -:20462000726974686D20C2203030C20000000000000000C2000000C2000000C200000000EC -:20464000000000000000000000000000000000C20000000000000000000000000000000098 +:203C000000000000000000000000000000000000000000000000000000000000000000C2E2 +:203C2000C200000000000000000000000000000000000000004332353620466F656E697859 +:203C400020547261636B6572000000005B56657273696F6E20302E332E315D0000000000CA +:203C6000000000000000000000000000000000C2C2000000000000000000000000000000C0 +:203C8000000000000000000000000000000000000000000000000000000000000000000024 +:203CA00000000000000000000000000000000000000000000000000000000000000000C242 +:203CC000ABC3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C39C +:203CE000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3B2C3C3C3C386 +:203D0000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3B3C20000B0C3AE496E737472756D656E7467 +:203D2000205B2D2D2D5D3A0000202020202020202020202020000000000000000000B0C3F7 +:203D4000AE0000C2004F7264657200C2004D4944490000000000000000000000000000C250 +:203D6000ABC3C3BD31ADC3C3C3C3C3C3B2C3C3C3B2C3C3C3C3C3C3C3C3C399C3C3C3C3C3F5 +:203D8000C3C3C3C3C3C3B2C3C3C3B2C3C3C3BD32ADC3C3DBC3C3C3B2C3C3C3DBC3C3C3C373 +:203DA000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3B3C25472656D6F6C6F20202020C24F6666E2 +:203DC000C20000000000000000009A5472656D6F6C6F20202020C24F6666C2000000000086 +:203DE000000000C2000000C2000000C200000000000000000000000000000000000000C2BB +:203E0000C25669627261746F20202020C24F6666C20000000000000000009A56696272615C +:203E2000746F20202020C24F6666C20000000000000000C2000000C2000000C2000000003A +:203E4000000000000000000000000000000000C2C25375737461696E696E6720C24F6666BC +:203E6000C20000000000000000009A5375737461696E696E6720C24F6666C2000000000002 +:203E8000000000C2000000C2000000C200000000000000000000000000000000000000C21A +:203EA000C25363616C65205261746520C24F6666C20000000000000000009A5363616C656B +:203EC000205261746520C24F6666C20000000000000000C2000000C2000000C20000000031 +:203EE000000000000000000000000000000000C2C24D756C7469706C69657220C2203030B5 +:203F0000C20000000000000000009A4D756C7469706C69657220C2203030C20000000000FA +:203F2000000000C2000000C2000000C200000000000000000000000000000000000000C279 +:203F4000C25363616C65204C6576656CC2203030C20000000000000000009A5363616C6519 +:203F6000204C6576656CC2203030C20000000000000000C2000000C2000000C200000000DF +:203F8000000000000000000000000000000000C2C2566F6C756D652020202020C220303043 +:203FA000C20000000000000000009A566F6C756D652020202020C2203030C2000000000089 +:203FC000000000C2000000C2000000C200000000000000000000000000000000000000C2D9 +:203FE000C241747461636B2020202020C2203030C20000000000000000009A41747461637C +:204000006B2020202020C2203030C20000000000000000C2000000C2000000C2000000004B +:20402000000000000000000000000000000000C2C24465636179202020202020C220303014 +:20404000C20000000000000000009A4465636179202020202020C2203030C200000000005A +:20406000000000C2000000C2000000C200000000000000000000000000000000000000C238 +:20408000C25375737461696E20202020C2203030C20000000000000000009A537573746149 +:2040A000696E20202020C2203030C20000000000000000C2000000C2000000C2000000005F +:2040C000000000000000000000000000000000C2C252656C6561736520202020C2203030D9 +:2040E000C20000000000000000009A52656C6561736520202020C2203030C200000000001F +:20410000000000C2000000C2000000C200000000000000000000000000000000000000C297 +:20412000C25761766520547970652020C2203030C20000000000000000009A5761766520D7 +:20414000547970652020C2203030C20000000000000000C2000000C2000000C20000000033 +:20416000000000000000000000000000000000C2ABC3C3C3C3C3C3C3C3C3C3C3DBC3C3C34D +:20418000DBC3C3C3C3C3C3C3C3C39BC3C3C3C3C3C3C3C3C3C3C3DBC3C3C3DBC3C3C3C3C39F +:2041A000C3C3C3B3000000C2000000C200000000000000000000000000000000000000C2BD +:2041C000C250616E6E696E6720202020C2203030C20000000000000000009A2046656564A0 +:2041E0006261636B2020C2203030C20000000000000000C2000000C2000000C200000000A4 +:20420000000000000000000000000000000000C2C25269666620537065656420C220303020 +:20422000C20000000000000000009A20416C676F726974686D20C2203030C2000000000037 +:20424000000000C2000000C2000000C200000000000000000000000000000000000000C256 +:20426000ABC3C3C3C3C3C3C3C3B2C3C3B1C3C3C3B1C3C3C3C3B2C3C3C3C39CC3C3C3C3C363 +:20428000B2C3C3C3C3C3B1C3C3C3DBC3C3C3C3C3C3C3C3B1C3C3C3B1C3C3C3B1C3C3C3C3FF +:2042A000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3B3C24C696E653A204E41C250617474657279 +:2042C0006E3A204E41C24F63746176653A20204EC253706565643A20204EC2000046696C43 +:2042E000653A2020202020202020202020200000000000000000000000000000000000C2DD +:20430000CAC3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3C3C35A +:20432000B1C3C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C341 +:20434000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3CBC3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C306 +:20436000C3B2C3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3C3B2C3C3C321 +:20438000C3C3C3C3C3B2C3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3C3F0 +:2043A000202D203120202D20C2202D203220202D20C2202D203320202D20C2202D20342072 +:2043C000202D20C2202D203520202D20C2202D203620202D20C2202D203720202D20C220B8 +:2043E0002D203820202D20C2202D203920202D20C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C398 +:20440000C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C384 +:20442000C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C352 +:2044400020202020202020202020202020202020202020202020202020202020202020205C +:2044600020202020202020202020202020202020202020202020202020202020202020203C +:20448000202020202020202020202020202020202D2D2D202D2D2D2DDB2D2D2D202D2D2DB8 +:2044A0002DDB2D2D2D202D2D2D2DDB2D2D2D202D2D2D2DDB2D2D2D202D2D2D2DDB2D2D2DCB +:2044C000202D2D2D2DDB2D2D2D202D2D2D2DDB2D2D2D202D2D2D2DDB2D2D2D202D2D2D2D66 +:2044E0002D2D2D202D2D2D2DC22D2D2D202D2D2D2DC22D2D2D202D2D2D2DC22D2D2D202D91 +:204500002D2D2DC22D2D2D202D2D2D2DC22D2D2D202D2D2D2DC22D2D2D202D2D2D2DC22DCE +:204520002D2D202D2D2D2DC22D2D2D202D2D2D2DC3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C312 +:20454000C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C343 +:20456000C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C311 +:2045800000000000000000000000000000000000000000000000000000000000000000001B +:2045A0000000000000000000000000000000000000000000000000000000000000000000FB +:2045C00000000000000000000000140C1400000000000000000000000000000000000000A7 +:2045E0000000000000000000000004143C1000000000000000000000000000000000000057 +:2046000000000000000000000000000000000000000000000000000000000000000000009A +:2046200000000000000000000000000000000000000000000000000000000000000000007A +:2046400000000000000000000000000000000000000000000000000000000000000000005A :2046600000000000000000000000000000000000000000000000000000000000000000003A -:20468000ABC3C3C3C3C3C3C3C3B2C3C3B1C3C3C3B1C3C3C3C3B2C3C3C3C39CC3C3C3C3C33F -:2046A000B2C3C3C3C3C3B1C3C3C3DBC3C3C3C3C3C3C3C3B1C3C3C3B1C3C3C3B1C3C3C3C3DB -:2046C000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3B300000000000000000000000000000000BA -:2046E0000000000000000000000000000000000000000000000000000000000000000000BA -:20470000C24C696E653A204E41C25061747465726E3A204E41C24F63746176653A20204EF1 -:20472000C253706565643A20204EC2000046696C653A202020202020202020202020000002 -:20474000000000000000000000000000000000C20000000000000000000000000000000097 -:20476000000000000000000000000000000000000000000000000000000000000000000039 -:20478000CAC3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3C3C3D6 -:2047A000B1C3C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3BD -:2047C000C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3CB00000000000000000000000000000000A1 -:2047E0000000000000000000000000000000000000000000000000000000000000000000B9 -:20480000C3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3C3B2C3C3C3C3C36B -:20482000C3C3C3B2C3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3C3B2C35C -:20484000C3C3C3C3C3C3C3B2C3C3C3C3C3C3C3C30000000000000000000000000000000039 -:20486000000000000000000000000000000000000000000000000000000000000000000038 -:20488000202D203120202D20C2202D203220202D20C2202D203320202D20C2202D2034208D -:2048A000202D20C2202D203520202D20C2202D203620202D20C2202D203720202D20C220D3 -:2048C0002D203820202D20C2202D203920202D20C20000000000000000000000000000000F -:2048E0000000000000000000000000000000000000000000000000000000000000000000B8 -:20490000C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C36D -:20492000C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C35F -:20494000C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B100000000000000000000000000000088 -:20496000000000000000000000000000000000000000000000000000000000000000000037 -:20498000202020202020202020202020202020202020202020202020202020202020202017 -:2049A0002020202020202020202020202020202020202020202020202020202020202020F7 -:2049C0002020202020202020202020202020202000000000000000000000000000000000D7 +:204680000000000000000000181818180000180066666600000000006666FF66FF66660074 +:2046A000183E603C067C180062660C18306646003C663C3867663F00060C1800000000005A +:2046C0000C18303030180C0030180C0C0C18300000663CFF3C6600000018187E181800002D +:2046E00000000000001818300000007E0000000000000000001818000003060C18306000EF +:204700003C666E7666663C001818381818187E003C66060C30607E003C66061C06663C00AF +:20472000060E1E667F0606007E607C0606663C003C66607C66663C007E660C181818180078 +:204740003C66663C66663C003C66663E06663C000000180000180000000018000018183077 +:204760000E18306030180E0000007E007E00000070180C060C1870003C66060C180018001F +:204780003C666E6E60623C00183C667E666666007C66667C66667C003C66606060663C00C3 +:2047A000786C6666666C78007E60607860607E007E606078606060003C66606E66663C00BD +:2047C0006666667E666666003C18181818183C001E0C0C0C0C6C3800666C7870786C660011 +:2047E0006060606060607E0063777F6B6363630066767E7E6E6666003C66666666663C0086 +:204800007C66667C606060003C666666663C0E007C66667C786C66003C66603C06663C00A2 +:204820007E181818181818006666666666663C0066666666663C18006363636B7F7763008B +:2048400066663C183C6666006666663C181818007E060C1830607E003C30303030303C005C +:2048600000C06030180C06003C0C0C0C0C0C3C0000183C6600000000000000000000007ED2 +:20488000603018000000000000003C063E663E000060607C66667C0000003C6060603C0030 +:2048A0000006063E66663E0000003C667E603C00000E183E1818180000003E66663E067C72 +:2048C0000060607C666666000018003818183C00000600060606063C0060606C786C6600DE +:2048E0000038181818183C000000667F7F6B630000007C666666660000003C6666663C00F4 +:2049000000007C66667C606000003E66663E060600007C666060600000003E603C067C0061 +:2049200000187E1818180E000000666666663E0000006666663C18000000636B7F3E36006E +:204940000000663C183C660000006666663E0C7800007E0C18307E001C18183018181C00EF +:2049600018181800181818003818180C181838000000327E4C0000000000000000000000CF +:2049800000003C3C3C3C000000003C24243C00000000183C3C180000000018242418000047 +:2049A0001824241800000000003C424266246600001800180C06663C0C12307C3062FC0093 +:2049C0001C20702070201C000000000000000000000000000000000000000000000000005F :2049E0000000000000000000000000000000000000000000000000000000000000000000B7 -:204A00002D2D2D202D2D2D2DDB2D2D2D202D2D2D2DDB2D2D2D202D2D2D2DDB2D2D2D202D20 -:204A20002D2D2DDB2D2D2D202D2D2D2DDB2D2D2D202D2D2D2DDB2D2D2D202D2D2D2DDB2D45 -:204A40002D2D202D2D2D2DDB2D2D2D202D2D2D2DDB00000000000000000000000000000017 -:204A6000000000000000000000000000000000000000000000000000000000000000000036 -:204A80002D2D2D202D2D2D2DC22D2D2D202D2D2D2DC22D2D2D202D2D2D2DC22D2D2D202DEB -:204AA0002D2D2DC22D2D2D202D2D2D2DC22D2D2D202D2D2D2DC22D2D2D202D2D2D2DC22D29 -:204AC0002D2D202D2D2D2DC22D2D2D202D2D2D2DC2000000000000000000000000000000C9 -:204AE0000000000000000000000000000000000000000000000000000000000000000000B6 -:204B0000C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C36B -:204B2000C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B1C35D -:204B4000C3C3C3C3C3C3C3B1C3C3C3C3C3C3C3C3B100000000000000000000000000000086 -:204B6000000000000000000000000000000000000000000000000000000000000000000035 -:204B8000000000000000000000000000000000000000000000000000000000000000000015 -:204BA0000000000000000000000000000000000000000000000000000000000000000000F5 -:204BC00000000000000000000000140C1400000000000000000000000000000000000000A1 -:204BE0000000000000000000000004143C1000000000000000000000000000000000000051 -:204C0000000000000000000000000000000000000000000000000000000000000000000094 -:204C2000000000000000000000000000000000000000000000000000000000000000000074 -:204C4000000000000000000000000000000000000000000000000000000000000000000054 -:204C6000000000000000000000000000000000000000000000000000000000000000000034 -:204C80000000000000000000181818180000180066666600000000006666FF66FF6666006E -:204CA000183E603C067C180062660C18306646003C663C3867663F00060C18000000000054 -:204CC0000C18303030180C0030180C0C0C18300000663CFF3C6600000018187E1818000027 -:204CE00000000000001818300000007E0000000000000000001818000003060C18306000E9 -:204D00003C666E7666663C001818381818187E003C66060C30607E003C66061C06663C00A9 -:204D2000060E1E667F0606007E607C0606663C003C66607C66663C007E660C181818180072 -:204D40003C66663C66663C003C66663E06663C000000180000180000000018000018183071 -:204D60000E18306030180E0000007E007E00000070180C060C1870003C66060C1800180019 -:204D80003C666E6E60623C00183C667E666666007C66667C66667C003C66606060663C00BD -:204DA000786C6666666C78007E60607860607E007E606078606060003C66606E66663C00B7 -:204DC0006666667E666666003C18181818183C001E0C0C0C0C6C3800666C7870786C66000B -:204DE0006060606060607E0063777F6B6363630066767E7E6E6666003C66666666663C0080 -:204E00007C66667C606060003C666666663C0E007C66667C786C66003C66603C06663C009C -:204E20007E181818181818006666666666663C0066666666663C18006363636B7F77630085 -:204E400066663C183C6666006666663C181818007E060C1830607E003C30303030303C0056 -:204E600000C06030180C06003C0C0C0C0C0C3C0000183C6600000000000000000000007ECC -:204E8000603018000000000000003C063E663E000060607C66667C0000003C6060603C002A -:204EA0000006063E66663E0000003C667E603C00000E183E1818180000003E66663E067C6C -:204EC0000060607C666666000018003818183C00000600060606063C0060606C786C6600D8 -:204EE0000038181818183C000000667F7F6B630000007C666666660000003C6666663C00EE -:204F000000007C66667C606000003E66663E060600007C666060600000003E603C067C005B -:204F200000187E1818180E000000666666663E0000006666663C18000000636B7F3E360068 -:204F40000000663C183C660000006666663E0C7800007E0C18307E001C18183018181C00E9 -:204F600018181800181818003818180C181838000000327E4C0000000000000000000000C9 -:204F800000003C3C3C3C000000003C24243C00000000183C3C180000000018242418000041 -:204FA0001824241800000000003C424266246600001800180C06663C0C12307C3062FC008D -:204FC0001C20702070201C0000000000000000000000000000000000000000000000000059 -:204FE0000000000000000000000000000000000000000000000000000000000000000000B1 -:2050000070C0C6CFC6CFC670E0D0CACBCACBD2E0F0C0C6EFC6CFC6C070D8C2C3DACBCA7048 -:205020002070DA8BFA8B8A88F0888AF38A8B8AF00000000000000000000000000000000060 -:205040000000000000000000000000E7E76666666666666666666666666666E7E7666666EE -:20506000666666E7E700000000000000000000000000000000000000000000000000000030 -:20508000FFFFFFFFFFFFFFFFF0F0F0F0F0F0F0F000000000FFFFFFFFFF000000000000009D -:2050A00000000000000000FF8080808080808080CCCC3333CCCC33330101010101010101ED -:2050C00000000000CCCC3333FFFEFCF8F0E0C08003030303030303031818181F1F181818EB -:2050E000000000000F0F0F0F1818181F1F000000000000F8F8181818000000000000FFFFB8 -:205100000000001F1F181818181818FFFF000000000000FFFF181818181818F8F8181818FD -:20512000C0C0C0C0C0C0C0C0E0E0E0E0E0E0E0E00707070707070707FFFF00000000000039 -:20514000FFFFFF00000000000000000000FFFFFF030303030303FFFF00000000F0F0F0F085 -:205160000F0F0F0F00000000181818F8F8000000F0F0F0F000000000F0F0F0F00F0F0F0FFF -:20518000000000FFFF000000081C3E7F7F1C3E001818181818181818000000FFFF00000099 -:2051A0000000FFFF0000000000FFFF000000000000000000FFFF0000303030303030303075 -:2051C0000C0C0C0C0C0C0C0C000000E0F038181818181C0F07000000181838F0E00000009D -:2051E000C0C0C0C0C0C0FFFFC0E070381C0E070303070E1C3870E0C0FFFFC0C0C0C0C0C0BB -:20520000FFFF030303030303003C7E7E7E7E3C000000000000FFFF00367F7F7F3E1C0800FB -:205220006060606060606060000000070F1C1818C3E77E3C3C7EE7C3003C7E66667E3C0004 -:205240001818666618183C000606060606060606081C3E7F3E1C0800181818FFFF181818E5 -:20526000C0C03030C0C0303018181818181818180000033E76363600FF7F3F1F0F07030195 -:205280000072484452427E00000000000000000000000000000000000000000000000000FE -:2052A0000000000000000000000000000000000000000000000000000000000000000000EE -:2052C0000000000000000000CC993366CC9933663399CC663399CC6602060CD8F0E0C0005A -:2052E0000103070F1F3F7FFF80C0E0F0F8FCFEFFFFFFFFFF000000000F0F0F0F0F0F0F0F43 -:20530000F0F0F0F0FFFFFFFF0F0F0F0FFFFFFFFFFFFFFFFFF0F0F0F0FFFFFFFF0F0F0F0FA5 -:205320000C0C030300000000000000000C0C0303C0C030300000000000000000C0C0303071 -:205340000C0C03030C0C0303CCCC33330000000000183C7E181818180010307F7F30100063 -:2053600000080CFEFE0C0800181818187E3C18000000364936000000000000000000000022 -:205380000001010000000000010101000000000001FFFF0100000101FFFFFF010000000008 -:2053A00001FFFFFF010155FF0155FFFF010000000155FFFFFFFF0155FFFFFFFF010000009F -:2053C000000155FFFFFFFFFFFFFF01FFFF01000000000155FFFFFFFF01FFFF01FF0100002C -:2053E0000000010155FFFFFFFF01FFFFFF010000000001550155FFFFFFFFFFFFFF010100B4 -:20540000000001555555FFFFFFFFFFFF01FFFF0100000001555555FFFFFFFFFFFFFFFF0199 -:205420000000000001555555555501FFFF5501000000000000010101010155FF55010000BE -:2054400000000000000000000155555501000000000000000000000001555501000000009F -:2054600000000000000000000001010000000000000000000000000000000000000000002A -:20548000D5C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C9C22D4E4F20534420434152443B -:2054A00020464F554E442DC2C2000000000000000000000000000000000000C2C20000001B -:2054C000000000000000000000000000000000C2C200000000000000000000000000000048 -:2054E000000000C2C2000000000000000000000000000000000000C2C200000000000000A4 -:205500000000000000000000000000C2C2000000000000000000000000000000000000C245 -:20552000C2000000000000000000000000000000000000C2C2000000000000000000000025 -:2055400000000000000000C2C2000000000000000000000000000000000000C2C200000043 -:20556000000000000000000000000000000000C2C2000000000000000000000000000000A7 -:20558000000000C2C2000000000000000000000000000000000000C2C20000000000000003 -:2055A0000000000000000000000000C2C2000000000000000000000000000000000000C2A5 -:2055C000C2000000000000000000000000000000000000C2C2000000000000000000000085 -:2055E00000000000000000C2C2000000000000000000000000000000000000C2C2000000A3 -:20560000000000000000000000000000000000C2C200000000000000000000000000000006 -:20562000000000C2C2000000000000000000000000000000000000C2C20000000000000062 -:205640000000000000000000000000C2C2000000000000000000000000000000000000C204 -:20566000C2000000000000000000000000000000000000C2C20000000000000000000000E4 -:2056800000000000000000C2C2000000000000000000000000000000000000C2C200000002 -:2056A000000000000000000000000000000000C2C200000000000000000000000000000066 -:2056C000000000C2C2000000000000000000000000000000000000C2C200000000000000C2 -:2056E0000000000000000000000000C2C2000000000000000000000000000000000000C264 -:20570000C2000000000000000000000000000000000000C2C2000000000000000000000043 -:2057200000000000000000C2C2000000000000000000000000000000000000C2C200000061 -:20574000000000000000000000000000000000C2C2000000000000000000000000000000C5 -:20576000000000C2C2000000000000000000000000000000000000C2C20000000000000021 -:205780000000000000000000000000C2CAC3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3CBFC -:2057A000080302034808C220A900005B2868E220A90048ABAD4001F02DAD40012904C90482 -:2057C000D0068D4001208E5AAD40012940C940D0068D400120A95BAD40012980C980D0063F -:2057E0008D4001202B5BE220AD4101F04BAD41012901C901D0068D4101204258AD410129AF -:2058000008C908D0068D410120AA5BAD41012910C910D0068D410120AB5BAD41012920C918 -:2058200020D0068D4101200D5BAD41012940C940D0068D410120AC5BE220AD4201F000C24A -:20584000306BA20000AF6010AF8D880FC210A0460020B15DC901D00FAF150F38C902D007DD -:20586000224770384CE959C91AD008C66A20526B4CE959C91BD008E66A20526B4CE959C9F3 -:205880000CD01FAF150F38290FD014AF180F38C901F00CF838E9018F180F38D820615E4C07 -:2058A000E959C90DD01FAF150F38290FD014AF180F38C930F00CF81869018F180F38D82057 -:2058C000615E4CE959C927D00BAF170F38C904F0F13A800DC928D016AF170F38C9F0F0E2BF -:2058E0001A8F170F3820C96020C56A4CE959C929D01CA900EBAF150F384829304A4AAA68B7 -:205900005FCD60388F150F3820D6604CE959C92AD003822C01C9AAD003823001C91DD003CD -:20592000823401C99DD003823801C938D003823C01C9B8D003824001C948D01848AF150FFE -:2059400038290FD00320EC5AC902D004226F6238684CE959C950D01848AF150F38290FD082 -:205960000320A15AC902D00422566238684CE9592980C980D00AA900853220C63682000197 -:20598000AD880FE210AAAD870F2910C910F026AD870F2920C920F024AD870F2940C940F08E -:2059A00035C210AD880F20756EE210AE880FBF003938823400BF803938822D00BF003A38EC -:2059C000F027C902D00EAF150F38290FC902F004223E6F388013BF803A38F00D290F20BFA6 -:2059E0006EC210206D61E21060C210A04A0020B15DC90DD01F48AF150F38F01BC902F03926 -:205A0000AF4C010009048F4C0100A9008F150F38209772684C805AAD870FD006207D6A2016 -:205A2000615EA9018F150F3820B572AF4C010029FB8F4C0100684C805A68220F70384C8034 -:205A40005AAD870F09108D870F4C805AAD870F29EF8D870F4C805AAD870F09208D870F4CC8 -:205A6000805AAD870F29DF8D870F4C805AAD870F09408D870F4C805AAD870F29BF8D870F95 -:205A8000AF6410AF2901C901D0034C455860AF150F382901F045AF160F381ACF697038D0E4 -:205AA0003CA56C8903D00CAF80E8AF29FD09028F80E8AF18F8E66CAF190F386901C965D0BB -:205AC00007A901646C209E6AD88F190F3820615EAF150F382901F00320B572A9008F160FAB -:205AE00038AF80E8AF29FD8F80E8AF6038F8C66CAF190F38E901D006A93F856CA964D88FFE -:205B0000190F3820615EA9008F160F386048C210AF3113AF85612980C980F00DAF3013AF1F -:205B200020D95BA561C980D0E76860AF6010AF48A20000E210A6E0D00629078F000F3868CF -:205B40009F0607AFE8E003D02CAF0207AF85E1AF0307AF85E2AF0407AF85E3AF0507AF85C7 -:205B6000E418AF000F38C210A03C0020B15DE210207A5BA20086E0C21060E220AF000F383E -:205B8000F026C22018AF0207AF4A4A4A851A8F1400AF18AF0407AF4A4A4A851C8F1600AF6B -:205BA000E220A9038F1000AF60606060606B48E22064606466A9058F3011AFA93F8F3113DE -:205BC000AFA04605AF3013AF20B15DC8C8AF3113AF2980C980D0ED6860C210481016482902 -:205BE0000F85636829704A4A4A8562C90ED01120C25C800C48E210A562AA68FC2C6FC210AA -:205C00006860A66095648A1A8560C902D0716460A9008527C210A562A0420620B15DA56417 -:205C20008F120100A0440620B15DA9008F1101008F130100A90C8F10010038AF140100E983 -:205C4000028531A0480620B15DAF1601008530A04A0620B15DA565A04C0620B15DC900D014 -:205C60000F8532A9FFA04E0620B15D20C636800FA9018532C22020F53722013238E220E2E9 -:205C80001060A66095648A1A8560C902D01CC210A562A0420720B15DA564A0440720B15D43 -:205CA000A565A0460720B15D64606048C210A562A0C20720B15D68A0C40720B15DA91085A4 -:205CC0006260C210AF6600001AC903D002A900A0420820B15D8F6600006060A9808511A985 -:205CE000408515A950850FA93C8513A9008F0800AF8F0900AFE220A9208F0500AF8F0700E6 -:205D0000AFA9008F0600AFA9018F0400AFA9018F0000AFC220A900A0850C8517E220A9AF61 -:205D2000850E8519C230A9FF0DA2803BA000A054AF38A90008A2804BA0008054AF38A9FF92 -:205D4000608F481FAF8F881FAFA980008F4A1FAF8F8A1FAFA920808F4C1FAF8F8C1FAFA91E -:205D600010008F4E1FAF8F8E1FAFA9CCCC8F501FAF8F901FAFA9CC008F521FAF8F921FAF8F -:205D8000A922DD8F541FAF8F941FAFA9DD008F561FAF8F961FAFA20020E220A9209FFFBFA3 -:205DA000AFCAD0F9A0001320796020D660206D616048DA5A8F010F3829F04A4A4A4AE210CB -:205DC000AABF050F388F030F38AF010F38290FAABF050F388F040F38C2307AAF030F38977B -:205DE0000CA93030BB9F00C0AFE220FA6860DAC900F025A94F970CA930BB9F00C0AFC8A99B -:205E00006E970CA930BB9F00C0AFC8A920970CA930BB9F00C0AF8023A94F970CA930BB9F88 -:205E200000C0AFC8A966970CA930BB9F00C0AFC8A966970CA930BB9F00C0AFFA60A90A8F1F -:205E4000010F38A767970CE667D002E668A930BB9F00C0AFC8AF010F383A8F010F38D0E3B7 -:205E6000608B0BA9398572AF180F38A0930B20B15D3A8F0001009C0101C220A901078F024D -:205E80000100AF0401001A8570E220AF190F38A0870B20B15DA920856EA000AEA56CC90ADF -:205EA000B02F38A909E56CF015856DC220A97F00A2804954AF38E220C66EC66DD0EDC22019 -:205EC000A97F00A2004854AF38E220C66EA901800538A56CE909856DA90048ABA91C8F00F3 -:205EE00001009C01019C0301A56D3A8F020100C220AF0401008573E220A56D2903F015C2F0 -:205F000020A97F00A2804A54AF38E22020935FC66E4C265FC220A97F00A2004A54AF38E266 -:205F20002020935FC66EE66DA56DC941F006A56ED0A6F022C220A97F00A2004954AF38E2E9 -:205F400020A56EF011C220A97F00A2804954AF38E220C66ED0EF2BAB60A00000A2B30BB77B -:205F6000515A9B970CE87AC8C00800D008A92E5A9B970CE87AC00B00D0E59BC8C8A976973C -:205F80000CC8AF6770388902D004A9318002A932970C605ADAA90985F7C2209838E980A0B9 -:205FA000AAE220A473C8644EB770E8C8C900D004E8E880032055602A900BA9315A9B970CD1 -:205FC0007AA910854EE8B770C820E25FC900D004E8E88005B770203460C8E8C6F7D0C7FAB8 -:205FE0007A605A489BA20000EBA900EB29F0D009A54ED003C8800EA9004A4A4A4AAABF051C -:206000000F38970CC868290FF007AABF050F38970CC8BB7A605A489B29F04A4A4A4AAABF9B -:20602000050F38970CC868290FAABF050F38970CC8BB7A60482907856F6829F8184A4A4A69 -:206040008576F8F00918A9006908C676D0FA656F201560D8605A48489BC220290F00AAE250 -:2060600020BF5A7038970CC86829704A4A4A4A186930970CC8BB687A608BA9AF48ABA9090A -:20608000856DA9429900C0C89900C0C89900C0C8A9529900C0C89900C0C8A9429900C0C877 -:2060A0009900C0C89900C0C8C8C66DD0D5AB605AAF697038A0A80B20B15DAF6A7038F007A0 -:2060C000A92AA0A70B970C7A6060402020102040203020204020A900EBAF150F3829304A9C -:2060E0004A4848AABFCA6038A20A00A08622970CC8CAD0FAA00423970C68AABFCB6038A2C8 -:206100000500A0B522970CC8CAD0FA68AABFCC6038A20900A0012D970CC8C8C8C8C8970C28 -:20612000C8C8C8C8CAD0F0206D6160AF687038F03BC90E9002A90E856DA20000A0B503C2AF -:2061400020A924FC85F0A9390085F2E2208A20B15DC8C8C85A9BB7F01A7A20B15DE8C2204E -:206160009818697D00A8E220C66DD0E160A20900A04B2DBFB56E38F006A940970C8004A90F -:2061800020970C888888888888888888CAD0E4605AA41A970CC8841A7A6BC220A51A298046 -:2061A000FF18699F00851AE2206B8B4808E220A90048AB2868BD0000F00722906138E88044 -:2061C000F4229A6138AB605AA00B00B751C910D023A9E022906138A00000B75122906138CB -:2061E000C8C00800D0F4A92022906138C8C01100D0F48033A92022906138A00000B7512249 -:20620000906138C8C00800D0F4A92E22906138B75122906138C8C00B00D0F4A92022906159 -:2062200038C8C01000D0F47A6B48C230A900C08517AD1F038D0001A980008D0201AD0401DE -:2062400018699F05A8E220A9AF8519A21200689717C8CAD0FA6B18AD1F031AC926B00FA990 -:206260005022296238EE1F03A905222962386B18AD1F033A30F8A95022296238CE1F03A91B -:2062800005222962386BAF80E8AF29FD09028F80E8AFC220A900008D085F8D225FE22085F8 -:2062A0003FA9018F02EAAFA9018F03EAAFAF04EAAF2901C901F0F6AF05EAAFF008A29568EC -:2062C00020AA618006A901853F8000AF80E8AF29FD8F80E8AF6BA58A0A858B18A5880A8505 -:2062E000899002E68BE2206488C22060A53FD0016BC220A900608580A900008582A9000079 -:206300008F07EAAF8F09EAAFE22022D66338AF05EAAFF0016BC220ADFE61C955AAF0016BCD -:20632000C220A2BE01BD08608588BD0A60858A20D662A5888D005F8F07EAAFA58A8D025FF5 -:206340008F09EAAFA900628580A900008582E22022D66338AF05EAAFF0016BC220A200008A -:20636000BD0B628D145FE220BD0D628D245FA9008D255FC220BD106229FF008D165FBD11F2 -:20638000628D1C5FBD1362F0288D185FA900008D1A5FAD185F8D1201AD245F8D1001AD1443 -:2063A00001C9F70FB017E220A9008D265FC2208015BD20628D185FBD22628D1A5FE220A9DD -:2063C000018D265FC220BD0E628D105FBD16628D125F20C5676B5AAF80E8AF29FD09028FD5 -:2063E00080E8AFA53FD002802DA9028F02EAAFA9018F03EAAFAF04EAAF2901C901F0F6AFA4 -:2064000005EAAFF002800FA00000AF10EAAF9780C8C00002D0F4A9018F14EAAFAF80E8AF54 -:2064200029FD8F80E8AF7A6B48A00000B78022181000C8C00800F007C00B00D0EF800E683B -:20644000488918D0E7A92E2218100080DF688918D03BA9388B48ABA2C469221C1000ABA041 -:206460001B00B78022801000A01A00B78022801000A9388B48ABA2CF69221C1000ABA01F84 -:2064800000B7802280100088C01B00D0F4A90D2218100060A53FD0016BC220A900008D2034 -:2064A0005FA900648580A900008582AD205F0AEB8D2001A900008D2201AD085F8D2401AD20 -:2064C0000A5F8D2601AD28018F07EAAFAD2A018F09EAAFE22022D66338AF05EAAFF008A215 -:2064E000356920AA61806AA780D0045C516538C9E5F035A00B00B780C90FD0045C7C6538CE -:206500008902F00280228908F0045C6765388910F0045C52653848A9388B48ABA2B6692215 -:206520001C1000AB68202864C220A58029E001C9E001D00FAD205F1ACD1C5FB0148D205F78 -:206540004CA164A580186920008580E2205CE764386B48A9388B48ABA2A869221C1000AB80 -:20656000682028644C286548A9388B48ABA28C69221C1000AB682028644C28654C2865A091 -:206580000B00C910F002A9019751A00000A20B00B7809751C8CAD0F8C220A01A00B780A05A -:2065A00010009751A01C00B780A00C009751A01E00B780A00E009751A55118691200855172 -:2065C000E22060A53FD0016BC220A900008D205FA900648580A900008582AD205F0AEB8D32 -:2065E0002001A900008D2201AD085F8D2401AD0A5F8D2601AD28018F07EAAFAD2A018F091C -:20660000EAAFE22022D66338AF05EAAFF0045C6E6638A780D0045C6E6638C9E5F027A00BD0 -:2066200000B780C90FD0045C4566388902F00280148908F0045C4566388910F005207F65D1 -:206640008003207F65C220A58029E001C9E001D00FAD205F1ACD1C5FB0148D205F4CD0653A -:20666000A580186920008580E2205C1266386B48A53F29FF00D002686B688588A90000853A -:206680008A20D662A5888D2001A58A8D2201AD045F8D2401AD065F8D2601AD28018F07EA80 -:2066A000AFAD2A018F09EAAFE22022D66338AF05EAAFF008A2166920AA618000C2206B48E7 -:2066C000A53F29FF00D002686B6838E902008D0001AD245F8D0201AD040148A20000858887 -:2066E000A90000858A20D662A5888D2001A58A8D2201AD0C5F8D2401AD0E5F8D2601AD2863 -:20670000018F07EAAFAD2A018F09EAAFE22022D66338AF05EAAFF00AA9FF8D275F8D285F95 -:206720008017C220A5801869000285809002E682681A48E8EC245FD0A5C220686B48A53FC2 -:2067400029FF00D002686B688D275F22BF6638AD265F2901000AAAFC5D67D0EF6B6167862A -:2067600067AD275F4A900E186D275FA8B900664A4A4A4A800A6D275FA8B9006629FF0F8D95 -:20678000275FC9FF0F60AD275FEB29FF00C586F02248A5808583A5828585A900668580A936 -:2067A00000008582688586226F6638A5838580A5858582AD275F29FF000AA8B900668D27F2 -:2067C0005FC9FFFF60AD105F8588A90000858A20D662A5888D2001A58A8D2201AD005F8DA7 -:2067E0002401AD025F8D2601AD28018D045FAD2A018D065FAD165F8D0001AD125F8D0201C4 -:20680000AD04018588AD0601858A20D662A5888D2001A58A8D2201AD045F8D2401AD065F10 -:206820008D2601AD28018D085FAD2A018D0A5FAD085F8D2001AD0A5F8D2201A920008588AE -:20684000A90000858A20D662A5888D2401A58A8D2601AD28018D0C5FAD2A018D0E5F603036 -:2068600030202D2057656C636F6D6520746F20746865205344436172642054657374657283 -:206880000D003031202D20436172642050726573656E740D003031202D204E4F2053444330 -:2068A0004152442050524553454E540D003032202D2043616E27742072656164204D42527A -:2068C000202D204E6F20436172642070726573656E740D003033202D204572726F72206468 -:2068E0007572696E672072656164206F7065726174696F6E0D003034202D204572726F72DE -:206900002072656164696E6720426F6F7420736563746F720D003035202D204572726F7230 -:206920002072656164696E672046415420736563746F720D003035202D204572726F7220A9 -:2069400072656164696E6720526F6F7420736563746F720D003035202D204572726F7220E0 -:2069600072656164696E67204461746120736563746F720D00496E76616C6964204D42521E -:20698000205369676E61747572650D00566F6C756D65204E616D653A200056464154204E06 -:2069A000616D6520203A20004469726563746F727920203A200046696C656E616D6520205A -:2069C000203A20002C20436C75737465723A002C2053697A653A00A9FF8F4801008F49015B -:2069E000008F4A0100A9FF8F4C01008F4D01008F4E010020DB5C20306D20C76D203B6A2031 -:206A00007D6AA9388569A9428F6A0000A20000A900EBDABF181038AA20526BFAE8E009005B -:206A2000D0ED22793038205C6A22B130385820AE5B202B6120615EEAEA80FC48A9E98F129E -:206A400000AFA9008F1000AFC230A900008F1400AFA900008F1600AFE2206860AF400100EC -:206A600029848F400100AF41010029A18F410100A97B8F4C0100A95E8F4D010060A9008F91 -:206A8000150F388548646C6449A9018F190F38A648BF24FC391A8F180F3820AF606048A929 -:206AA00000EBAF4800001ACF687038D002A9008F480000AAA0800220B15DBF24FC391A8FEE -:206AC000180F3868608BA90048ABA9038D00019C01019C030138AF170F38E9048D0201C26C -:206AE00020AD0401AAE220A9008D61018D62018D6301BF00003A8D6501BF01003A8D6601C5 -:206B0000BF02003A8D6701A9018D6401A90B8D6001AB608BA90048ABE220A9008D61018DEE -:206B200062018D6301A9018D6401A90B8D6001AB60A9808F04E6AF204B6BA9108F02E6AFB2 -:206B40008F03E6AFA9038F04E6AF60A23002CAD0FD60AF6A00008F000100A9008F0101002C -:206B60008F030100A9168F020100C220AF04010018693B108567E220AF6A0000A093022073 -:206B8000B15DA767D04BE667D002E66820D26BE667D002E66820426CE667D002E668207CB0 -:206BA0006CE667D002E66820B86CE667D002E668DAA62720F46CFAE667D002E66820106D20 -:206BC000C220A5676906008567E220A09802203D5E60A767484848489F20E7AF2980A08DBC -:206BE0000320EE5D682940A00D0420EE5D682920A08D0420EE5D682910A00D0520EE5D68C7 -:206C0000290FA08E0520B15DA00600B767484848489F23E7AF2980A0A70320EE5D68294070 -:206C2000A0270420EE5D682920A0A70420EE5D682910A0270520EE5D68290FA0A80520B121 -:206C40005D60A767489F40E7AF29C02A2A2AA00E0620B15D68293FA08E0620B15DA006008B -:206C6000B767489F43E7AF29C02A2A2AA0280620B15D68293FA0A80620B15D60A767489F32 -:206C800060E7AF29F04A4A4A4AA00E0720B15D68290FA08E0720B15DA00600B767489F63C9 -:206CA000E7AF29F04A4A4A4AA0280720B15D68290FA0A80720B15D60A767489F80E7AF294F -:206CC000F04A4A4A4AA00E0820B15D68290FA08E0820B15DA00600B767489F83E7AF29F0D7 -:206CE0004A4A4A4AA0280820B15D68290FA0A80820B15D60A7674809F09FC0E7AF290E4A2B -:206D0000A0280A20B15D682901A0A80A20B15D60A7679FE0E7AF2907A00E0920B15DA00524 -:206D200000B7679FE3E7AF2907A0280920B15D600B48DA0818E220A9008D870F20DE6DA95F -:206D4000AA8F6410AF20E96DAF6010AFC955F003826F00A9AB8F6410AF20E96DAF6010AF47 -:206D6000C900F003825B00A9608F6410AF20DE6DA9698F6010AF20DE6DA9FF8F6010AFA231 -:206D8000FFFFCAEAEAEAEAEAEAEAEAE00000D0F220E96DAF6010AF20DE6DA9F48F6010AF3F -:206DA00020E96DAF6010AFC9FAD0EC20F46DAF40010029808F400100AF41010029018F413B -:206DC000010028FA682B60C230A28053A90001A0000554AF38E220A9018F0007AF60AF6448 -:206DE00010AF2902C902F0F660AF6410AF2901C901D0F66020DE6DA9A88F6410AF20DE6DD3 -:206E0000A9A98F6410AF20E96DAF6010AFC900D0EC20DE6DA9208F6410AF20E96DAF60102A -:206E2000AF09024820DE6DA9608F6410AF20DE6D688F6010AFA9F6205A6E206D6EA9E82076 -:206E40005A6E206D6EA900205A6E206D6EA9F4205A6E206D6EA90085E0604820DE6DA9D4C5 -:206E60008F6410AF20DE6D688F6010AF6020E96DAF6010AF6048DAE210AA3035BFCC6E3887 -:206E8000C210A0C60020B15D8F300000302329704A4A4A4A8F310000AF300000290F8F3023 -:206EA0000000A9008F27000020F53722013238E220C210FA6860010101010101010101AA51 -:206EC000CABFB66E3849019FB66E386080808031338036383A804180808080802C32343514 -:206EE00037393B3C4280808080808021238026282A808080808080801C22242527292B802B -:206F0000808080808080808080808080808080808080808080808080808080808080808071 -:206F2000808080808080808080808080025C025C825C825CAB5CAB5C825CC25CDA5CC210C7 -:206F4000A9028F150F3822866238A9008D1F03A93485536452645120636F208E6F20D46F6F -:206F6000E2106BA900A00004975188D0FBA53FF01C22EC623822C36538C220A9006685801C -:206F8000A9000085828586226F6638E22060C230A900A0850CA900C08517E220A9AF850EE7 -:206FA0008519A01E05A9288580A29F05861AA20000A9148581BF805438970CA9509717C872 -:206FC000E8C681D0F0C2209818696C00A8E220C680D0DE6064516452A9348553A20000A0FB -:206FE0000B00B751F02022C76138229A6138C220A5516912008551C98004B00AE8E0260079 -:20700000F004E22080D9E220A9052229623860A900EBAD1F03C2308D0001A912008D0201FE -:20702000AD04018551A900808580A937008582A01000B751223D6738E22022B13038226B33 -:207040007038224770386B207D6A20DB5C20595F20615E202B6120AF606B4390449145467E -:20706000924793419442430000060022B13038209772A20000A9009F000039E8D0F9C2301A -:20708000A900808508A93700850AE220A01000B708C910D00522F770386BC921D00422A3FD -:2070A00070386BA9028F67703820B0702082716BA01100B7088940F017A9018F6A7038A982 -:2070C0000F8D6501A9018D6601A90C8D670180238920F00AC8C220B708E220C88015A900AF -:2070E0008F6A7038A9988D6501A95E8D6601A9048D670120136B60A9018F67703820157132 -:2071000020957120BA7120B0706B0701080209030A04050B06C8B708291F8F697038B708E3 -:207120002980F007C8B708C900D0F9C8A93885F2E220B708F04AC2203A8F000100A9160010 -:207140008F020100AF04010018693B1085F0A90000E220C8644E87F0A64EBF0A7138AAB745 -:20716000085A9B97F07AC8E64EA54EC90B90E95AA00C00A92097F0C8C01600D0F87A80B06F -:20718000C860B708C8C900D0F9A93885F2E220B708F000C860B7088F687038AAC8C220A922 -:2071A00024FC85F0A9390085F2E220B708C887F0E6F0B002E6F1CAD0F26064F3A93985F6E2 -:2071C000C220B708F01F5AA8A5F329FF008F000100A901078F020100AF0401001A85F4E241 -:2071E0002020F2717AC8C8E220E6F3A5F3C920D0CF60B7088F420000C8C220297F008F0016 -:207200000100A91C008F020100AF0401001A8FFA0000E220A6FAB708C88FF90000290F8F47 -:20722000F70000C2208A1865F765F765F7AAE220B7085A9B97F47AC8E8B7085A9B97F47AF1 -:20724000C8E8290FF009B7085A9B97F47AC8E8AFF9000010BFAF4200001097605ADAA2128D -:2072600000A00000A92D970CC8CAD0FAFA7A605AA5F620B15DC8C8A5F520B15DC8C8A5F421 -:2072800020B15D7A604848E2206820B15D88886820B15DC22068605AC220A900E7852CA948 -:2072A000AF00852EE220A0A000A900972CC8C0B900D0F87A605A205C72C220AF180F38297A -:2072C000FF003A8F000100A901078F020100AF0401001A85F4E220A93985F6A00001206FCC -:2072E00072C220A56C297F008F000100A91C008F020100AF0401001AA08200208572A8A942 -:207300000000E22064288F270000AABFB66E38D005C8C8C88058B7F4297F20D574B7F429CF -:20732000804A4A4A854EC8B7F429F04A4A4A4A654EF0143A8F6A00005AA627A900EBBF18EC -:207340001038AA20526B7AAF300000F011C90FF02BC2205A20F537220132387AE220A900D7 -:20736000EBB7F4C8290FF0050AAAFC8D73C8A900EBAF2700001AC909D08C7A60AF270000A8 -:207380001869B0852CA900872CC8C880E1AD7320742074AD73AD73AD73AD73AD73AD73AD09 -:2073A00073AE73AD7396740574AD731674605AB7F4854CC220A900E7852CA9AF00852EE2A6 -:2073C00030A527AABF181038186940A8B72C48293F18654CC9409002A93F293F854E6829D4 -:2073E000C0054E972CC8C8C8B72C48293F18654CC9409002A93F293F854E6829C0054E970A -:207400002CC2107A60B7F43A856CA9008F190F38209E6A7A7A60B7F48F69703820AF6060D0 -:207420005A4A8550B7F4854CC220A900E7852CA9AF00852EE230A5271869A0A8B72CC210CD -:20744000BBA08A0020B15D9BE2104898186910A8B72C854EC210BBA0080120B15D2903A08D -:20746000880020B15D9BEB68AAA5508902F00AC2208A38E54CE2208008C2208A18654CE2CE -:2074800020E210EB2903054E972C9838E910A8EB972CC2107A605AC220A900E7852CA9AF0D -:2074A00000852EE220B7F4297FF0013A493F854EE210A627BF181038186940A8B72C29C02B -:2074C00018654E972CC8C8C8B72C29C018654E972CC2107A605A4848AF2700000AA868F0F6 -:2074E0000320B15D29704A4A4A4A8F31000068290F8F3000007A605AE220A9018526C2200E -:20750000A93800850AA53229FF003A0A0A0A0A18693B108508C220A9200022F53738E2200E -:20752000A00000B708872CC220A9400022F53738E220A00200B708872CC220A9600022F5D0 -:207540003738E220A00400B708872CC220A9800022F53738E220A00600B708872CC220A96E -:20756000E00022F53738E220A00900B708290F872CA9008526C220A9200022F53738E220C9 -:20758000A00100B708872CC220A9400022F53738E220A00300B708872CC220A9600022F56E -:2075A0003738E220A00500B708872CC220A9800022F53738E220A07100B708872CC220A9A2 -:2075C000E00022F53738E220A00900B70829F04A4A4A4A872CA52718290F69C0852AA9004A -:1C75E000852BC23018A900E7652A852CA9AF00852EE220A00800B708872C7A6004 +:204A000070C0C6CFC6CFC670E0D0CACBCACBD2E0F0C0C6EFC6CFC6C070D8C2C3DACBCA704E +:204A20002070DA8BFA8B8A88F0888AF38A8B8AF00000000000000000000000000000000066 +:204A40000000000000000000000000E7E76666666666666666666666666666E7E7666666F4 +:204A6000666666E7E700000000000000000000000000000000000000000000000000000036 +:204A8000FFFFFFFFFFFFFFFFF0F0F0F0F0F0F0F000000000FFFFFFFFFF00000000000000A3 +:204AA00000000000000000FF8080808080808080CCCC3333CCCC33330101010101010101F3 +:204AC00000000000CCCC3333FFFEFCF8F0E0C08003030303030303031818181F1F181818F1 +:204AE000000000000F0F0F0F1818181F1F000000000000F8F8181818000000000000FFFFBE +:204B00000000001F1F181818181818FFFF000000000000FFFF181818181818F8F818181803 +:204B2000C0C0C0C0C0C0C0C0E0E0E0E0E0E0E0E00707070707070707FFFF0000000000003F +:204B4000FFFFFF00000000000000000000FFFFFF030303030303FFFF00000000F0F0F0F08B +:204B60000F0F0F0F00000000181818F8F8000000F0F0F0F000000000F0F0F0F00F0F0F0F05 +:204B8000000000FFFF000000081C3E7F7F1C3E001818181818181818000000FFFF0000009F +:204BA0000000FFFF0000000000FFFF000000000000000000FFFF000030303030303030307B +:204BC0000C0C0C0C0C0C0C0C000000E0F038181818181C0F07000000181838F0E0000000A3 +:204BE000C0C0C0C0C0C0FFFFC0E070381C0E070303070E1C3870E0C0FFFFC0C0C0C0C0C0C1 +:204C0000FFFF030303030303003C7E7E7E7E3C000000000000FFFF00367F7F7F3E1C080001 +:204C20006060606060606060000000070F1C1818C3E77E3C3C7EE7C3003C7E66667E3C000A +:204C40001818666618183C000606060606060606081C3E7F3E1C0800181818FFFF181818EB +:204C6000C0C03030C0C0303018181818181818180000033E76363600FF7F3F1F0F0703019B +:204C80000072484452427E0000000000000000000000000000000000000000000000000004 +:204CA0000000000000000000000000000000000000000000000000000000000000000000F4 +:204CC0000000000000000000CC993366CC9933663399CC663399CC6602060CD8F0E0C00060 +:204CE0000103070F1F3F7FFF80C0E0F0F8FCFEFFFFFFFFFF000000000F0F0F0F0F0F0F0F49 +:204D0000F0F0F0F0FFFFFFFF0F0F0F0FFFFFFFFFFFFFFFFFF0F0F0F0FFFFFFFF0F0F0F0FAB +:204D20000C0C030300000000000000000C0C0303C0C030300000000000000000C0C0303077 +:204D40000C0C03030C0C0303CCCC33330000000000183C7E181818180010307F7F30100069 +:204D600000080CFEFE0C0800181818187E3C18000000364936000000000000000000000028 +:204D80000001010000000000010101000000000001FFFF0100000101FFFFFF01000000000E +:204DA00001FFFFFF010155FF0155FFFF010000000155FFFFFFFF0155FFFFFFFF01000000A5 +:204DC000000155FFFFFFFFFFFFFF01FFFF01000000000155FFFFFFFF01FFFF01FF01000032 +:204DE0000000010155FFFFFFFF01FFFFFF010000000001550155FFFFFFFFFFFFFF010100BA +:204E0000000001555555FFFFFFFFFFFF01FFFF0100000001555555FFFFFFFFFFFFFFFF019F +:204E20000000000001555555555501FFFF5501000000000000010101010155FF55010000C4 +:204E40000000000000000000015555550100000000000000000000000155550100000000A5 +:204E6000000000000000000000010100000000000000000000000000000000000000000030 +:204E8000D5C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C9C22D4E4F205344204341524441 +:204EA00020464F554E442DC2C2000000000000000000000000000000000000C2C200000021 +:204EC000000000000000000000000000000000C2C20000000000000000000000000000004E +:204EE000000000C2C2000000000000000000000000000000000000C2C200000000000000AA +:204F00000000000000000000000000C2C2000000000000000000000000000000000000C24B +:204F2000C2000000000000000000000000000000000000C2C200000000000000000000002B +:204F400000000000000000C2C2000000000000000000000000000000000000C2C200000049 +:204F6000000000000000000000000000000000C2C2000000000000000000000000000000AD +:204F8000000000C2C2000000000000000000000000000000000000C2C20000000000000009 +:204FA0000000000000000000000000C2C2000000000000000000000000000000000000C2AB +:204FC000C2000000000000000000000000000000000000C2C200000000000000000000008B +:204FE00000000000000000C2C2000000000000000000000000000000000000C2C2000000A9 +:20500000000000000000000000000000000000C2C20000000000000000000000000000000C +:20502000000000C2C2000000000000000000000000000000000000C2C20000000000000068 +:205040000000000000000000000000C2C2000000000000000000000000000000000000C20A +:20506000C2000000000000000000000000000000000000C2C20000000000000000000000EA +:2050800000000000000000C2C2000000000000000000000000000000000000C2C200000008 +:2050A000000000000000000000000000000000C2C20000000000000000000000000000006C +:2050C000000000C2C2000000000000000000000000000000000000C2C200000000000000C8 +:2050E0000000000000000000000000C2C2000000000000000000000000000000000000C26A +:20510000C2000000000000000000000000000000000000C2C2000000000000000000000049 +:2051200000000000000000C2C2000000000000000000000000000000000000C2C200000067 +:20514000000000000000000000000000000000C2C2000000000000000000000000000000CB +:20516000000000C2C2000000000000000000000000000000000000C2C20000000000000027 +:205180000000000000000000000000C2CAC3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3CB02 +:2051A000E801E2014808C220A900005B2868E220A90048ABAD4001F02DAD40012904C904CC +:2051C000D0068D4001208E54AD40012940C940D0068D400120A955AD40012980C980D00651 +:2051E0008D4001202B55E220AD4101F04BAD41012901C901D0068D4101204252AD410129C1 +:2052000008C908D0068D410120AA55AD41012910C910D0068D410120AB55AD41012920C92A +:2052200020D0068D4101200D55AD41012940C940D0068D410120AC55E220AD4201F000C25C +:20524000306BA20000AF6010AF8D880FC210A0460020B157C901D00FAF150F38C902D007E9 +:2052600022476A384CE953C91AD008C66A204E654CE953C91BD008E66A204E654CE953C925 +:205280000CD01FAF150F38290FD014AF180F38C901F00CF838E9018F180F38D82061584C13 +:2052A000E953C90DD01FAF150F38290FD014AF180F38C930F00CF81869018F180F38D82063 +:2052C00061584CE953C927D00BAF170F38C904F0F13A800DC928D016AF170F38C9F0F0E2D1 +:2052E0001A8F170F3820C95A20C1644CE953C929D01CA900EBAF150F384829304A4AAA68D3 +:205300005FCD5A388F150F3820D65A4CE953C92AD003822C01C9AAD003823001C91DD003E5 +:20532000823401C99DD003823801C938D003823C01C9B8D003824001C948D01848AF150F04 +:2053400038290FD00320EC54C902D004226B5C38684CE953C950D01848AF150F38290FD09E +:205360000320A154C902D00422525C38684CE9532980C980D00AA900853220C636820001B3 +:20538000AD880FE210AAAD870F2910C910F026AD870F2920C920F024AD870F2940C940F094 +:2053A00035C210AD880F207168E210AE880FBF003938823400BF803938822D00BF003A38FC +:2053C000F027C902D00EAF150F38290FC902F004223A69388013BF803A38F00D290F20BBBA +:2053E00068C210206D5BE21060C210A04A0020B157C90DD01F48AF150F38F01BC902F0393E +:20540000AF4C010009048F4C0100A9008F150F3820976C684C8054AD870FD0062079642032 +:205420006158A9018F150F3820B56CAF4C010029FB8F4C0100684C805468220F6A384C8052 +:2054400054AD870F09108D870F4C8054AD870F29EF8D870F4C8054AD870F09208D870F4CE0 +:205460008054AD870F29DF8D870F4C8054AD870F09408D870F4C8054AD870F29BF8D870FAD +:20548000AF6410AF2901C901D0034C455260AF150F382901F045AF160F381ACF696A38D0F6 +:2054A0003CA56C8903D00CAF80E8AF29FD09028F80E8AF18F8E66CAF190F386901C965D0C1 +:2054C00007A901646C209A64D88F190F38206158AF150F382901F00320B56CA9008F160FC7 +:2054E00038AF80E8AF29FD8F80E8AF6038F8C66CAF190F38E901D006A93F856CA964D88F04 +:20550000190F38206158A9008F160F386048C210AF3113AF85612980C980F00DAF3013AF2B +:2055200020D955A561C980D0E76860AF6010AF48A20000E210A6E0D00629078F000F3868DB +:205540009F0607AFE8E003D02CAF0207AF85E1AF0307AF85E2AF0407AF85E3AF0507AF85CD +:20556000E418AF000F38C210A03C0020B157E210207A55A20086E0C21060E220AF000F3850 +:20558000F026C22018AF0207AF4A4A4A851A8F1400AF18AF0407AF4A4A4A851C8F1600AF71 +:2055A000E220A9038F1000AF60606060606B48E22064606466A9058F3011AFA93F8F3113E4 +:2055C000AFA06603AF3013AF20B157C8C8AF3113AF2980C980D0ED6860C2104810164829F0 +:2055E0000F85636829704A4A4A8562C90ED01120C256800C48E210A562AA68FC2869C210C0 +:205600006860A66095648A1A8560C902D0716460A9008527C210A562A0020420B157A56465 +:205620008F120100A0040420B157A9008F1101008F130100A90C8F10010038AF140100E9D1 +:20564000028531A0080420B157AF1601008530A00A0420B157A565A00C0420B157C900D0F2 +:205660000F8532A9FFA00E0420B15720C636800FA9018532C22020F53722013238E220E237 +:205680001060A66095648A1A8560C902D01CC210A562A0A20420B157A564A0A40420B1579B +:2056A000A565A0A60420B15764606048C210A562A0F20420B15768A0F40420B157A9108505 +:2056C0006260C210AF6600001AC903D002A900A0420520B1578F6600006060A9508511A9C4 +:2056E000408515A950850FA93C8513A9008F0800AF8F0900AFE220A9208F0500AF8F0700EC +:20570000AFA9008F0600AFA9018F0400AFA9018F0000AFC220A900A0850C8517E220A9AF67 +:20572000850E8519C230A9BF08A2803BA000A054AF38A90008A28045A0008054AF38A9FFE3 +:20574000608F481FAF8F881FAFA980008F4A1FAF8F8A1FAFA920808F4C1FAF8F8C1FAFA924 +:2057600010008F4E1FAF8F8E1FAFA9CCCC8F501FAF8F901FAFA9CC008F521FAF8F921FAF95 +:20578000A922DD8F541FAF8F941FAFA9DD008F561FAF8F961FAFA20014E220A9209FFFBFB5 +:2057A000AFCAD0F9A0E00B20795A20D65A206D5B6048DA5A8F010F3829F04A4A4A4AE2100B +:2057C000AABF050F388F030F38AF010F38290FAABF050F388F040F38C2307AAF030F389781 +:2057E0000CA93030BB9F00C0AFE220FA6860DAC900F025A94F970CA930BB9F00C0AFC8A9A1 +:205800006E970CA930BB9F00C0AFC8A920970CA930BB9F00C0AF8023A94F970CA930BB9F8E +:2058200000C0AFC8A966970CA930BB9F00C0AFC8A966970CA930BB9F00C0AFFA60A90A8F25 +:20584000010F38A767970CE667D002E668A930BB9F00C0AFC8AF010F383A8F010F38D0E3BD +:20586000608B0BA9398572AF180F38A0430720B1573A8F0001009C0101C220A901078F02AD +:205880000100AF0401001A8570E220AF190F38A0370720B157A920856EA0C0A8A56CC90A85 +:2058A000B02F38A909E56CF015856DC220A94F00A2404454AF38E220C66EC66DD0EDC22094 +:2058C000A94F00A2504354AF38E220C66EA901800538A56CE909856DA90048ABA91C8F00DE +:2058E00001009C01019C0301A56D3A8F020100C220AF0401008573E220A56D2903F015C2F6 +:2059000020A94F00A2E04454AF38E220209359C66E4C2659C220A94F00A2904454AF38E2F4 +:2059200020209359C66EE66DA56DC941F006A56ED0A6F022C220A94F00A2F04354AF38E23B +:2059400020A56EF011C220A94F00A2404454AF38E220C66ED0EF2BAB60A00000A26307B74A +:20596000515A9B970CE87AC8C00800D008A92E5A9B970CE87AC00B00D0E59BC8C8A9769742 +:205980000CC8AF676A388902D004A9318002A932970C605ADAA90985F7C2209838E950A0F5 +:2059A000AAE220A473C8644EB770E8C8C900D004E8E8800320555A2A900BA9315A9B970CDD +:2059C0007AA910854EE8B770C820E259C900D004E8E88005B77020345AC8E8C6F7D0C7FACA +:2059E0007A605A489BA20000EBA900EB29F0D009A54ED003C8800EA9004A4A4A4AAABF0522 +:205A00000F38970CC868290FF007AABF050F38970CC8BB7A605A489B29F04A4A4A4AAABFA1 +:205A2000050F38970CC868290FAABF050F38970CC8BB7A60482907856F6829F8184A4A4A6F +:205A40008576F8F00918A9006908C676D0FA656F20155AD8605A48489BC220290F00AAE25C +:205A600020BF5A6A38970CC86829704A4A4A4A186930970CC8BB687A608BA9AF48ABA90916 +:205A8000856DA9429900C0C89900C0C89900C0C8A9529900C0C89900C0C8A9429900C0C87D +:205AA0009900C0C89900C0C8C8C66DD0D5AB605AAF696A38A0580720B157AF6A6A38F0070C +:205AC000A92AA05707970C7A6060402020102040203020204020A900EBAF150F3829304AF6 +:205AE0004A4848AABFCA5A38A20A00A09621970CC8CAD0FAA0E421970C68AABFCB5A38A2ED +:205B00000500A0C521970CC8CAD0FA68AABFCC5A38A20900A02128970CC8C8C8C8C8970C0A +:205B2000C8C8C8C8CAD0F0206D5B60AF686A38F03BC90E9002A90E856DA20000A06502C212 +:205B400020A924FC85F0A9390085F2E2208A20B157C8C8C85A9BB7F01A7A20B157E8C22060 +:205B60009818694D00A8E220C66DD0E160A20900A06B28BFB16838F006A940970C8004A934 +:205B800020970C888888888888888888CAD0E4605AA41A970CC8841A7A6BC220A51A29E0EC +:205BA000FF18696F00851AE2206B8B4808E220A90048AB2868BD0000F00722905B38E88080 +:205BC000F4AB605AA00B00B751C910D023A9E022905B38A00000B75122905B38C8C00800A2 +:205BE000D0F4A92022905B38C8C01100D0F48033A92022905B38A00000B75122905B38C800 +:205C0000C00800D0F4A92E22905B38B75122905B38C8C00B00D0F4A92022905B38C8C01092 +:205C200000D0F47A6B48C230A900C08517AD1F038D0001A950008D0201AD040118698F03D1 +:205C4000A8E220A9AF8519A21200689717C8CAD0FA6B18AD1F031AC926B00FA95022255CC8 +:205C600038EE1F03A90522255C386B18AD1F033A30F8A95022255C38CE1F03A90522255C8A +:205C8000386BAF80E8AF29FD09028F80E8AFC220A900008D085F8D225FE220853FA9018F38 +:205CA00002EAAFA9018F03EAAFAF04EAAF2901C901F0F6AF05EAAFF008A2916220AA5B80CF +:205CC00006A901853F8000AF80E8AF29FD8F80E8AF6BA58A0A858B18A5880A85899002E6B5 +:205CE0008BE2206488C22060A53FD0016BC220A900608580A900008582A900008F07EAAF51 +:205D00008F09EAAFE22022D25D38AF05EAAFF0016BC220ADFE61C955AAF0016BC220A2BECA +:205D200001BD08608588BD0A60858A20D25CA5888D005F8F07EAAFA58A8D025F8F09EAAF16 +:205D4000A900628580A900008582E22022D25D38AF05EAAFF0016BC220A20000BD0B628D14 +:205D6000145FE220BD0D628D245FA9008D255FC220BD106229FF008D165FBD11628D1C5F45 +:205D8000BD1362F0288D185FA900008D1A5FAD185F8D1201AD245F8D1001AD1401C9F70FE3 +:205DA000B017E220A9008D265FC2208015BD20628D185FBD22628D1A5FE220A9018D265FA0 +:205DC000C220BD0E628D105FBD16628D125F20C1616B5AAF80E8AF29FD09028F80E8AFA53C +:205DE0003FD002802DA9028F02EAAFA9018F03EAAFAF04EAAF2901C901F0F6AF05EAAFF0D8 +:205E000002800FA00000AF10EAAF9780C8C00002D0F4A9018F14EAAFAF80E8AF29FD8F80B3 +:205E2000E8AF7A6B48A00000B78022181000C8C00800F007C00B00D0EF800E68488918D0BD +:205E4000E7A92E2218100080DF688918D03BA9388B48ABA2C063221C1000ABA01B00B780B8 +:205E600022801000A01A00B78022801000A9388B48ABA2CB63221C1000ABA01F00B780228D +:205E800080100088C01B00D0F4A90D2218100060A53FD0016BC220A900008D205FA9006427 +:205EA0008580A900008582AD205F0AEB8D2001A900008D2201AD085F8D2401AD0A5F8D2676 +:205EC00001AD28018F07EAAFAD2A018F09EAAFE22022D25D38AF05EAAFF008A2316320AAE3 +:205EE0005B806AA780D0045C4D5F38C9E5F035A00B00B780C90FD0045C785F388902F002D9 +:205F000080228908F0045C635F388910F0045C4E5F3848A9388B48ABA2B263221C1000ABDF +:205F20006820245EC220A58029E001C9E001D00FAD205F1ACD1C5FB0148D205F4C9D5EA573 +:205F400080186920008580E2205CE35E386B48A9388B48ABA2A463221C1000AB6820245E86 +:205F60004C245F48A9388B48ABA28863221C1000AB6820245E4C245F4C245FA00B00C910F9 +:205F8000F002A9019751A00000A20B00B7809751C8CAD0F8C220A01A00B780A0100097514C +:205FA000A01C00B780A00C009751A01E00B780A00E009751A551186912008551E22060A569 +:205FC0003FD0016BC220A900008D205FA900648580A900008582AD205F0AEB8D2001A90075 +:205FE000008D2201AD085F8D2401AD0A5F8D2601AD28018F07EAAFAD2A018F09EAAFE22051 +:2060000022D25D38AF05EAAFF0045C6A6038A780D0045C6A6038C9E5F027A00B00B780C98F +:206020000FD0045C4160388902F00280148908F0045C4160388910F005207B5F8003207BD7 +:206040005FC220A58029E001C9E001D00FAD205F1ACD1C5FB0148D205F4CCC5FA5801869CC +:2060600020008580E2205C0E60386B48A53F29FF00D002686B688588A90000858A20D25C18 +:20608000A5888D2001A58A8D2201AD045F8D2401AD065F8D2601AD28018F07EAAFAD2A01E1 +:2060A0008F09EAAFE22022D25D38AF05EAAFF008A2126320AA5B8000C2206B48A53F29FF82 +:2060C00000D002686B6838E902008D0001AD245F8D0201AD040148A200008588A90000856B +:2060E0008A20D25CA5888D2001A58A8D2201AD0C5F8D2401AD0E5F8D2601AD28018F07EA20 +:20610000AFAD2A018F09EAAFE22022D25D38AF05EAAFF00AA9FF8D275F8D285F8017C220AD +:20612000A5801869000285809002E682681A48E8EC245FD0A5C220686B48A53F29FF00D049 +:2061400002686B688D275F22BB6038AD265F2901000AAAFC5961D0EF6B5D618261AD275FB6 +:206160004A900E186D275FA8B900664A4A4A4A800A6D275FA8B9006629FF0F8D275FC9FFE7 +:206180000F60AD275FEB29FF00C586F02248A5808583A5828585A900668580A90000858283 +:2061A000688586226B6038A5838580A5858582AD275F29FF000AA8B900668D275FC9FFFFE3 +:2061C00060AD105F8588A90000858A20D25CA5888D2001A58A8D2201AD005F8D2401AD0209 +:2061E0005F8D2601AD28018D045FAD2A018D065FAD165F8D0001AD125F8D0201AD04018567 +:2062000088AD0601858A20D25CA5888D2001A58A8D2201AD045F8D2401AD065F8D2601ADF6 +:2062200028018D085FAD2A018D0A5FAD085F8D2001AD0A5F8D2201A920008588A9000085E7 +:206240008A20D25CA5888D2401A58A8D2601AD28018D0C5FAD2A018D0E5F603030202D20D7 +:2062600057656C636F6D6520746F2074686520534443617264205465737465720D003031B8 +:20628000202D20436172642050726573656E740D003031202D204E4F2053444341524420AD +:2062A00050524553454E540D003032202D2043616E27742072656164204D4252202D204EBC +:2062C0006F20436172642070726573656E740D003033202D204572726F7220647572696E6B +:2062E000672072656164206F7065726174696F6E0D003034202D204572726F72207265614A +:2063000064696E6720426F6F7420736563746F720D003035202D204572726F722072656136 +:2063200064696E672046415420736563746F720D003035202D204572726F7220726561646B +:20634000696E6720526F6F7420736563746F720D003035202D204572726F722072656164E6 +:20636000696E67204461746120736563746F720D00496E76616C6964204D4252205369677D +:206380006E61747572650D00566F6C756D65204E616D653A200056464154204E616D6520FC +:2063A000203A20004469726563746F727920203A200046696C656E616D652020203A200039 +:2063C0002C20436C75737465723A002C2053697A653A00A9FF8F4801008F4901008F4A0101 +:2063E00000A9FF8F4C01008F4D01008F4E010020DB56202C6720C367203764207964A93877 +:206400008569A9428F6A0000A20000A900EBDABF181038AA204E65FAE8E00900D0ED2279DB +:20642000303820586422B130385820AE55202B5B206158EAEA80FC48A9E98F1200AFA900C0 +:206440008F1000AFC230A900008F1400AFA900008F1600AFE2206860AF40010029848F40CE +:206460000100AF41010029A18F410100A97B8F4C0100A95E8F4D010060A9008F150F388532 +:2064800048646C6449A9018F190F38A648BF24FC391A8F180F3820AF5A6048A900EBAF4834 +:2064A00000001ACF686A38D002A9008F480000AAA0900120B157BF24FC391A8F180F38680C +:2064C000608BA90048ABA9038D00019C01019C030138AF170F38E9048D0201C220AD040167 +:2064E000AAE220A9008D61018D62018D6301BF00003A8D6501BF01003A8D6601BF02003AA2 +:206500008D6701A9018D6401A90B8D6001AB608BA90048ABE220A9008D61018D62018D639C +:2065200001A9018D6401A90B8D6001AB60A9808F04E6AF204765A9108F02E6AF8F03E6AFEE +:20654000A9038F04E6AF60A23002CAD0FD60AF6A00008F000100A9008F0101008F030100C6 +:20656000A9168F020100C220AF04010018693B108567E220AF6A0000A0A30120B157A767E7 +:20658000D04BE667D002E66820CE65E667D002E668203E66E667D002E668207866E667D067 +:2065A00002E66820B466E667D002E668DAA62720F066FAE667D002E668200C67C220A567DF +:2065C0006906008567E220A0A801203D5860A767484848489F20E7AF2980A03D0220EE5790 +:2065E000682940A08D0220EE57682920A0DD0220EE57682910A02D0320EE5768290FA07E0D +:206600000320B157A00600B767484848489F23E7AF2980A0570220EE57682940A0A70220D2 +:20662000EE57682920A0F70220EE57682910A0470320EE5768290FA0980320B15760A76705 +:20664000489F40E7AF29C02A2A2AA0CE0320B15768293FA01E0420B157A00600B767489F18 +:2066600043E7AF29C02A2A2AA0E80320B15768293FA0380420B15760A767489F60E7AF29DF +:20668000F04A4A4A4AA06E0420B15768290FA0BE0420B157A00600B767489F63E7AF29F0C1 +:2066A0004A4A4A4AA0880420B15768290FA0D80420B15760A767489F80E7AF29F04A4A4AB8 +:2066C0004AA00E0520B15768290FA05E0520B157A00600B767489F83E7AF29F04A4A4A4AC5 +:2066E000A0280520B15768290FA0780520B15760A7674809F09FC0E7AF290E4AA06806206D +:20670000B157682901A0B80620B15760A7679FE0E7AF2907A0AE0520B157A00500B7679FC9 +:20672000E3E7AF2907A0C80520B157600B48DA0818E220A9008D870F20DA67A9AA8F6410E9 +:20674000AF20E567AF6010AFC955F003826F00A9AB8F6410AF20E567AF6010AFC900F00352 +:20676000825B00A9608F6410AF20DA67A9698F6010AF20DA67A9FF8F6010AFA2FFFFCAEA55 +:20678000EAEAEAEAEAEAEAE00000D0F220E567AF6010AF20DA67A9F48F6010AF20E567AFF0 +:2067A0006010AFC9FAD0EC20F067AF40010029808F400100AF41010029018F41010028FA4D +:2067C000682B60C230A2804DA90001A0000554AF38E220A9018F0007AF60AF6410AF29028D +:2067E000C902F0F660AF6410AF2901C901D0F66020DA67A9A88F6410AF20DA67A9A98F6492 +:2068000010AF20E567AF6010AFC900D0EC20DA67A9208F6410AF20E567AF6010AF09024891 +:2068200020DA67A9608F6410AF20DA67688F6010AFA9F6205668206968A9E820566820695F +:2068400068A900205668206968A9F4205668206968A90085E0604820DA67A9D48F6410AFA6 +:2068600020DA67688F6010AF6020E567AF6010AF6048DAE210AA3035BFC86838C210A09655 +:206880000020B1578F300000302329704A4A4A4A8F310000AF300000290F8F300000A900BE +:2068A0008F27000020F53722013238E220C210FA6860010101010101010101AACABFB2685D +:2068C0003849019FB268386080808031338036383A804180808080802C32343537393B3CEA +:2068E0004280808080808021238026282A808080808080801C22242527292B808080808018 +:20690000808080808080808080808080808080808080808080808080808080808080808077 +:2069200080808080808080800256025682568256AB56AB568256C256DA56C210A9028F15B4 +:206940000F3822825C38A9008D1F03A934855364526451205F69208A6920D069E2106BA9E6 +:2069600000A00004975188D0FBA53FF01C22E85C3822BF5F38C220A900668580A90000850E +:20698000828586226B6038E22060C230A900A0850CA900C08517E220A9AF850E8519A03EA9 +:2069A00003A9288580A28F03861AA20000A9148581BF804E38970CA9509717C8E8C681D0EF +:2069C000F0C2209818693C00A8E220C680D0DE6064516452A9348553A20000A00B00B7511D +:2069E000F02422C35B38C220A51A18693E00851AA5516912008551C98004B00AE8E02600D0 +:206A0000F004E22080D5E220A90522255C3860A900EBAD1F03C2308D0001A912008D020112 +:206A2000AD04018551A900808580A937008582A01000B75122396138E22022B13038226B43 +:206A40006A3822476A386B20796420DB56205959206158202B5B20AF5A6B439044914546B8 +:206A6000924793419442430000060022B1303820976CA20000A9009F000039E8D0F9C23026 +:206A8000A900808508A93700850AE220A01000B708C910D00522F76A386BC921D00422A309 +:206AA0006A386BA9028F676A3820B06A20826B6BA01100B7088940F017A9018F6A6A38A9A6 +:206AC0000F8D6501A9018D6601A90C8D670180238920F00AC8C220B708E220C88015A900B5 +:206AE0008F6A6A38A9988D6501A95E8D6601A9048D6701200F6560A9018F676A3820156B54 +:206B000020956B20BA6B20B06A6B0701080209030A04050B06C8B708291F8F696A38B70801 +:206B20002980F007C8B708C900D0F9C8A93885F2E220B708F04AC2203A8F000100A9160016 +:206B40008F020100AF04010018693B1085F0A90000E220C8644E87F0A64EBF0A6B38AAB751 +:206B6000085A9B97F07AC8E64EA54EC90B90E95AA00C00A92097F0C8C01600D0F87A80B075 +:206B8000C860B708C8C900D0F9A93885F2E220B708F000C860B7088F686A38AAC8C220A92E +:206BA00024FC85F0A9390085F2E220B708C887F0E6F0B002E6F1CAD0F26064F3A93985F6E8 +:206BC000C220B708F01F5AA8A5F329FF008F000100A901078F020100AF0401001A85F4E247 +:206BE0002020F26B7AC8C8E220E6F3A5F3C920D0CF60B7088F420000C8C220297F008F0022 +:206C00000100A91C008F020100AF0401001A8FFA0000E220A6FAB708C88FF90000290F8F4D +:206C2000F70000C2208A1865F765F765F7AAE220B7085A9B97F47AC8E8B7085A9B97F47AF7 +:206C4000C8E8290FF009B7085A9B97F47AC8E8AFF9000010BFAF4200001097605ADAA21293 +:206C600000A00000A92D970CC8CAD0FAFA7A605AA5F620B157C8C8A5F520B157C8C8A5F433 +:206C800020B1577A604848E2206820B15788886820B157C22068605AC220A900E7852CA960 +:206CA000AF00852EE220A0A000A900972CC8C0B900D0F87A605A205C6CC220AF180F382986 +:206CC000FF003A8F000100A901078F020100AF0401001A85F4E220A93985F6A0A000206F33 +:206CE0006CC220A56C297F008F000100A91C008F020100AF0401001AA0520020856CA8A984 +:206D00000000E22064288F270000AABFB26838D005C8C8C88058B7F4297F20D56EB7F429E5 +:206D2000804A4A4A854EC8B7F429F04A4A4A4A654EF0143A8F6A00005AA627A900EBBF18F2 +:206D40001038AA204E657AAF300000F011C90FF02BC2205A20F537220132387AE220A900E7 +:206D6000EBB7F4C8290FF0050AAAFC8D6DC8A900EBAF2700001AC909D08C7A60AF270000B4 +:206D80001869B0852CA900872CC8C880E1AD6D206E206EAD6DAD6DAD6DAD6DAD6DAD6DAD45 +:206DA0006DAE6DAD6D966E056EAD6D166E605AB7F4854CC220A900E7852CA9AF00852EE2D6 +:206DC00030A527AABF181038186940A8B72C48293F18654CC9409002A93F293F854E6829DA +:206DE000C0054E972CC8C8C8B72C48293F18654CC9409002A93F293F854E6829C0054E9710 +:206E00002CC2107A60B7F43A856CA9008F190F38209A647A7A60B7F48F696A3820AF5A60EC +:206E20005A4A8550B7F4854CC220A900E7852CA9AF00852EE230A5271869A0A8B72CC210D3 +:206E4000BBA05A0020B1579BE2104898186910A8B72C854EC210BBA0A80020B1572903A030 +:206E6000580020B1579BEB68AAA5508902F00AC2208A38E54CE2208008C2208A18654CE20A +:206E800020E210EB2903054E972C9838E910A8EB972CC2107A605AC220A900E7852CA9AF13 +:206EA00000852EE220B7F4297FF0013A493F854EE210A627BF181038186940A8B72C29C031 +:206EC00018654E972CC8C8C8B72C29C018654E972CC2107A605A4848AF2700000AA868F0FC +:206EE0000320B15729704A4A4A4A8F31000068290F8F3000007A605AE220A9018526C2201A +:206F0000A93800850AA53229FF003A0A0A0A0A18693B108508C220A9200022F53738E22014 +:206F2000A00000B708872CC220A9400022F53738E220A00200B708872CC220A9600022F5D6 +:206F40003738E220A00400B708872CC220A9800022F53738E220A00600B708872CC220A974 +:206F6000E00022F53738E220A00900B708290F872CA9008526C220A9200022F53738E220CF +:206F8000A00100B708872CC220A9400022F53738E220A00300B708872CC220A9600022F574 +:206FA0003738E220A00500B708872CC220A9800022F53738E220A07100B708872CC220A9A8 +:206FC000E00022F53738E220A00900B70829F04A4A4A4A872CA52718290F69C0852AA90050 +:1C6FE000852BC23018A900E7652A852CA9AF00852EE220A00800B708872C7A600A :020000040039C1 :200000000101000000000000000000000000000000000000000000000000000000020000DC :200020000000000000000000000000000000000000000000000000000003000000000000BD diff --git a/tracker.lst b/tracker.lst index b830545..736fdce 100644 --- a/tracker.lst +++ b/tracker.lst @@ -1,7 +1,7 @@ ; 64tass Turbo Assembler Macro V1.54.1900 listing file ; 64tass.exe --long-address -x --intel-hex -o tracker.hex --list tracker.lst tracker.asm -; Thu Aug 27 22:51:02 2020 +; Fri Aug 28 01:06:30 2020 ;Offset ;Hex ;Monitor ;Source @@ -218,19 +218,35 @@ =$00109c CSRDOWN = $00109C ; =$0010a0 CSRHOME = $0010A0 ; =$0010a4 SCROLLUP = $0010A4 ; Scroll the screen up one line. Creates an empty line at the bottom. -=$0010a8 SCRREADLINE = $0010A8 ; Loads the MCMDADDR/BCMDADDR variable with the address of the current line on the screen. This is called when the RETURN key is pressed and is the first step in processing an immediate mode command. -=$0010ac SCRGETWORD = $0010AC ; Read a current word on the screen. A word ends with a space, punctuation (except _), or any control character (value < 32). Loads the address into CMPTEXT_VAL and length into CMPTEXT_LEN variables. -=$0010b0 CLRSCREEN = $0010B0 ; Clear the screen -=$0010b4 INITCHLUT = $0010B4 ; Init character look-up table -=$0010b8 INITSUPERIO = $0010B8 ; Init Super-IO chip -=$0010bc INITKEYBOARD = $0010BC ; Init keyboard -=$0010c0 INITRTC = $0010C0 ; Init Real-Time Clock -=$0010c4 INITCURSOR = $0010C4 ; Init the Cursors registers -=$0010c8 INITFONTSET = $0010C8 ; Init the Internal FONT Memory -=$0010cc INITGAMMATABLE = $0010CC ; Init the RGB GAMMA Look Up Table -=$0010d0 INITALLLUT = $0010D0 ; Init the Graphic Engine (Bitmap/Tile/Sprites) LUT -=$0010d4 INITVKYTXTMODE = $0010D4 ; Init the Text Mode @ Reset Time -=$0010d8 INITVKYGRPMODE = $0010D8 ; Init the Basic Registers for the Graphic Mode +=$0010a8 CLRSCREEN = $0010A8 ; Clear the screen +=$0010ac INITCHLUT = $0010AC ; Init character look-up table +=$0010b0 INITSUPERIO = $0010B0 ; Init Super-IO chip +=$0010b4 INITKEYBOARD = $0010B4 ; Init keyboard +=$0010bc INITCURSOR = $0010BC ; Init the Cursors registers +=$0010c0 INITFONTSET = $0010C0 ; Init the Internal FONT Memory +=$0010c4 INITGAMMATABLE = $0010C4 ; Init the RGB GAMMA Look Up Table +=$0010c8 INITALLLUT = $0010C8 ; Init the Graphic Engine (Bitmap/Tile/Sprites) LUT +=$0010cc INITVKYTXTMODE = $0010CC ; Init the Text Mode @ Reset Time +=$0010d0 INITVKYGRPMODE = $0010D0 ; Init the Basic Registers for the Graphic Mode +=$00112c SETSIZES = $00112C ; Set the text screen size variables based on the border and screen resolution. +=$0010f0 F_OPEN = $0010F0 ; open a file for reading/writing/creating +=$0010f4 F_CREATE = $0010F4 ; create a new file +=$0010f8 F_CLOSE = $0010F8 ; close a file (make sure last cluster is written) +=$0010fc F_WRITE = $0010FC ; write the current cluster to the file +=$001100 F_READ = $001100 ; read the next cluster from the file +=$001104 F_DELETE = $001104 ; delete a file / directory +=$001108 F_DIROPEN = $001108 ; open a directory and seek the first directory entry +=$00110c F_DIRNEXT = $00110C ; seek to the next directory of an open directory +=$001110 F_DIRREAD = $001110 ; Read the directory entry for the specified file +=$001114 F_DIRWRITE = $001114 ; Write any changes in the current directory cluster back to the drive +=$001118 F_LOAD = $001118 ; load a binary file into memory, supports multiple file formats +=$00111c F_SAVE = $00111C ; Save memory to a binary file +=$001120 CMDBLOCK = $001120 ; Send a command to a block device +=$001124 F_RUN = $001124 ; Load and run an executable binary file +=$001128 F_MOUNT = $001128 ; Mount the designated block device +=$001130 F_COPY = $001130 ; Copy a file +=$001134 F_ALLOCFD = $001134 ; Allocate a file descriptor +=$001138 F_FREEFD = $001138 ; Free a file descriptor ;****** Return to file: tracker.asm @@ -724,15 +740,19 @@ =$000140 INT_PENDING_REG0 = $000140 ; =$000141 INT_PENDING_REG1 = $000141 ; =$000142 INT_PENDING_REG2 = $000142 ; +=$000143 INT_PENDING_REG3 = $000143 ; FMX Model =$000144 INT_POL_REG0 = $000144 ; =$000145 INT_POL_REG1 = $000145 ; =$000146 INT_POL_REG2 = $000146 ; +=$000147 INT_POL_REG7 = $000147 ; FMX Model =$000148 INT_EDGE_REG0 = $000148 ; =$000149 INT_EDGE_REG1 = $000149 ; =$00014a INT_EDGE_REG2 = $00014A ; +=$00014b INT_EDGE_REG3 = $00014B ; FMX Model =$00014c INT_MASK_REG0 = $00014C ; =$00014d INT_MASK_REG1 = $00014D ; =$00014e INT_MASK_REG2 = $00014E ; +=$00014f INT_MASK_REG3 = $00014F ; FMX Model =$01 FNX0_INT00_SOF = $01 ;Start of Frame @ 60FPS =$02 FNX0_INT01_SOL = $02 ;Start of Line (Programmable) =$04 FNX0_INT02_TMR0 = $04 ;Timer 0 Interrupt @@ -742,21 +762,29 @@ =$40 FNX0_INT06_FDC = $40 ;Floppy Disk Controller =$80 FNX0_INT07_MOUSE = $80 ; Mouse Interrupt (INT12 in SuperIO IOspace) =$01 FNX1_INT00_KBD = $01 ;Keyboard Interrupt -=$02 FNX1_INT01_SC0 = $02 ;Sprite 2 Sprite Collision -=$04 FNX1_INT02_SC1 = $04 ;Sprite 2 Tiles Collision +=$02 FNX1_INT01_SC0 = $02 ;VICKY_II (INT2) Sprite 2 Sprite Collision +=$04 FNX1_INT02_SC1 = $04 ;VICKY_II (INT3) Sprite 2 Tiles Collision =$08 FNX1_INT03_COM2 = $08 ;Serial Port 2 =$10 FNX1_INT04_COM1 = $10 ;Serial Port 1 =$20 FNX1_INT05_MPU401 = $20 ;Midi Controller Interrupt =$40 FNX1_INT06_LPT = $40 ;Parallel Port -=$80 FNX1_INT07_SDCARD = $80 ;SD Card Controller Interrupt -=$01 FNX2_INT00_OPL2R = $01 ;OPl2 Right Channel -=$02 FNX2_INT01_OPL2L = $02 ;OPL2 Left Channel -=$04 FNX2_INT02_BTX_INT= $04 ;Beatrix Interrupt (TBD) -=$08 FNX2_INT03_SDMA = $08 ;System DMA -=$10 FNX2_INT04_VDMA = $10 ;Video DMA -=$20 FNX2_INT05_DACHP = $20 ;DAC Hot Plug -=$40 FNX2_INT06_EXT = $40 ;External Expansion -=$80 FNX2_INT07_ALLONE = $80 ; Not Used - Always 1 +=$80 FNX1_INT07_SDCARD = $80 ;SD Card Controller Interrupt (CH376S) +=$01 FNX2_INT00_OPL3 = $01 ;OPl3 +=$02 FNX2_INT01_GABE_INT0 = $02 ;GABE (INT0) - TBD +=$04 FNX2_INT02_GABE_INT1 = $04 ;GABE (INT1) - TBD +=$08 FNX2_INT03_SDMA = $08 ;VICKY_II (INT4) +=$10 FNX2_INT04_VDMA = $10 ;VICKY_II (INT5) +=$20 FNX2_INT05_GABE_INT2 = $20 ;GABE (INT2) - TBD +=$40 FNX2_INT06_EXT = $40 ;External Expansion +=$80 FNX2_INT07_SDCARD_INS = $80 ; SDCARD Insertion +=$01 FNX3_INT00_OPN2 = $01 ;OPN2 +=$02 FNX3_INT01_OPM = $02 ;OPM +=$04 FNX3_INT02_IDE = $04 ;HDD IDE INTERRUPT +=$08 FNX3_INT03_TBD = $08 ;TBD +=$10 FNX3_INT04_TBD = $10 ;TBD +=$20 FNX3_INT05_TBD = $20 ;GABE (INT2) - TBD +=$40 FNX3_INT06_TBD = $40 ;External Expansion +=$80 FNX3_INT07_TBD = $80 ; SDCARD Insertion ;****** Return to file: tracker.asm @@ -779,12 +807,12 @@ >380f19 01 LINE_NUM_DEC .byte 1 ; line being display/played =$80 LINE_COPY = $80 =$81 CHAR_COPY = $81 -=949 ORDER_EDITOR_SCR = 128 * 7 + 53 -=3460 PTRN_EDITOR_SCR = 128 * 27 + 4 +=613 ORDER_EDITOR_SCR = SCREEN_WIDTH * 7 + 53 +=2164 PTRN_EDITOR_SCR = SCREEN_WIDTH * 27 + 4 .38ff00 18 clc CLC .38ff01 fb xce XCE ; go into native mode .38ff02 78 sei SEI ; ignore interrupts -.38ff03 5c d7 69 38 jmp $3869d7 JML TRACKER +.38ff03 5c d3 63 38 jmp $3863d3 JML TRACKER .38ff60 RHIRQ .38ff60 c2 30 rep #$30 REP #$30 ; set A&X long .38ff62 8b phb PHB @@ -792,21 +820,21 @@ .38ff64 48 pha PHA .38ff65 da phx PHX .38ff66 5a phy PHY -.38ff67 22 a4 57 38 jsl $3857a4 JSL IRQ_HANDLER +.38ff67 22 a4 51 38 jsl $3851a4 JSL IRQ_HANDLER .38ff6b 7a ply PLY .38ff6c fa plx PLX .38ff6d 68 pla PLA .38ff6e 2b pld PLD .38ff6f ab plb PLB .38ff70 40 rti RTI -.38ffe0 5c d7 69 38 jmp $3869d7 JUMP_READY JML TRACKER ; Kernel READY routine. Rewrite this address to jump to a custom kernel. +.38ffe0 5c d3 63 38 jmp $3863d3 JUMP_READY JML TRACKER ; Kernel READY routine. Rewrite this address to jump to a custom kernel. >38ffe4 10 ff RVECTOR_COP .addr HCOP ; FFE4 >38ffe6 20 ff RVECTOR_BRK .addr HBRK ; FFE6 >38ffe8 30 ff RVECTOR_ABORT .addr HABORT ; FFE8 >38ffea 40 ff RVECTOR_NMI .addr HNMI ; FFEA >38ffec 00 00 .word $0000 ; FFEC >38ffee 60 ff RVECTOR_IRQ .addr HIRQ ; FFEE -.38fff0 5c d7 69 38 jmp $3869d7 RRETURN JML TRACKER +.38fff0 5c d3 63 38 jmp $3863d3 RRETURN JML TRACKER >38fff4 10 ff RVECTOR_ECOP .addr HCOP ; FFF4 >38fff6 20 ff RVECTOR_EBRK .addr HBRK ; FFF6 >38fff8 30 ff RVECTOR_EABORT .addr HABORT ; FFF8 @@ -3129,7 +3157,6 @@ ;****** Processing file: display.asm =80 SCREEN_WIDTH = 80 -=48 UNUSED_SCR = 128 - SCREEN_WIDTH .383b80 TRACKER_SCREEN >383b80 d5 line1 .byte $D5 >383b81 c3 c3 c3 c3 c3 c3 c3 c3 .fill SCREEN_WIDTH - 2, $C3 @@ -3137,218 +3164,322 @@ ; ...repeated 3 times (48 bytes)... >383bc9 c3 c3 c3 c3 c3 c3 >383bcf c9 .byte $C9 ->383bd0 00 00 00 00 00 00 00 00 .fill 128 - SCREEN_WIDTH, 0 ->383bd8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383be8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383bf8 00 00 00 00 00 00 00 00 ->383c00 c2 line2 .byte $c2 ->383c01 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 2, 0 ->383c09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>383bd0 c2 line2 .byte $c2 +>383bd1 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 2, 0 +>383bd9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ...repeated 3 times (48 bytes)... ->383c49 00 00 00 00 00 00 ->383c4f c2 .byte $c2 ->383c50 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->383c58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383c68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383c78 00 00 00 00 00 00 00 00 ->383c80 c2 line3 .byte $c2 ->383c81 00 00 00 00 00 00 00 00 .fill (SCREEN_WIDTH - 40) / 2, 0 ->383c89 00 00 00 00 00 00 00 00 00 00 00 00 ->383c95 43 32 35 36 20 46 6f 65 .text 'C256 Foenix Tracker' ; 19 characters ->383c9d 6e 69 78 20 54 72 61 63 6b 65 72 ->383ca8 00 00 00 00 .fill 4, 0 ->383cac 5b 56 65 72 73 69 6f 6e .text '[Version 0.3.1]' ; 15 characters ->383cb4 20 30 2e 33 2e 31 5d ->383cbb 00 00 00 00 00 00 00 00 .fill (SCREEN_WIDTH - 40) / 2, 0 ->383cc3 00 00 00 00 00 00 00 00 00 00 00 00 ->383ccf c2 .byte $c2 ->383cd0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->383cd8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383ce8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383cf8 00 00 00 00 00 00 00 00 ->383d00 c2 line4 .byte $c2 ->383d01 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 2, 0 ->383d09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>383c19 00 00 00 00 00 00 +>383c1f c2 .byte $c2 +>383c20 c2 line3 .byte $c2 +>383c21 00 00 00 00 00 00 00 00 .fill (SCREEN_WIDTH - 40) / 2, 0 +>383c29 00 00 00 00 00 00 00 00 00 00 00 00 +>383c35 43 32 35 36 20 46 6f 65 .text 'C256 Foenix Tracker' ; 19 characters +>383c3d 6e 69 78 20 54 72 61 63 6b 65 72 +>383c48 00 00 00 00 .fill 4, 0 +>383c4c 5b 56 65 72 73 69 6f 6e .text '[Version 0.3.1]' ; 15 characters +>383c54 20 30 2e 33 2e 31 5d +>383c5b 00 00 00 00 00 00 00 00 .fill (SCREEN_WIDTH - 40) / 2, 0 +>383c63 00 00 00 00 00 00 00 00 00 00 00 00 +>383c6f c2 .byte $c2 +>383c70 c2 line4 .byte $c2 +>383c71 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 2, 0 +>383c79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ...repeated 3 times (48 bytes)... ->383d49 00 00 00 00 00 00 ->383d4f c2 .byte $c2 ->383d50 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->383d58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383d68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383d78 00 00 00 00 00 00 00 00 ->383d80 ab line5 .byte $ab ->383d81 c3 c3 c3 c3 c3 c3 c3 c3 .fill 50, $C3 ->383d89 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 ->383d99 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 ->383da9 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 ->383db3 b2 .byte $b2 ->383db4 c3 c3 c3 c3 c3 c3 c3 .fill 7, $C3 ->383dbb b2 .byte $b2 ->383dbc c3 c3 c3 c3 c3 c3 c3 c3 .fill SCREEN_WIDTH - 50 -11, $C3 ->383dc4 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 ->383dcf b3 .byte $b3 ->383dd0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->383dd8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383de8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383df8 00 00 00 00 00 00 00 00 ->383e00 c2 line6 .byte $c2 ->383e01 00 00 .fill 2, 0 ->383e03 b0 c3 ae .byte $b0, $c3, $ae ->383e06 49 6e 73 74 72 75 6d 65 .text 'Instrument [---]:' ; 16 chars ->383e0e 6e 74 20 5b 2d 2d 2d 5d 3a ->383e17 00 00 .fill 2, 0 ->383e19 20 20 20 20 20 20 20 20 .text ' ' ; 13 chars` ->383e21 20 20 20 20 ->383e25 00 00 00 00 00 00 00 00 .fill 9, 0 ->383e2d 00 ->383e2e b0 c3 ae .byte $b0, $c3, $ae ->383e31 00 00 .fill 2, 0 +>383cb9 00 00 00 00 00 00 +>383cbf c2 .byte $c2 +>383cc0 ab line5 .byte $ab +>383cc1 c3 c3 c3 c3 c3 c3 c3 c3 .fill 50, $C3 +>383cc9 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 +>383cd9 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 +>383ce9 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 +>383cf3 b2 .byte $b2 +>383cf4 c3 c3 c3 c3 c3 c3 c3 .fill 7, $C3 +>383cfb b2 .byte $b2 +>383cfc c3 c3 c3 c3 c3 c3 c3 c3 .fill SCREEN_WIDTH - 50 -11, $C3 +>383d04 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 +>383d0f b3 .byte $b3 +>383d10 c2 line6 .byte $c2 +>383d11 00 00 .fill 2, 0 +>383d13 b0 c3 ae .byte $b0, $c3, $ae +>383d16 49 6e 73 74 72 75 6d 65 .text 'Instrument [---]:' ; 16 chars +>383d1e 6e 74 20 5b 2d 2d 2d 5d 3a +>383d27 00 00 .fill 2, 0 +>383d29 20 20 20 20 20 20 20 20 .text ' ' ; 13 chars` +>383d31 20 20 20 20 +>383d35 00 00 00 00 00 00 00 00 .fill 9, 0 +>383d3d 00 +>383d3e b0 c3 ae .byte $b0, $c3, $ae +>383d41 00 00 .fill 2, 0 +>383d43 c2 .byte $c2 +>383d44 00 .fill 1, 0 +>383d45 4f 72 64 65 72 .text 'Order' +>383d4a 00 .fill 1,0 +>383d4b c2 .byte $c2 +>383d4c 00 .fill 1,0 +>383d4d 4d 49 44 49 .text 'MIDI' +>383d51 00 00 00 00 00 00 00 00 .fill 14,0 +>383d59 00 00 00 00 00 00 +>383d5f c2 .byte $c2 +>383d60 ab line7 .byte $ab +>383d61 c3 c3 .fill 2, $C3 +>383d63 bd .byte $bd +>383d64 31 .text '1' +>383d65 ad .byte $ad +>383d66 c3 c3 c3 c3 c3 c3 .fill 6, $C3 +>383d6c b2 .byte $b2 +>383d6d c3 c3 c3 .fill 3, $C3 +>383d70 b2 .byte $b2 +>383d71 c3 c3 c3 c3 c3 c3 c3 c3 .fill 9, $C3 +>383d79 c3 +>383d7a 99 .byte $99 +>383d7b c3 c3 c3 c3 c3 c3 c3 c3 .fill 11, $C3 +>383d83 c3 c3 c3 +>383d86 b2 .byte $b2 +>383d87 c3 c3 c3 .fill 3, $C3 +>383d8a b2 .byte $b2 +>383d8b c3 c3 c3 .fill 3, $C3 +>383d8e bd .byte $bd +>383d8f 32 .text '2' +>383d90 ad .byte $ad +>383d91 c3 c3 .fill 2, $C3 +>383d93 db .byte $db +>383d94 c3 c3 c3 .fill 3, $C3 +>383d97 b2 .byte $b2 +>383d98 c3 c3 c3 .fill 3, $C3 +>383d9b db .byte $db +>383d9c c3 c3 c3 c3 c3 c3 c3 c3 .fill SCREEN_WIDTH - 50 -11, $C3 +>383da4 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 +>383daf b3 .byte $b3 +.383db0 lines8 +>383db0 c2 .byte $c2 +>383db1 54 72 65 6d 6f 6c 6f 20 .text 'Tremolo ' +>383db9 20 20 20 +>383dbc c2 .byte $c2 +>383dbd 4f 66 66 .text 'Off' +>383dc0 c2 .byte $c2 +>383dc1 00 00 00 00 00 00 00 00 .fill 9, 0 +>383dc9 00 +>383dca 9a .byte $9a +>383dcb 54 72 65 6d 6f 6c 6f 20 .text 'Tremolo ' +>383dd3 20 20 20 +>383dd6 c2 .byte $c2 +>383dd7 4f 66 66 .text 'Off' +>383dda c2 .byte $c2 +>383ddb 00 00 00 00 00 00 00 00 .fill 8, 0 +>383de3 c2 .byte $c2 +>383de4 00 00 00 .fill 3, 0 +>383de7 c2 .byte $c2 +>383de8 00 00 00 .fill 3, 0 +>383deb c2 .byte $c2 +>383dec 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>383df4 00 00 00 00 00 00 00 00 00 00 00 +>383dff c2 .byte $c2 +.383e00 lines9 +>383e00 c2 .byte $c2 +>383e01 56 69 62 72 61 74 6f 20 .text 'Vibrato ' +>383e09 20 20 20 +>383e0c c2 .byte $c2 +>383e0d 4f 66 66 .text 'Off' +>383e10 c2 .byte $c2 +>383e11 00 00 00 00 00 00 00 00 .fill 9, 0 +>383e19 00 +>383e1a 9a .byte $9a +>383e1b 56 69 62 72 61 74 6f 20 .text 'Vibrato ' +>383e23 20 20 20 +>383e26 c2 .byte $c2 +>383e27 4f 66 66 .text 'Off' +>383e2a c2 .byte $c2 +>383e2b 00 00 00 00 00 00 00 00 .fill 8, 0 >383e33 c2 .byte $c2 ->383e34 00 .fill 1, 0 ->383e35 4f 72 64 65 72 .text 'Order' ->383e3a 00 .fill 1,0 +>383e34 00 00 00 .fill 3, 0 +>383e37 c2 .byte $c2 +>383e38 00 00 00 .fill 3, 0 >383e3b c2 .byte $c2 ->383e3c 00 .fill 1,0 ->383e3d 4d 49 44 49 .text 'MIDI' ->383e41 00 00 00 00 00 00 00 00 .fill 14,0 ->383e49 00 00 00 00 00 00 +>383e3c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>383e44 00 00 00 00 00 00 00 00 00 00 00 >383e4f c2 .byte $c2 ->383e50 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->383e58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383e68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383e78 00 00 00 00 00 00 00 00 ->383e80 ab line7 .byte $ab ->383e81 c3 c3 .fill 2, $C3 ->383e83 bd .byte $bd ->383e84 31 .text '1' ->383e85 ad .byte $ad ->383e86 c3 c3 c3 c3 c3 c3 .fill 6, $C3 ->383e8c b2 .byte $b2 ->383e8d c3 c3 c3 .fill 3, $C3 ->383e90 b2 .byte $b2 ->383e91 c3 c3 c3 c3 c3 c3 c3 c3 .fill 9, $C3 ->383e99 c3 ->383e9a 99 .byte $99 ->383e9b c3 c3 c3 c3 c3 c3 c3 c3 .fill 11, $C3 ->383ea3 c3 c3 c3 ->383ea6 b2 .byte $b2 ->383ea7 c3 c3 c3 .fill 3, $C3 ->383eaa b2 .byte $b2 ->383eab c3 c3 c3 .fill 3, $C3 ->383eae bd .byte $bd ->383eaf 32 .text '2' ->383eb0 ad .byte $ad ->383eb1 c3 c3 .fill 2, $C3 ->383eb3 db .byte $db ->383eb4 c3 c3 c3 .fill 3, $C3 ->383eb7 b2 .byte $b2 ->383eb8 c3 c3 c3 .fill 3, $C3 ->383ebb db .byte $db ->383ebc c3 c3 c3 c3 c3 c3 c3 c3 .fill SCREEN_WIDTH - 50 -11, $C3 ->383ec4 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 ->383ecf b3 .byte $b3 ->383ed0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->383ed8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383ee8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383ef8 00 00 00 00 00 00 00 00 -.383f00 lines8 +.383e50 lines10 +>383e50 c2 .byte $c2 +>383e51 53 75 73 74 61 69 6e 69 .text 'Sustaining ' +>383e59 6e 67 20 +>383e5c c2 .byte $c2 +>383e5d 4f 66 66 .text 'Off' +>383e60 c2 .byte $c2 +>383e61 00 00 00 00 00 00 00 00 .fill 9, 0 +>383e69 00 +>383e6a 9a .byte $9a +>383e6b 53 75 73 74 61 69 6e 69 .text 'Sustaining ' +>383e73 6e 67 20 +>383e76 c2 .byte $c2 +>383e77 4f 66 66 .text 'Off' +>383e7a c2 .byte $c2 +>383e7b 00 00 00 00 00 00 00 00 .fill 8, 0 +>383e83 c2 .byte $c2 +>383e84 00 00 00 .fill 3, 0 +>383e87 c2 .byte $c2 +>383e88 00 00 00 .fill 3, 0 +>383e8b c2 .byte $c2 +>383e8c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>383e94 00 00 00 00 00 00 00 00 00 00 00 +>383e9f c2 .byte $c2 +.383ea0 lines11 +>383ea0 c2 .byte $c2 +>383ea1 53 63 61 6c 65 20 52 61 .text 'Scale Rate ' +>383ea9 74 65 20 +>383eac c2 .byte $c2 +>383ead 4f 66 66 .text 'Off' +>383eb0 c2 .byte $c2 +>383eb1 00 00 00 00 00 00 00 00 .fill 9, 0 +>383eb9 00 +>383eba 9a .byte $9a +>383ebb 53 63 61 6c 65 20 52 61 .text 'Scale Rate ' +>383ec3 74 65 20 +>383ec6 c2 .byte $c2 +>383ec7 4f 66 66 .text 'Off' +>383eca c2 .byte $c2 +>383ecb 00 00 00 00 00 00 00 00 .fill 8, 0 +>383ed3 c2 .byte $c2 +>383ed4 00 00 00 .fill 3, 0 +>383ed7 c2 .byte $c2 +>383ed8 00 00 00 .fill 3, 0 +>383edb c2 .byte $c2 +>383edc 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>383ee4 00 00 00 00 00 00 00 00 00 00 00 +>383eef c2 .byte $c2 +.383ef0 lines12 +>383ef0 c2 .byte $c2 +>383ef1 4d 75 6c 74 69 70 6c 69 .text 'Multiplier ' +>383ef9 65 72 20 +>383efc c2 .byte $c2 +>383efd 20 30 30 .text ' 00' >383f00 c2 .byte $c2 ->383f01 54 72 65 6d 6f 6c 6f 20 .text 'Tremolo ' ->383f09 20 20 20 ->383f0c c2 .byte $c2 ->383f0d 4f 66 66 .text 'Off' ->383f10 c2 .byte $c2 ->383f11 00 00 00 00 00 00 00 00 .fill 9, 0 ->383f19 00 ->383f1a 9a .byte $9a ->383f1b 54 72 65 6d 6f 6c 6f 20 .text 'Tremolo ' ->383f23 20 20 20 ->383f26 c2 .byte $c2 ->383f27 4f 66 66 .text 'Off' ->383f2a c2 .byte $c2 ->383f2b 00 00 00 00 00 00 00 00 .fill 8, 0 ->383f33 c2 .byte $c2 ->383f34 00 00 00 .fill 3, 0 ->383f37 c2 .byte $c2 ->383f38 00 00 00 .fill 3, 0 ->383f3b c2 .byte $c2 ->383f3c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->383f44 00 00 00 00 00 00 00 00 00 00 00 ->383f4f c2 .byte $c2 ->383f50 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->383f58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383f68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383f78 00 00 00 00 00 00 00 00 -.383f80 lines9 ->383f80 c2 .byte $c2 ->383f81 56 69 62 72 61 74 6f 20 .text 'Vibrato ' ->383f89 20 20 20 ->383f8c c2 .byte $c2 ->383f8d 4f 66 66 .text 'Off' +>383f01 00 00 00 00 00 00 00 00 .fill 9, 0 +>383f09 00 +>383f0a 9a .byte $9a +>383f0b 4d 75 6c 74 69 70 6c 69 .text 'Multiplier ' +>383f13 65 72 20 +>383f16 c2 .byte $c2 +>383f17 20 30 30 .text ' 00' +>383f1a c2 .byte $c2 +>383f1b 00 00 00 00 00 00 00 00 .fill 8, 0 +>383f23 c2 .byte $c2 +>383f24 00 00 00 .fill 3, 0 +>383f27 c2 .byte $c2 +>383f28 00 00 00 .fill 3, 0 +>383f2b c2 .byte $c2 +>383f2c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>383f34 00 00 00 00 00 00 00 00 00 00 00 +>383f3f c2 .byte $c2 +.383f40 lines13 +>383f40 c2 .byte $c2 +>383f41 53 63 61 6c 65 20 4c 65 .text 'Scale Level' +>383f49 76 65 6c +>383f4c c2 .byte $c2 +>383f4d 20 30 30 .text ' 00' +>383f50 c2 .byte $c2 +>383f51 00 00 00 00 00 00 00 00 .fill 9, 0 +>383f59 00 +>383f5a 9a .byte $9a +>383f5b 53 63 61 6c 65 20 4c 65 .text 'Scale Level' +>383f63 76 65 6c +>383f66 c2 .byte $c2 +>383f67 20 30 30 .text ' 00' +>383f6a c2 .byte $c2 +>383f6b 00 00 00 00 00 00 00 00 .fill 8, 0 +>383f73 c2 .byte $c2 +>383f74 00 00 00 .fill 3, 0 +>383f77 c2 .byte $c2 +>383f78 00 00 00 .fill 3, 0 +>383f7b c2 .byte $c2 +>383f7c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>383f84 00 00 00 00 00 00 00 00 00 00 00 +>383f8f c2 .byte $c2 +.383f90 lines14 >383f90 c2 .byte $c2 ->383f91 00 00 00 00 00 00 00 00 .fill 9, 0 ->383f99 00 ->383f9a 9a .byte $9a ->383f9b 56 69 62 72 61 74 6f 20 .text 'Vibrato ' ->383fa3 20 20 20 ->383fa6 c2 .byte $c2 ->383fa7 4f 66 66 .text 'Off' ->383faa c2 .byte $c2 ->383fab 00 00 00 00 00 00 00 00 .fill 8, 0 ->383fb3 c2 .byte $c2 ->383fb4 00 00 00 .fill 3, 0 ->383fb7 c2 .byte $c2 ->383fb8 00 00 00 .fill 3, 0 ->383fbb c2 .byte $c2 ->383fbc 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->383fc4 00 00 00 00 00 00 00 00 00 00 00 ->383fcf c2 .byte $c2 ->383fd0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->383fd8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383fe8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->383ff8 00 00 00 00 00 00 00 00 -.384000 lines10 ->384000 c2 .byte $c2 ->384001 53 75 73 74 61 69 6e 69 .text 'Sustaining ' ->384009 6e 67 20 ->38400c c2 .byte $c2 ->38400d 4f 66 66 .text 'Off' ->384010 c2 .byte $c2 ->384011 00 00 00 00 00 00 00 00 .fill 9, 0 ->384019 00 ->38401a 9a .byte $9a ->38401b 53 75 73 74 61 69 6e 69 .text 'Sustaining ' ->384023 6e 67 20 ->384026 c2 .byte $c2 ->384027 4f 66 66 .text 'Off' ->38402a c2 .byte $c2 ->38402b 00 00 00 00 00 00 00 00 .fill 8, 0 ->384033 c2 .byte $c2 ->384034 00 00 00 .fill 3, 0 ->384037 c2 .byte $c2 ->384038 00 00 00 .fill 3, 0 ->38403b c2 .byte $c2 ->38403c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->384044 00 00 00 00 00 00 00 00 00 00 00 ->38404f c2 .byte $c2 ->384050 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->384058 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384068 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384078 00 00 00 00 00 00 00 00 -.384080 lines11 +>383f91 56 6f 6c 75 6d 65 20 20 .text 'Volume ' +>383f99 20 20 20 +>383f9c c2 .byte $c2 +>383f9d 20 30 30 .text ' 00' +>383fa0 c2 .byte $c2 +>383fa1 00 00 00 00 00 00 00 00 .fill 9, 0 +>383fa9 00 +>383faa 9a .byte $9a +>383fab 56 6f 6c 75 6d 65 20 20 .text 'Volume ' +>383fb3 20 20 20 +>383fb6 c2 .byte $c2 +>383fb7 20 30 30 .text ' 00' +>383fba c2 .byte $c2 +>383fbb 00 00 00 00 00 00 00 00 .fill 8, 0 +>383fc3 c2 .byte $c2 +>383fc4 00 00 00 .fill 3, 0 +>383fc7 c2 .byte $c2 +>383fc8 00 00 00 .fill 3, 0 +>383fcb c2 .byte $c2 +>383fcc 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>383fd4 00 00 00 00 00 00 00 00 00 00 00 +>383fdf c2 .byte $c2 +.383fe0 lines15 +>383fe0 c2 .byte $c2 +>383fe1 41 74 74 61 63 6b 20 20 .text 'Attack ' +>383fe9 20 20 20 +>383fec c2 .byte $c2 +>383fed 20 30 30 .text ' 00' +>383ff0 c2 .byte $c2 +>383ff1 00 00 00 00 00 00 00 00 .fill 9, 0 +>383ff9 00 +>383ffa 9a .byte $9a +>383ffb 41 74 74 61 63 6b 20 20 .text 'Attack ' +>384003 20 20 20 +>384006 c2 .byte $c2 +>384007 20 30 30 .text ' 00' +>38400a c2 .byte $c2 +>38400b 00 00 00 00 00 00 00 00 .fill 8, 0 +>384013 c2 .byte $c2 +>384014 00 00 00 .fill 3, 0 +>384017 c2 .byte $c2 +>384018 00 00 00 .fill 3, 0 +>38401b c2 .byte $c2 +>38401c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>384024 00 00 00 00 00 00 00 00 00 00 00 +>38402f c2 .byte $c2 +.384030 lines16 +>384030 c2 .byte $c2 +>384031 44 65 63 61 79 20 20 20 .text 'Decay ' +>384039 20 20 20 +>38403c c2 .byte $c2 +>38403d 20 30 30 .text ' 00' +>384040 c2 .byte $c2 +>384041 00 00 00 00 00 00 00 00 .fill 9, 0 +>384049 00 +>38404a 9a .byte $9a +>38404b 44 65 63 61 79 20 20 20 .text 'Decay ' +>384053 20 20 20 +>384056 c2 .byte $c2 +>384057 20 30 30 .text ' 00' +>38405a c2 .byte $c2 +>38405b 00 00 00 00 00 00 00 00 .fill 8, 0 +>384063 c2 .byte $c2 +>384064 00 00 00 .fill 3, 0 +>384067 c2 .byte $c2 +>384068 00 00 00 .fill 3, 0 +>38406b c2 .byte $c2 +>38406c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>384074 00 00 00 00 00 00 00 00 00 00 00 +>38407f c2 .byte $c2 +.384080 lines17 >384080 c2 .byte $c2 ->384081 53 63 61 6c 65 20 52 61 .text 'Scale Rate ' ->384089 74 65 20 +>384081 53 75 73 74 61 69 6e 20 .text 'Sustain ' +>384089 20 20 20 >38408c c2 .byte $c2 ->38408d 4f 66 66 .text 'Off' +>38408d 20 30 30 .text ' 00' >384090 c2 .byte $c2 >384091 00 00 00 00 00 00 00 00 .fill 9, 0 >384099 00 >38409a 9a .byte $9a ->38409b 53 63 61 6c 65 20 52 61 .text 'Scale Rate ' ->3840a3 74 65 20 +>38409b 53 75 73 74 61 69 6e 20 .text 'Sustain ' +>3840a3 20 20 20 >3840a6 c2 .byte $c2 ->3840a7 4f 66 66 .text 'Off' +>3840a7 20 30 30 .text ' 00' >3840aa c2 .byte $c2 >3840ab 00 00 00 00 00 00 00 00 .fill 8, 0 >3840b3 c2 .byte $c2 @@ -3359,1362 +3490,1125 @@ >3840bc 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 >3840c4 00 00 00 00 00 00 00 00 00 00 00 >3840cf c2 .byte $c2 ->3840d0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->3840d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3840e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3840f8 00 00 00 00 00 00 00 00 -.384100 lines12 ->384100 c2 .byte $c2 ->384101 4d 75 6c 74 69 70 6c 69 .text 'Multiplier ' ->384109 65 72 20 ->38410c c2 .byte $c2 ->38410d 20 30 30 .text ' 00' ->384110 c2 .byte $c2 ->384111 00 00 00 00 00 00 00 00 .fill 9, 0 ->384119 00 ->38411a 9a .byte $9a ->38411b 4d 75 6c 74 69 70 6c 69 .text 'Multiplier ' ->384123 65 72 20 ->384126 c2 .byte $c2 ->384127 20 30 30 .text ' 00' ->38412a c2 .byte $c2 ->38412b 00 00 00 00 00 00 00 00 .fill 8, 0 ->384133 c2 .byte $c2 ->384134 00 00 00 .fill 3, 0 ->384137 c2 .byte $c2 ->384138 00 00 00 .fill 3, 0 ->38413b c2 .byte $c2 ->38413c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->384144 00 00 00 00 00 00 00 00 00 00 00 ->38414f c2 .byte $c2 ->384150 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->384158 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384168 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384178 00 00 00 00 00 00 00 00 -.384180 lines13 ->384180 c2 .byte $c2 ->384181 53 63 61 6c 65 20 4c 65 .text 'Scale Level' ->384189 76 65 6c ->38418c c2 .byte $c2 ->38418d 20 30 30 .text ' 00' ->384190 c2 .byte $c2 ->384191 00 00 00 00 00 00 00 00 .fill 9, 0 ->384199 00 ->38419a 9a .byte $9a ->38419b 53 63 61 6c 65 20 4c 65 .text 'Scale Level' ->3841a3 76 65 6c ->3841a6 c2 .byte $c2 ->3841a7 20 30 30 .text ' 00' ->3841aa c2 .byte $c2 ->3841ab 00 00 00 00 00 00 00 00 .fill 8, 0 ->3841b3 c2 .byte $c2 ->3841b4 00 00 00 .fill 3, 0 ->3841b7 c2 .byte $c2 ->3841b8 00 00 00 .fill 3, 0 ->3841bb c2 .byte $c2 ->3841bc 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->3841c4 00 00 00 00 00 00 00 00 00 00 00 ->3841cf c2 .byte $c2 ->3841d0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->3841d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3841e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3841f8 00 00 00 00 00 00 00 00 -.384200 lines14 ->384200 c2 .byte $c2 ->384201 56 6f 6c 75 6d 65 20 20 .text 'Volume ' ->384209 20 20 20 ->38420c c2 .byte $c2 ->38420d 20 30 30 .text ' 00' +.3840d0 lines18 +>3840d0 c2 .byte $c2 +>3840d1 52 65 6c 65 61 73 65 20 .text 'Release ' +>3840d9 20 20 20 +>3840dc c2 .byte $c2 +>3840dd 20 30 30 .text ' 00' +>3840e0 c2 .byte $c2 +>3840e1 00 00 00 00 00 00 00 00 .fill 9, 0 +>3840e9 00 +>3840ea 9a .byte $9a +>3840eb 52 65 6c 65 61 73 65 20 .text 'Release ' +>3840f3 20 20 20 +>3840f6 c2 .byte $c2 +>3840f7 20 30 30 .text ' 00' +>3840fa c2 .byte $c2 +>3840fb 00 00 00 00 00 00 00 00 .fill 8, 0 +>384103 c2 .byte $c2 +>384104 00 00 00 .fill 3, 0 +>384107 c2 .byte $c2 +>384108 00 00 00 .fill 3, 0 +>38410b c2 .byte $c2 +>38410c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>384114 00 00 00 00 00 00 00 00 00 00 00 +>38411f c2 .byte $c2 +.384120 lines19 +>384120 c2 .byte $c2 +>384121 57 61 76 65 20 54 79 70 .text 'Wave Type ' +>384129 65 20 20 +>38412c c2 .byte $c2 +>38412d 20 30 30 .text ' 00' +>384130 c2 .byte $c2 +>384131 00 00 00 00 00 00 00 00 .fill 9, 0 +>384139 00 +>38413a 9a .byte $9a +>38413b 57 61 76 65 20 54 79 70 .text 'Wave Type ' +>384143 65 20 20 +>384146 c2 .byte $c2 +>384147 20 30 30 .text ' 00' +>38414a c2 .byte $c2 +>38414b 00 00 00 00 00 00 00 00 .fill 8, 0 +>384153 c2 .byte $c2 +>384154 00 00 00 .fill 3, 0 +>384157 c2 .byte $c2 +>384158 00 00 00 .fill 3, 0 +>38415b c2 .byte $c2 +>38415c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>384164 00 00 00 00 00 00 00 00 00 00 00 +>38416f c2 .byte $c2 +>384170 ab line20 .byte $ab +>384171 c3 c3 c3 c3 c3 c3 c3 c3 .fill 11, $C3 +>384179 c3 c3 c3 +>38417c db .byte $db +>38417d c3 c3 c3 .fill 3, $C3 +>384180 db .byte $db +>384181 c3 c3 c3 c3 c3 c3 c3 c3 .fill 9, $C3 +>384189 c3 +>38418a 9b .byte $9b +>38418b c3 c3 c3 c3 c3 c3 c3 c3 .fill 11, $C3 +>384193 c3 c3 c3 +>384196 db .byte $db +>384197 c3 c3 c3 .fill 3, $C3 +>38419a db .byte $db +>38419b c3 c3 c3 c3 c3 c3 c3 c3 .fill 8, $C3 +>3841a3 b3 .byte $b3 +>3841a4 00 00 00 .fill 3, 0 +>3841a7 c2 .byte $c2 +>3841a8 00 00 00 .fill 3, 0 +>3841ab c2 .byte $c2 +>3841ac 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11, 0 +>3841b4 00 00 00 00 00 00 00 00 00 00 00 +>3841bf c2 .byte $C2 +.3841c0 line21 +>3841c0 c2 .byte $c2 +>3841c1 50 61 6e 6e 69 6e 67 20 .text 'Panning ' +>3841c9 20 20 20 +>3841cc c2 .byte $c2 +>3841cd 20 30 30 .text ' 00' +>3841d0 c2 .byte $c2 +>3841d1 00 00 00 00 00 00 00 00 .fill 9, 0 +>3841d9 00 +>3841da 9a .byte $9a +>3841db 20 46 65 65 64 62 61 63 .text ' Feedback ' +>3841e3 6b 20 20 +>3841e6 c2 .byte $c2 +>3841e7 20 30 30 .text ' 00' +>3841ea c2 .byte $c2 +>3841eb 00 00 00 00 00 00 00 00 .fill 8, 0 +>3841f3 c2 .byte $c2 +>3841f4 00 00 00 .fill 3, 0 +>3841f7 c2 .byte $c2 +>3841f8 00 00 00 .fill 3, 0 +>3841fb c2 .byte $c2 +>3841fc 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>384204 00 00 00 00 00 00 00 00 00 00 00 +>38420f c2 .byte $c2 +.384210 line22 >384210 c2 .byte $c2 ->384211 00 00 00 00 00 00 00 00 .fill 9, 0 ->384219 00 ->38421a 9a .byte $9a ->38421b 56 6f 6c 75 6d 65 20 20 .text 'Volume ' ->384223 20 20 20 ->384226 c2 .byte $c2 ->384227 20 30 30 .text ' 00' ->38422a c2 .byte $c2 ->38422b 00 00 00 00 00 00 00 00 .fill 8, 0 ->384233 c2 .byte $c2 ->384234 00 00 00 .fill 3, 0 ->384237 c2 .byte $c2 ->384238 00 00 00 .fill 3, 0 ->38423b c2 .byte $c2 ->38423c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->384244 00 00 00 00 00 00 00 00 00 00 00 ->38424f c2 .byte $c2 ->384250 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->384258 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384268 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384278 00 00 00 00 00 00 00 00 -.384280 lines15 ->384280 c2 .byte $c2 ->384281 41 74 74 61 63 6b 20 20 .text 'Attack ' ->384289 20 20 20 ->38428c c2 .byte $c2 ->38428d 20 30 30 .text ' 00' ->384290 c2 .byte $c2 ->384291 00 00 00 00 00 00 00 00 .fill 9, 0 ->384299 00 ->38429a 9a .byte $9a ->38429b 41 74 74 61 63 6b 20 20 .text 'Attack ' ->3842a3 20 20 20 ->3842a6 c2 .byte $c2 ->3842a7 20 30 30 .text ' 00' ->3842aa c2 .byte $c2 ->3842ab 00 00 00 00 00 00 00 00 .fill 8, 0 ->3842b3 c2 .byte $c2 ->3842b4 00 00 00 .fill 3, 0 ->3842b7 c2 .byte $c2 ->3842b8 00 00 00 .fill 3, 0 ->3842bb c2 .byte $c2 ->3842bc 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->3842c4 00 00 00 00 00 00 00 00 00 00 00 ->3842cf c2 .byte $c2 ->3842d0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->3842d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3842e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3842f8 00 00 00 00 00 00 00 00 -.384300 lines16 ->384300 c2 .byte $c2 ->384301 44 65 63 61 79 20 20 20 .text 'Decay ' ->384309 20 20 20 ->38430c c2 .byte $c2 ->38430d 20 30 30 .text ' 00' ->384310 c2 .byte $c2 ->384311 00 00 00 00 00 00 00 00 .fill 9, 0 ->384319 00 ->38431a 9a .byte $9a ->38431b 44 65 63 61 79 20 20 20 .text 'Decay ' ->384323 20 20 20 ->384326 c2 .byte $c2 ->384327 20 30 30 .text ' 00' ->38432a c2 .byte $c2 ->38432b 00 00 00 00 00 00 00 00 .fill 8, 0 ->384333 c2 .byte $c2 ->384334 00 00 00 .fill 3, 0 ->384337 c2 .byte $c2 ->384338 00 00 00 .fill 3, 0 ->38433b c2 .byte $c2 ->38433c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->384344 00 00 00 00 00 00 00 00 00 00 00 ->38434f c2 .byte $c2 ->384350 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->384358 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384368 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384378 00 00 00 00 00 00 00 00 -.384380 lines17 ->384380 c2 .byte $c2 ->384381 53 75 73 74 61 69 6e 20 .text 'Sustain ' ->384389 20 20 20 ->38438c c2 .byte $c2 ->38438d 20 30 30 .text ' 00' ->384390 c2 .byte $c2 ->384391 00 00 00 00 00 00 00 00 .fill 9, 0 ->384399 00 ->38439a 9a .byte $9a ->38439b 53 75 73 74 61 69 6e 20 .text 'Sustain ' ->3843a3 20 20 20 ->3843a6 c2 .byte $c2 ->3843a7 20 30 30 .text ' 00' ->3843aa c2 .byte $c2 ->3843ab 00 00 00 00 00 00 00 00 .fill 8, 0 ->3843b3 c2 .byte $c2 ->3843b4 00 00 00 .fill 3, 0 ->3843b7 c2 .byte $c2 ->3843b8 00 00 00 .fill 3, 0 ->3843bb c2 .byte $c2 ->3843bc 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->3843c4 00 00 00 00 00 00 00 00 00 00 00 ->3843cf c2 .byte $c2 ->3843d0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->3843d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3843e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3843f8 00 00 00 00 00 00 00 00 -.384400 lines18 ->384400 c2 .byte $c2 ->384401 52 65 6c 65 61 73 65 20 .text 'Release ' ->384409 20 20 20 ->38440c c2 .byte $c2 ->38440d 20 30 30 .text ' 00' ->384410 c2 .byte $c2 ->384411 00 00 00 00 00 00 00 00 .fill 9, 0 ->384419 00 ->38441a 9a .byte $9a ->38441b 52 65 6c 65 61 73 65 20 .text 'Release ' ->384423 20 20 20 ->384426 c2 .byte $c2 ->384427 20 30 30 .text ' 00' ->38442a c2 .byte $c2 ->38442b 00 00 00 00 00 00 00 00 .fill 8, 0 ->384433 c2 .byte $c2 ->384434 00 00 00 .fill 3, 0 ->384437 c2 .byte $c2 ->384438 00 00 00 .fill 3, 0 ->38443b c2 .byte $c2 ->38443c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->384444 00 00 00 00 00 00 00 00 00 00 00 ->38444f c2 .byte $c2 ->384450 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->384458 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384468 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384478 00 00 00 00 00 00 00 00 -.384480 lines19 ->384480 c2 .byte $c2 ->384481 57 61 76 65 20 54 79 70 .text 'Wave Type ' ->384489 65 20 20 ->38448c c2 .byte $c2 ->38448d 20 30 30 .text ' 00' ->384490 c2 .byte $c2 ->384491 00 00 00 00 00 00 00 00 .fill 9, 0 ->384499 00 ->38449a 9a .byte $9a ->38449b 57 61 76 65 20 54 79 70 .text 'Wave Type ' ->3844a3 65 20 20 ->3844a6 c2 .byte $c2 ->3844a7 20 30 30 .text ' 00' ->3844aa c2 .byte $c2 ->3844ab 00 00 00 00 00 00 00 00 .fill 8, 0 ->3844b3 c2 .byte $c2 ->3844b4 00 00 00 .fill 3, 0 ->3844b7 c2 .byte $c2 ->3844b8 00 00 00 .fill 3, 0 ->3844bb c2 .byte $c2 ->3844bc 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->3844c4 00 00 00 00 00 00 00 00 00 00 00 ->3844cf c2 .byte $c2 ->3844d0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->3844d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3844e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3844f8 00 00 00 00 00 00 00 00 ->384500 ab line20 .byte $ab ->384501 c3 c3 c3 c3 c3 c3 c3 c3 .fill 11, $C3 ->384509 c3 c3 c3 ->38450c db .byte $db ->38450d c3 c3 c3 .fill 3, $C3 ->384510 db .byte $db ->384511 c3 c3 c3 c3 c3 c3 c3 c3 .fill 9, $C3 ->384519 c3 ->38451a 9b .byte $9b ->38451b c3 c3 c3 c3 c3 c3 c3 c3 .fill 11, $C3 ->384523 c3 c3 c3 ->384526 db .byte $db ->384527 c3 c3 c3 .fill 3, $C3 ->38452a db .byte $db ->38452b c3 c3 c3 c3 c3 c3 c3 c3 .fill 8, $C3 ->384533 b3 .byte $b3 ->384534 00 00 00 .fill 3, 0 ->384537 c2 .byte $c2 ->384538 00 00 00 .fill 3, 0 ->38453b c2 .byte $c2 ->38453c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11, 0 ->384544 00 00 00 00 00 00 00 00 00 00 00 ->38454f c2 .byte $C2 ->384550 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->384558 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384568 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384578 00 00 00 00 00 00 00 00 -.384580 line21 ->384580 c2 .byte $c2 ->384581 50 61 6e 6e 69 6e 67 20 .text 'Panning ' ->384589 20 20 20 ->38458c c2 .byte $c2 ->38458d 20 30 30 .text ' 00' ->384590 c2 .byte $c2 ->384591 00 00 00 00 00 00 00 00 .fill 9, 0 ->384599 00 ->38459a 9a .byte $9a ->38459b 20 46 65 65 64 62 61 63 .text ' Feedback ' ->3845a3 6b 20 20 ->3845a6 c2 .byte $c2 ->3845a7 20 30 30 .text ' 00' ->3845aa c2 .byte $c2 ->3845ab 00 00 00 00 00 00 00 00 .fill 8, 0 ->3845b3 c2 .byte $c2 ->3845b4 00 00 00 .fill 3, 0 ->3845b7 c2 .byte $c2 ->3845b8 00 00 00 .fill 3, 0 ->3845bb c2 .byte $c2 ->3845bc 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->3845c4 00 00 00 00 00 00 00 00 00 00 00 ->3845cf c2 .byte $c2 ->3845d0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->3845d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3845e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3845f8 00 00 00 00 00 00 00 00 -.384600 line22 ->384600 c2 .byte $c2 ->384601 52 69 66 66 20 53 70 65 .text 'Riff Speed ' ->384609 65 64 20 ->38460c c2 .byte $c2 ->38460d 20 30 30 .text ' 00' ->384610 c2 .byte $c2 ->384611 00 00 00 00 00 00 00 00 .fill 9, 0 ->384619 00 ->38461a 9a .byte $9a ->38461b 20 41 6c 67 6f 72 69 74 .text ' Algorithm ' ->384623 68 6d 20 ->384626 c2 .byte $c2 ->384627 20 30 30 .text ' 00' ->38462a c2 .byte $c2 ->38462b 00 00 00 00 00 00 00 00 .fill 8, 0 ->384633 c2 .byte $c2 ->384634 00 00 00 .fill 3, 0 ->384637 c2 .byte $c2 ->384638 00 00 00 .fill 3, 0 ->38463b c2 .byte $c2 ->38463c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 ->384644 00 00 00 00 00 00 00 00 00 00 00 ->38464f c2 .byte $c2 ->384650 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->384658 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384668 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384678 00 00 00 00 00 00 00 00 ->384680 ab line23 .byte $ab ->384681 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8, $C3 ; line ->384689 b2 .byte $b2 ->38468a c3 c3 .fill 2, $C3 ; pattern ->38468c b1 .byte $b1 ->38468d c3 c3 c3 .fill 3, $C3 ->384690 b1 .byte $b1 ->384691 c3 c3 c3 c3 .fill 4, $C3 ->384695 b2 .byte $b2 ->384696 c3 c3 c3 c3 .fill 4, $C3 ; octave ->38469a 9c .byte $9c ->38469b c3 c3 c3 c3 c3 .fill 5, $C3 ->3846a0 b2 .byte $b2 ->3846a1 c3 c3 c3 c3 c3 .fill 5, $C3 ; speed ->3846a6 b1 .byte $b1 ->3846a7 c3 c3 c3 .fill 3, $C3 ->3846aa db .byte $db ->3846ab c3 c3 c3 c3 c3 c3 c3 c3 .fill 8, $C3 ->3846b3 b1 .byte $b1 ->3846b4 c3 c3 c3 .fill 3, $C3 ->3846b7 b1 .byte $b1 ->3846b8 c3 c3 c3 .fill 3, $C3 ->3846bb b1 .byte $b1 ->3846bc c3 c3 c3 c3 c3 c3 c3 c3 .fill SCREEN_WIDTH - 50 -11, $C3 ->3846c4 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 ->3846cf b3 .byte $b3 ->3846d0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->3846d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3846e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3846f8 00 00 00 00 00 00 00 00 -.384700 line24 ->384700 c2 .byte $c2 ->384701 4c 69 6e 65 3a 20 4e 41 .text 'Line: NA' ; 8 chars ->384709 c2 .byte $c2 ->38470a 50 61 74 74 65 72 6e 3a .text 'Pattern: NA';11 chars ->384712 20 4e 41 ->384715 c2 .byte $c2 ->384716 4f 63 74 61 76 65 3a 20 .text 'Octave: N' ;10 chars ->38471e 20 4e ->384720 c2 .byte $c2 ->384721 53 70 65 65 64 3a 20 20 .text 'Speed: N' ; 9 chars ->384729 4e ->38472a c2 .byte $c2 ->38472b 00 00 .fill 2, 0 ->38472d 46 69 6c 65 3a 20 20 20 .text 'File: ' ; 17 chars ->384735 20 20 20 20 20 20 20 20 20 ->38473e 00 00 00 00 00 00 00 00 .fill 17, 0 ->384746 00 00 00 00 00 00 00 00 00 ->38474f c2 .byte $c2 ->384750 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->384758 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384768 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384778 00 00 00 00 00 00 00 00 ->384780 ca line25 .byte $ca ->384781 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8, $C3 ; line ->384789 b1 .byte $b1 ->38478a c3 c3 c3 c3 c3 c3 c3 c3 .fill 11, $C3 ; pattern ->384792 c3 c3 c3 ->384795 b1 .byte $b1 ->384796 c3 c3 c3 c3 c3 c3 c3 c3 .fill 10, $C3 ; octave ->38479e c3 c3 ->3847a0 b1 .byte $b1 ->3847a1 c3 c3 c3 c3 c3 c3 c3 c3 .fill 9, $C3 ; speed ->3847a9 c3 ->3847aa b1 .byte $b1 ->3847ab c3 c3 c3 c3 c3 c3 c3 c3 .fill 8, $C3 ->3847b3 c3 .byte $c3 ->3847b4 c3 c3 c3 c3 c3 c3 c3 c3 .fill 27, $C3 ->3847bc c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 ->3847cc c3 c3 c3 ->3847cf cb .byte $cb ->3847d0 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->3847d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3847e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3847f8 00 00 00 00 00 00 00 00 -.384800 top_line ->384800 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384808 b2 .byte $b2 ->384809 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384811 b2 .byte $b2 ->384812 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->38481a b2 .byte $b2 ->38481b c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384823 b2 .byte $b2 ->384824 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->38482c b2 .byte $b2 ->38482d c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384835 b2 .byte $b2 ->384836 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->38483e b2 .byte $b2 ->38483f c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384847 b2 .byte $b2 ->384848 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384850 00 00 00 00 00 00 00 00 .fill UNUSED_SCR, 0 ->384858 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384868 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384878 00 00 00 00 00 00 00 00 -.384880 line27 ->384880 20 2d 20 31 20 20 2d 20 .text ' - ',col,' - ' ->384888 c2 .byte $c2 ->384889 20 2d 20 32 20 20 2d 20 .text ' - ',col,' - ' ->384891 c2 .byte $c2 ->384892 20 2d 20 33 20 20 2d 20 .text ' - ',col,' - ' ->38489a c2 .byte $c2 ->38489b 20 2d 20 34 20 20 2d 20 .text ' - ',col,' - ' ->3848a3 c2 .byte $c2 ->3848a4 20 2d 20 35 20 20 2d 20 .text ' - ',col,' - ' ->3848ac c2 .byte $c2 ->3848ad 20 2d 20 36 20 20 2d 20 .text ' - ',col,' - ' ->3848b5 c2 .byte $c2 ->3848b6 20 2d 20 37 20 20 2d 20 .text ' - ',col,' - ' ->3848be c2 .byte $c2 ->3848bf 20 2d 20 38 20 20 2d 20 .text ' - ',col,' - ' ->3848c7 c2 .byte $c2 ->3848c8 20 2d 20 39 20 20 2d 20 .text ' - ',col,' - ' ->3848d0 c2 .byte $c2 ->3848d1 00 00 00 00 00 00 00 00 .fill UNUSED_SCR-1, 0 ->3848d9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3848e9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3848f9 00 00 00 00 00 00 00 -.384900 btm_line ->384900 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384908 b1 .byte $b1 ->384909 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384911 b1 .byte $b1 ->384912 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->38491a b1 .byte $b1 ->38491b c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384923 b1 .byte $b1 ->384924 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->38492c b1 .byte $b1 ->38492d c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384935 b1 .byte $b1 ->384936 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->38493e b1 .byte $b1 ->38493f c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384947 b1 .byte $b1 ->384948 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384950 b1 .byte $b1 ->384951 00 00 00 00 00 00 00 00 .fill UNUSED_SCR-1, 0 ->384959 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384969 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384979 00 00 00 00 00 00 00 -.384980 blank_line ->384980 20 20 20 20 20 20 20 20 .fill 80, $20 ->384988 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 +>384211 52 69 66 66 20 53 70 65 .text 'Riff Speed ' +>384219 65 64 20 +>38421c c2 .byte $c2 +>38421d 20 30 30 .text ' 00' +>384220 c2 .byte $c2 +>384221 00 00 00 00 00 00 00 00 .fill 9, 0 +>384229 00 +>38422a 9a .byte $9a +>38422b 20 41 6c 67 6f 72 69 74 .text ' Algorithm ' +>384233 68 6d 20 +>384236 c2 .byte $c2 +>384237 20 30 30 .text ' 00' +>38423a c2 .byte $c2 +>38423b 00 00 00 00 00 00 00 00 .fill 8, 0 +>384243 c2 .byte $c2 +>384244 00 00 00 .fill 3, 0 +>384247 c2 .byte $c2 +>384248 00 00 00 .fill 3, 0 +>38424b c2 .byte $c2 +>38424c 00 00 00 00 00 00 00 00 .fill SCREEN_WIDTH - 50 -11,0 +>384254 00 00 00 00 00 00 00 00 00 00 00 +>38425f c2 .byte $c2 +>384260 ab line23 .byte $ab +>384261 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8, $C3 ; line +>384269 b2 .byte $b2 +>38426a c3 c3 .fill 2, $C3 ; pattern +>38426c b1 .byte $b1 +>38426d c3 c3 c3 .fill 3, $C3 +>384270 b1 .byte $b1 +>384271 c3 c3 c3 c3 .fill 4, $C3 +>384275 b2 .byte $b2 +>384276 c3 c3 c3 c3 .fill 4, $C3 ; octave +>38427a 9c .byte $9c +>38427b c3 c3 c3 c3 c3 .fill 5, $C3 +>384280 b2 .byte $b2 +>384281 c3 c3 c3 c3 c3 .fill 5, $C3 ; speed +>384286 b1 .byte $b1 +>384287 c3 c3 c3 .fill 3, $C3 +>38428a db .byte $db +>38428b c3 c3 c3 c3 c3 c3 c3 c3 .fill 8, $C3 +>384293 b1 .byte $b1 +>384294 c3 c3 c3 .fill 3, $C3 +>384297 b1 .byte $b1 +>384298 c3 c3 c3 .fill 3, $C3 +>38429b b1 .byte $b1 +>38429c c3 c3 c3 c3 c3 c3 c3 c3 .fill SCREEN_WIDTH - 50 -11, $C3 +>3842a4 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 +>3842af b3 .byte $b3 +.3842b0 line24 +>3842b0 c2 .byte $c2 +>3842b1 4c 69 6e 65 3a 20 4e 41 .text 'Line: NA' ; 8 chars +>3842b9 c2 .byte $c2 +>3842ba 50 61 74 74 65 72 6e 3a .text 'Pattern: NA';11 chars +>3842c2 20 4e 41 +>3842c5 c2 .byte $c2 +>3842c6 4f 63 74 61 76 65 3a 20 .text 'Octave: N' ;10 chars +>3842ce 20 4e +>3842d0 c2 .byte $c2 +>3842d1 53 70 65 65 64 3a 20 20 .text 'Speed: N' ; 9 chars +>3842d9 4e +>3842da c2 .byte $c2 +>3842db 00 00 .fill 2, 0 +>3842dd 46 69 6c 65 3a 20 20 20 .text 'File: ' ; 17 chars +>3842e5 20 20 20 20 20 20 20 20 20 +>3842ee 00 00 00 00 00 00 00 00 .fill 17, 0 +>3842f6 00 00 00 00 00 00 00 00 00 +>3842ff c2 .byte $c2 +>384300 ca line25 .byte $ca +>384301 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8, $C3 ; line +>384309 b1 .byte $b1 +>38430a c3 c3 c3 c3 c3 c3 c3 c3 .fill 11, $C3 ; pattern +>384312 c3 c3 c3 +>384315 b1 .byte $b1 +>384316 c3 c3 c3 c3 c3 c3 c3 c3 .fill 10, $C3 ; octave +>38431e c3 c3 +>384320 b1 .byte $b1 +>384321 c3 c3 c3 c3 c3 c3 c3 c3 .fill 9, $C3 ; speed +>384329 c3 +>38432a b1 .byte $b1 +>38432b c3 c3 c3 c3 c3 c3 c3 c3 .fill 8, $C3 +>384333 c3 .byte $c3 +>384334 c3 c3 c3 c3 c3 c3 c3 c3 .fill 27, $C3 +>38433c c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 +>38434c c3 c3 c3 +>38434f cb .byte $cb +.384350 top_line +>384350 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384358 b2 .byte $b2 +>384359 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384361 b2 .byte $b2 +>384362 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>38436a b2 .byte $b2 +>38436b c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384373 b2 .byte $b2 +>384374 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>38437c b2 .byte $b2 +>38437d c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384385 b2 .byte $b2 +>384386 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>38438e b2 .byte $b2 +>38438f c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384397 b2 .byte $b2 +>384398 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +.3843a0 line27 +>3843a0 20 2d 20 31 20 20 2d 20 .text ' - ',col,' - ' +>3843a8 c2 .byte $c2 +>3843a9 20 2d 20 32 20 20 2d 20 .text ' - ',col,' - ' +>3843b1 c2 .byte $c2 +>3843b2 20 2d 20 33 20 20 2d 20 .text ' - ',col,' - ' +>3843ba c2 .byte $c2 +>3843bb 20 2d 20 34 20 20 2d 20 .text ' - ',col,' - ' +>3843c3 c2 .byte $c2 +>3843c4 20 2d 20 35 20 20 2d 20 .text ' - ',col,' - ' +>3843cc c2 .byte $c2 +>3843cd 20 2d 20 36 20 20 2d 20 .text ' - ',col,' - ' +>3843d5 c2 .byte $c2 +>3843d6 20 2d 20 37 20 20 2d 20 .text ' - ',col,' - ' +>3843de c2 .byte $c2 +>3843df 20 2d 20 38 20 20 2d 20 .text ' - ',col,' - ' +>3843e7 c2 .byte $c2 +>3843e8 20 2d 20 39 20 20 2d 20 .text ' - 9 - ' +.3843f0 btm_line +>3843f0 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>3843f8 b1 .byte $b1 +>3843f9 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384401 b1 .byte $b1 +>384402 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>38440a b1 .byte $b1 +>38440b c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384413 b1 .byte $b1 +>384414 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>38441c b1 .byte $b1 +>38441d c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384425 b1 .byte $b1 +>384426 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>38442e b1 .byte $b1 +>38442f c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384437 b1 .byte $b1 +>384438 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +.384440 blank_line +>384440 20 20 20 20 20 20 20 20 .fill 80, $20 +>384448 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ; ...repeated 3 times (48 bytes)... ->3849c8 20 20 20 20 20 20 20 20 ->3849d0 00 00 00 00 00 00 00 00 .fill 48, 0 ->3849d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3849e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->3849f8 00 00 00 00 00 00 00 00 -.384a00 tick_line ->384a00 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a08 db .byte $db ->384a09 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a11 db .byte $db ->384a12 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a1a db .byte $db ->384a1b 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a23 db .byte $db ->384a24 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a2c db .byte $db ->384a2d 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a35 db .byte $db ->384a36 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a3e db .byte $db ->384a3f 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a47 db .byte $db ->384a48 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a50 db .byte $db ->384a51 00 00 00 00 00 00 00 00 .fill UNUSED_SCR-1, 0 ->384a59 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384a69 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384a79 00 00 00 00 00 00 00 -.384a80 untick_line ->384a80 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a88 c2 .byte $c2 ->384a89 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a91 c2 .byte $c2 ->384a92 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384a9a c2 .byte $c2 ->384a9b 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384aa3 c2 .byte $c2 ->384aa4 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384aac c2 .byte $c2 ->384aad 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384ab5 c2 .byte $c2 ->384ab6 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384abe c2 .byte $c2 ->384abf 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384ac7 c2 .byte $c2 ->384ac8 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' ->384ad0 c2 .byte $c2 ->384ad1 00 00 00 00 00 00 00 00 .fill UNUSED_SCR-1, 0 ->384ad9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384ae9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384af9 00 00 00 00 00 00 00 -.384b00 line60 ->384b00 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384b08 b1 .byte $b1 ->384b09 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384b11 b1 .byte $b1 ->384b12 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384b1a b1 .byte $b1 ->384b1b c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384b23 b1 .byte $b1 ->384b24 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384b2c b1 .byte $b1 ->384b2d c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384b35 b1 .byte $b1 ->384b36 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384b3e b1 .byte $b1 ->384b3f c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384b47 b1 .byte $b1 ->384b48 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 ->384b50 b1 .byte $b1 ->384b51 00 00 00 00 00 00 00 00 .fill UNUSED_SCR-1, 0 ->384b59 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384b69 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384b79 00 00 00 00 00 00 00 -.384b80 FNXFONT ->384b80 00 00 00 00 00 00 00 00 .binary "Font/FOENIX-CHARACTER-ASCII-2.bin", 0, 2048 ->384b88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>384488 20 20 20 20 20 20 20 20 +.384490 tick_line +>384490 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>384498 db .byte $db +>384499 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>3844a1 db .byte $db +>3844a2 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>3844aa db .byte $db +>3844ab 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>3844b3 db .byte $db +>3844b4 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>3844bc db .byte $db +>3844bd 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>3844c5 db .byte $db +>3844c6 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>3844ce db .byte $db +>3844cf 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>3844d7 db .byte $db +>3844d8 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +.3844e0 untick_line +>3844e0 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>3844e8 c2 .byte $c2 +>3844e9 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>3844f1 c2 .byte $c2 +>3844f2 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>3844fa c2 .byte $c2 +>3844fb 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>384503 c2 .byte $c2 +>384504 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>38450c c2 .byte $c2 +>38450d 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>384515 c2 .byte $c2 +>384516 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>38451e c2 .byte $c2 +>38451f 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +>384527 c2 .byte $c2 +>384528 2d 2d 2d 20 2d 2d 2d 2d .text '--- ----' +.384530 line60 +>384530 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384538 b1 .byte $b1 +>384539 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384541 b1 .byte $b1 +>384542 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>38454a b1 .byte $b1 +>38454b c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384553 b1 .byte $b1 +>384554 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>38455c b1 .byte $b1 +>38455d c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384565 b1 .byte $b1 +>384566 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>38456e b1 .byte $b1 +>38456f c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +>384577 b1 .byte $b1 +>384578 c3 c3 c3 c3 c3 c3 c3 c3 .fill 8,$c3 +.384580 FNXFONT +>384580 00 00 00 00 00 00 00 00 .binary "Font/FOENIX-CHARACTER-ASCII-2.bin", 0, 2048 +>384588 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ...repeated 3 times (48 bytes)... ->384bc8 00 00 14 0c 14 00 00 00 00 00 00 00 00 00 00 00 ->384bd8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->384be8 00 00 04 14 3c 10 00 00 00 00 00 00 00 00 00 00 ->384bf8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>3845c8 00 00 14 0c 14 00 00 00 00 00 00 00 00 00 00 00 +>3845d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>3845e8 00 00 04 14 3c 10 00 00 00 00 00 00 00 00 00 00 +>3845f8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ...repeated 8 times (128 bytes)... ->384c88 18 18 18 18 00 00 18 00 66 66 66 00 00 00 00 00 ->384c98 66 66 ff 66 ff 66 66 00 18 3e 60 3c 06 7c 18 00 ->384ca8 62 66 0c 18 30 66 46 00 3c 66 3c 38 67 66 3f 00 ->384cb8 06 0c 18 00 00 00 00 00 0c 18 30 30 30 18 0c 00 ->384cc8 30 18 0c 0c 0c 18 30 00 00 66 3c ff 3c 66 00 00 ->384cd8 00 18 18 7e 18 18 00 00 00 00 00 00 00 18 18 30 ->384ce8 00 00 00 7e 00 00 00 00 00 00 00 00 00 18 18 00 ->384cf8 00 03 06 0c 18 30 60 00 3c 66 6e 76 66 66 3c 00 ->384d08 18 18 38 18 18 18 7e 00 3c 66 06 0c 30 60 7e 00 ->384d18 3c 66 06 1c 06 66 3c 00 06 0e 1e 66 7f 06 06 00 ->384d28 7e 60 7c 06 06 66 3c 00 3c 66 60 7c 66 66 3c 00 ->384d38 7e 66 0c 18 18 18 18 00 3c 66 66 3c 66 66 3c 00 ->384d48 3c 66 66 3e 06 66 3c 00 00 00 18 00 00 18 00 00 ->384d58 00 00 18 00 00 18 18 30 0e 18 30 60 30 18 0e 00 ->384d68 00 00 7e 00 7e 00 00 00 70 18 0c 06 0c 18 70 00 ->384d78 3c 66 06 0c 18 00 18 00 3c 66 6e 6e 60 62 3c 00 ->384d88 18 3c 66 7e 66 66 66 00 7c 66 66 7c 66 66 7c 00 ->384d98 3c 66 60 60 60 66 3c 00 78 6c 66 66 66 6c 78 00 ->384da8 7e 60 60 78 60 60 7e 00 7e 60 60 78 60 60 60 00 ->384db8 3c 66 60 6e 66 66 3c 00 66 66 66 7e 66 66 66 00 ->384dc8 3c 18 18 18 18 18 3c 00 1e 0c 0c 0c 0c 6c 38 00 ->384dd8 66 6c 78 70 78 6c 66 00 60 60 60 60 60 60 7e 00 ->384de8 63 77 7f 6b 63 63 63 00 66 76 7e 7e 6e 66 66 00 ->384df8 3c 66 66 66 66 66 3c 00 7c 66 66 7c 60 60 60 00 ->384e08 3c 66 66 66 66 3c 0e 00 7c 66 66 7c 78 6c 66 00 ->384e18 3c 66 60 3c 06 66 3c 00 7e 18 18 18 18 18 18 00 ->384e28 66 66 66 66 66 66 3c 00 66 66 66 66 66 3c 18 00 ->384e38 63 63 63 6b 7f 77 63 00 66 66 3c 18 3c 66 66 00 ->384e48 66 66 66 3c 18 18 18 00 7e 06 0c 18 30 60 7e 00 ->384e58 3c 30 30 30 30 30 3c 00 00 c0 60 30 18 0c 06 00 ->384e68 3c 0c 0c 0c 0c 0c 3c 00 00 18 3c 66 00 00 00 00 ->384e78 00 00 00 00 00 00 00 7e 60 30 18 00 00 00 00 00 ->384e88 00 00 3c 06 3e 66 3e 00 00 60 60 7c 66 66 7c 00 ->384e98 00 00 3c 60 60 60 3c 00 00 06 06 3e 66 66 3e 00 ->384ea8 00 00 3c 66 7e 60 3c 00 00 0e 18 3e 18 18 18 00 ->384eb8 00 00 3e 66 66 3e 06 7c 00 60 60 7c 66 66 66 00 ->384ec8 00 18 00 38 18 18 3c 00 00 06 00 06 06 06 06 3c ->384ed8 00 60 60 6c 78 6c 66 00 00 38 18 18 18 18 3c 00 ->384ee8 00 00 66 7f 7f 6b 63 00 00 00 7c 66 66 66 66 00 ->384ef8 00 00 3c 66 66 66 3c 00 00 00 7c 66 66 7c 60 60 ->384f08 00 00 3e 66 66 3e 06 06 00 00 7c 66 60 60 60 00 ->384f18 00 00 3e 60 3c 06 7c 00 00 18 7e 18 18 18 0e 00 ->384f28 00 00 66 66 66 66 3e 00 00 00 66 66 66 3c 18 00 ->384f38 00 00 63 6b 7f 3e 36 00 00 00 66 3c 18 3c 66 00 ->384f48 00 00 66 66 66 3e 0c 78 00 00 7e 0c 18 30 7e 00 ->384f58 1c 18 18 30 18 18 1c 00 18 18 18 00 18 18 18 00 ->384f68 38 18 18 0c 18 18 38 00 00 00 32 7e 4c 00 00 00 ->384f78 00 00 00 00 00 00 00 00 00 00 3c 3c 3c 3c 00 00 ->384f88 00 00 3c 24 24 3c 00 00 00 00 18 3c 3c 18 00 00 ->384f98 00 00 18 24 24 18 00 00 18 24 24 18 00 00 00 00 ->384fa8 00 3c 42 42 66 24 66 00 00 18 00 18 0c 06 66 3c ->384fb8 0c 12 30 7c 30 62 fc 00 1c 20 70 20 70 20 1c 00 ->384fc8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>384688 18 18 18 18 00 00 18 00 66 66 66 00 00 00 00 00 +>384698 66 66 ff 66 ff 66 66 00 18 3e 60 3c 06 7c 18 00 +>3846a8 62 66 0c 18 30 66 46 00 3c 66 3c 38 67 66 3f 00 +>3846b8 06 0c 18 00 00 00 00 00 0c 18 30 30 30 18 0c 00 +>3846c8 30 18 0c 0c 0c 18 30 00 00 66 3c ff 3c 66 00 00 +>3846d8 00 18 18 7e 18 18 00 00 00 00 00 00 00 18 18 30 +>3846e8 00 00 00 7e 00 00 00 00 00 00 00 00 00 18 18 00 +>3846f8 00 03 06 0c 18 30 60 00 3c 66 6e 76 66 66 3c 00 +>384708 18 18 38 18 18 18 7e 00 3c 66 06 0c 30 60 7e 00 +>384718 3c 66 06 1c 06 66 3c 00 06 0e 1e 66 7f 06 06 00 +>384728 7e 60 7c 06 06 66 3c 00 3c 66 60 7c 66 66 3c 00 +>384738 7e 66 0c 18 18 18 18 00 3c 66 66 3c 66 66 3c 00 +>384748 3c 66 66 3e 06 66 3c 00 00 00 18 00 00 18 00 00 +>384758 00 00 18 00 00 18 18 30 0e 18 30 60 30 18 0e 00 +>384768 00 00 7e 00 7e 00 00 00 70 18 0c 06 0c 18 70 00 +>384778 3c 66 06 0c 18 00 18 00 3c 66 6e 6e 60 62 3c 00 +>384788 18 3c 66 7e 66 66 66 00 7c 66 66 7c 66 66 7c 00 +>384798 3c 66 60 60 60 66 3c 00 78 6c 66 66 66 6c 78 00 +>3847a8 7e 60 60 78 60 60 7e 00 7e 60 60 78 60 60 60 00 +>3847b8 3c 66 60 6e 66 66 3c 00 66 66 66 7e 66 66 66 00 +>3847c8 3c 18 18 18 18 18 3c 00 1e 0c 0c 0c 0c 6c 38 00 +>3847d8 66 6c 78 70 78 6c 66 00 60 60 60 60 60 60 7e 00 +>3847e8 63 77 7f 6b 63 63 63 00 66 76 7e 7e 6e 66 66 00 +>3847f8 3c 66 66 66 66 66 3c 00 7c 66 66 7c 60 60 60 00 +>384808 3c 66 66 66 66 3c 0e 00 7c 66 66 7c 78 6c 66 00 +>384818 3c 66 60 3c 06 66 3c 00 7e 18 18 18 18 18 18 00 +>384828 66 66 66 66 66 66 3c 00 66 66 66 66 66 3c 18 00 +>384838 63 63 63 6b 7f 77 63 00 66 66 3c 18 3c 66 66 00 +>384848 66 66 66 3c 18 18 18 00 7e 06 0c 18 30 60 7e 00 +>384858 3c 30 30 30 30 30 3c 00 00 c0 60 30 18 0c 06 00 +>384868 3c 0c 0c 0c 0c 0c 3c 00 00 18 3c 66 00 00 00 00 +>384878 00 00 00 00 00 00 00 7e 60 30 18 00 00 00 00 00 +>384888 00 00 3c 06 3e 66 3e 00 00 60 60 7c 66 66 7c 00 +>384898 00 00 3c 60 60 60 3c 00 00 06 06 3e 66 66 3e 00 +>3848a8 00 00 3c 66 7e 60 3c 00 00 0e 18 3e 18 18 18 00 +>3848b8 00 00 3e 66 66 3e 06 7c 00 60 60 7c 66 66 66 00 +>3848c8 00 18 00 38 18 18 3c 00 00 06 00 06 06 06 06 3c +>3848d8 00 60 60 6c 78 6c 66 00 00 38 18 18 18 18 3c 00 +>3848e8 00 00 66 7f 7f 6b 63 00 00 00 7c 66 66 66 66 00 +>3848f8 00 00 3c 66 66 66 3c 00 00 00 7c 66 66 7c 60 60 +>384908 00 00 3e 66 66 3e 06 06 00 00 7c 66 60 60 60 00 +>384918 00 00 3e 60 3c 06 7c 00 00 18 7e 18 18 18 0e 00 +>384928 00 00 66 66 66 66 3e 00 00 00 66 66 66 3c 18 00 +>384938 00 00 63 6b 7f 3e 36 00 00 00 66 3c 18 3c 66 00 +>384948 00 00 66 66 66 3e 0c 78 00 00 7e 0c 18 30 7e 00 +>384958 1c 18 18 30 18 18 1c 00 18 18 18 00 18 18 18 00 +>384968 38 18 18 0c 18 18 38 00 00 00 32 7e 4c 00 00 00 +>384978 00 00 00 00 00 00 00 00 00 00 3c 3c 3c 3c 00 00 +>384988 00 00 3c 24 24 3c 00 00 00 00 18 3c 3c 18 00 00 +>384998 00 00 18 24 24 18 00 00 18 24 24 18 00 00 00 00 +>3849a8 00 3c 42 42 66 24 66 00 00 18 00 18 0c 06 66 3c +>3849b8 0c 12 30 7c 30 62 fc 00 1c 20 70 20 70 20 1c 00 +>3849c8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ...repeated 2 times (32 bytes)... ->384ff8 00 00 00 00 00 00 00 00 70 c0 c6 cf c6 cf c6 70 ->385008 e0 d0 ca cb ca cb d2 e0 f0 c0 c6 ef c6 cf c6 c0 ->385018 70 d8 c2 c3 da cb ca 70 20 70 da 8b fa 8b 8a 88 ->385028 f0 88 8a f3 8a 8b 8a f0 00 00 00 00 00 00 00 00 ->385038 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->385048 00 00 00 e7 e7 66 66 66 66 66 66 66 66 66 66 66 ->385058 66 66 66 e7 e7 66 66 66 66 66 66 e7 e7 00 00 00 ->385068 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->385078 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ->385088 f0 f0 f0 f0 f0 f0 f0 f0 00 00 00 00 ff ff ff ff ->385098 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ->3850a8 80 80 80 80 80 80 80 80 cc cc 33 33 cc cc 33 33 ->3850b8 01 01 01 01 01 01 01 01 00 00 00 00 cc cc 33 33 ->3850c8 ff fe fc f8 f0 e0 c0 80 03 03 03 03 03 03 03 03 ->3850d8 18 18 18 1f 1f 18 18 18 00 00 00 00 0f 0f 0f 0f ->3850e8 18 18 18 1f 1f 00 00 00 00 00 00 f8 f8 18 18 18 ->3850f8 00 00 00 00 00 00 ff ff 00 00 00 1f 1f 18 18 18 ->385108 18 18 18 ff ff 00 00 00 00 00 00 ff ff 18 18 18 ->385118 18 18 18 f8 f8 18 18 18 c0 c0 c0 c0 c0 c0 c0 c0 ->385128 e0 e0 e0 e0 e0 e0 e0 e0 07 07 07 07 07 07 07 07 ->385138 ff ff 00 00 00 00 00 00 ff ff ff 00 00 00 00 00 ->385148 00 00 00 00 00 ff ff ff 03 03 03 03 03 03 ff ff ->385158 00 00 00 00 f0 f0 f0 f0 0f 0f 0f 0f 00 00 00 00 ->385168 18 18 18 f8 f8 00 00 00 f0 f0 f0 f0 00 00 00 00 ->385178 f0 f0 f0 f0 0f 0f 0f 0f 00 00 00 ff ff 00 00 00 ->385188 08 1c 3e 7f 7f 1c 3e 00 18 18 18 18 18 18 18 18 ->385198 00 00 00 ff ff 00 00 00 00 00 ff ff 00 00 00 00 ->3851a8 00 ff ff 00 00 00 00 00 00 00 00 00 ff ff 00 00 ->3851b8 30 30 30 30 30 30 30 30 0c 0c 0c 0c 0c 0c 0c 0c ->3851c8 00 00 00 e0 f0 38 18 18 18 18 1c 0f 07 00 00 00 ->3851d8 18 18 38 f0 e0 00 00 00 c0 c0 c0 c0 c0 c0 ff ff ->3851e8 c0 e0 70 38 1c 0e 07 03 03 07 0e 1c 38 70 e0 c0 ->3851f8 ff ff c0 c0 c0 c0 c0 c0 ff ff 03 03 03 03 03 03 ->385208 00 3c 7e 7e 7e 7e 3c 00 00 00 00 00 00 ff ff 00 ->385218 36 7f 7f 7f 3e 1c 08 00 60 60 60 60 60 60 60 60 ->385228 00 00 00 07 0f 1c 18 18 c3 e7 7e 3c 3c 7e e7 c3 ->385238 00 3c 7e 66 66 7e 3c 00 18 18 66 66 18 18 3c 00 ->385248 06 06 06 06 06 06 06 06 08 1c 3e 7f 3e 1c 08 00 ->385258 18 18 18 ff ff 18 18 18 c0 c0 30 30 c0 c0 30 30 ->385268 18 18 18 18 18 18 18 18 00 00 03 3e 76 36 36 00 ->385278 ff 7f 3f 1f 0f 07 03 01 00 72 48 44 52 42 7e 00 ->385288 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>3849f8 00 00 00 00 00 00 00 00 70 c0 c6 cf c6 cf c6 70 +>384a08 e0 d0 ca cb ca cb d2 e0 f0 c0 c6 ef c6 cf c6 c0 +>384a18 70 d8 c2 c3 da cb ca 70 20 70 da 8b fa 8b 8a 88 +>384a28 f0 88 8a f3 8a 8b 8a f0 00 00 00 00 00 00 00 00 +>384a38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>384a48 00 00 00 e7 e7 66 66 66 66 66 66 66 66 66 66 66 +>384a58 66 66 66 e7 e7 66 66 66 66 66 66 e7 e7 00 00 00 +>384a68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>384a78 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff +>384a88 f0 f0 f0 f0 f0 f0 f0 f0 00 00 00 00 ff ff ff ff +>384a98 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff +>384aa8 80 80 80 80 80 80 80 80 cc cc 33 33 cc cc 33 33 +>384ab8 01 01 01 01 01 01 01 01 00 00 00 00 cc cc 33 33 +>384ac8 ff fe fc f8 f0 e0 c0 80 03 03 03 03 03 03 03 03 +>384ad8 18 18 18 1f 1f 18 18 18 00 00 00 00 0f 0f 0f 0f +>384ae8 18 18 18 1f 1f 00 00 00 00 00 00 f8 f8 18 18 18 +>384af8 00 00 00 00 00 00 ff ff 00 00 00 1f 1f 18 18 18 +>384b08 18 18 18 ff ff 00 00 00 00 00 00 ff ff 18 18 18 +>384b18 18 18 18 f8 f8 18 18 18 c0 c0 c0 c0 c0 c0 c0 c0 +>384b28 e0 e0 e0 e0 e0 e0 e0 e0 07 07 07 07 07 07 07 07 +>384b38 ff ff 00 00 00 00 00 00 ff ff ff 00 00 00 00 00 +>384b48 00 00 00 00 00 ff ff ff 03 03 03 03 03 03 ff ff +>384b58 00 00 00 00 f0 f0 f0 f0 0f 0f 0f 0f 00 00 00 00 +>384b68 18 18 18 f8 f8 00 00 00 f0 f0 f0 f0 00 00 00 00 +>384b78 f0 f0 f0 f0 0f 0f 0f 0f 00 00 00 ff ff 00 00 00 +>384b88 08 1c 3e 7f 7f 1c 3e 00 18 18 18 18 18 18 18 18 +>384b98 00 00 00 ff ff 00 00 00 00 00 ff ff 00 00 00 00 +>384ba8 00 ff ff 00 00 00 00 00 00 00 00 00 ff ff 00 00 +>384bb8 30 30 30 30 30 30 30 30 0c 0c 0c 0c 0c 0c 0c 0c +>384bc8 00 00 00 e0 f0 38 18 18 18 18 1c 0f 07 00 00 00 +>384bd8 18 18 38 f0 e0 00 00 00 c0 c0 c0 c0 c0 c0 ff ff +>384be8 c0 e0 70 38 1c 0e 07 03 03 07 0e 1c 38 70 e0 c0 +>384bf8 ff ff c0 c0 c0 c0 c0 c0 ff ff 03 03 03 03 03 03 +>384c08 00 3c 7e 7e 7e 7e 3c 00 00 00 00 00 00 ff ff 00 +>384c18 36 7f 7f 7f 3e 1c 08 00 60 60 60 60 60 60 60 60 +>384c28 00 00 00 07 0f 1c 18 18 c3 e7 7e 3c 3c 7e e7 c3 +>384c38 00 3c 7e 66 66 7e 3c 00 18 18 66 66 18 18 3c 00 +>384c48 06 06 06 06 06 06 06 06 08 1c 3e 7f 3e 1c 08 00 +>384c58 18 18 18 ff ff 18 18 18 c0 c0 30 30 c0 c0 30 30 +>384c68 18 18 18 18 18 18 18 18 00 00 03 3e 76 36 36 00 +>384c78 ff 7f 3f 1f 0f 07 03 01 00 72 48 44 52 42 7e 00 +>384c88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ...repeated 3 times (48 bytes)... ->3852c8 cc 99 33 66 cc 99 33 66 33 99 cc 66 33 99 cc 66 ->3852d8 02 06 0c d8 f0 e0 c0 00 01 03 07 0f 1f 3f 7f ff ->3852e8 80 c0 e0 f0 f8 fc fe ff ff ff ff ff 00 00 00 00 ->3852f8 0f 0f 0f 0f 0f 0f 0f 0f f0 f0 f0 f0 ff ff ff ff ->385308 0f 0f 0f 0f ff ff ff ff ff ff ff ff f0 f0 f0 f0 ->385318 ff ff ff ff 0f 0f 0f 0f 0c 0c 03 03 00 00 00 00 ->385328 00 00 00 00 0c 0c 03 03 c0 c0 30 30 00 00 00 00 ->385338 00 00 00 00 c0 c0 30 30 0c 0c 03 03 0c 0c 03 03 ->385348 cc cc 33 33 00 00 00 00 00 18 3c 7e 18 18 18 18 ->385358 00 10 30 7f 7f 30 10 00 00 08 0c fe fe 0c 08 00 ->385368 18 18 18 18 7e 3c 18 00 00 00 36 49 36 00 00 00 ->385378 00 00 00 00 00 00 00 00 ->385380 .align 16 ->385380 00 01 01 00 00 00 00 00 MOUSE_POINTER_PTR .text $00,$01,$01,$00,$00,$00,$00,$00,$01,$01,$01,$00,$00,$00,$00,$00 ->385388 01 01 01 00 00 00 00 00 ->385390 01 ff ff 01 00 00 01 01 .text $01,$FF,$FF,$01,$00,$00,$01,$01,$FF,$FF,$FF,$01,$00,$00,$00,$00 ->385398 ff ff ff 01 00 00 00 00 ->3853a0 01 ff ff ff 01 01 55 ff .text $01,$FF,$FF,$FF,$01,$01,$55,$FF,$01,$55,$FF,$FF,$01,$00,$00,$00 ->3853a8 01 55 ff ff 01 00 00 00 ->3853b0 01 55 ff ff ff ff 01 55 .text $01,$55,$FF,$FF,$FF,$FF,$01,$55,$FF,$FF,$FF,$FF,$01,$00,$00,$00 ->3853b8 ff ff ff ff 01 00 00 00 ->3853c0 00 01 55 ff ff ff ff ff .text $00,$01,$55,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$01,$FF,$FF,$01,$00,$00 ->3853c8 ff ff 01 ff ff 01 00 00 ->3853d0 00 00 01 55 ff ff ff ff .text $00,$00,$01,$55,$FF,$FF,$FF,$FF,$01,$FF,$FF,$01,$FF,$01,$00,$00 ->3853d8 01 ff ff 01 ff 01 00 00 ->3853e0 00 00 01 01 55 ff ff ff .text $00,$00,$01,$01,$55,$FF,$FF,$FF,$FF,$01,$FF,$FF,$FF,$01,$00,$00 ->3853e8 ff 01 ff ff ff 01 00 00 ->3853f0 00 00 01 55 01 55 ff ff .text $00,$00,$01,$55,$01,$55,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$01,$01,$00 ->3853f8 ff ff ff ff ff 01 01 00 ->385400 00 00 01 55 55 55 ff ff .text $00,$00,$01,$55,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$01,$FF,$FF,$01 ->385408 ff ff ff ff 01 ff ff 01 ->385410 00 00 00 01 55 55 55 ff .text $00,$00,$00,$01,$55,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$01 ->385418 ff ff ff ff ff ff ff 01 ->385420 00 00 00 00 01 55 55 55 .text $00,$00,$00,$00,$01,$55,$55,$55,$55,$55,$01,$FF,$FF,$55,$01,$00 ->385428 55 55 01 ff ff 55 01 00 ->385430 00 00 00 00 00 01 01 01 .text $00,$00,$00,$00,$00,$01,$01,$01,$01,$01,$55,$FF,$55,$01,$00,$00 ->385438 01 01 55 ff 55 01 00 00 ->385440 00 00 00 00 00 00 00 00 .text $00,$00,$00,$00,$00,$00,$00,$00,$01,$55,$55,$55,$01,$00,$00,$00 ->385448 01 55 55 55 01 00 00 00 ->385450 00 00 00 00 00 00 00 00 .text $00,$00,$00,$00,$00,$00,$00,$00,$01,$55,$55,$01,$00,$00,$00,$00 ->385458 01 55 55 01 00 00 00 00 ->385460 00 00 00 00 00 00 00 00 .text $00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$01,$00,$00,$00,$00,$00 ->385468 00 01 01 00 00 00 00 00 ->385470 00 00 00 00 00 00 00 00 .text $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ->385478 00 00 00 00 00 00 00 00 -.385480 FILE_LOAD_SCREEN ->385480 d5 .byte $D5 ->385481 c3 c3 c3 c3 c3 c3 c3 c3 .fill 18, $C3 ->385489 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 ->385493 c9 .byte $C9 -.385494 FL_ROW_TOP ->385494 c2 .byte $c2 ->385495 2d 4e 4f 20 53 44 20 43 .text '-NO SD CARD FOUND-' ->38549d 41 52 44 20 46 4f 55 4e 44 2d ->3854a7 c2 .byte $c2 -.3854a8 FL_ROW ->3854a8 c2 .byte $c2 ->3854a9 00 00 00 00 00 00 00 00 .fill 18, 0 ->3854b1 00 00 00 00 00 00 00 00 00 00 ->3854bb c2 .byte $c2 ->3854bc c2 .byte $c2 ->3854bd 00 00 00 00 00 00 00 00 .fill 18, 0 ->3854c5 00 00 00 00 00 00 00 00 00 00 ->3854cf c2 .byte $c2 ->3854d0 c2 .byte $c2 ->3854d1 00 00 00 00 00 00 00 00 .fill 18, 0 ->3854d9 00 00 00 00 00 00 00 00 00 00 ->3854e3 c2 .byte $c2 ->3854e4 c2 .byte $c2 ->3854e5 00 00 00 00 00 00 00 00 .fill 18, 0 ->3854ed 00 00 00 00 00 00 00 00 00 00 ->3854f7 c2 .byte $c2 ->3854f8 c2 .byte $c2 ->3854f9 00 00 00 00 00 00 00 00 .fill 18, 0 ->385501 00 00 00 00 00 00 00 00 00 00 ->38550b c2 .byte $c2 ->38550c c2 .byte $c2 ->38550d 00 00 00 00 00 00 00 00 .fill 18, 0 ->385515 00 00 00 00 00 00 00 00 00 00 ->38551f c2 .byte $c2 ->385520 c2 .byte $c2 ->385521 00 00 00 00 00 00 00 00 .fill 18, 0 ->385529 00 00 00 00 00 00 00 00 00 00 ->385533 c2 .byte $c2 ->385534 c2 .byte $c2 ->385535 00 00 00 00 00 00 00 00 .fill 18, 0 ->38553d 00 00 00 00 00 00 00 00 00 00 ->385547 c2 .byte $c2 ->385548 c2 .byte $c2 ->385549 00 00 00 00 00 00 00 00 .fill 18, 0 ->385551 00 00 00 00 00 00 00 00 00 00 ->38555b c2 .byte $c2 ->38555c c2 .byte $c2 ->38555d 00 00 00 00 00 00 00 00 .fill 18, 0 ->385565 00 00 00 00 00 00 00 00 00 00 ->38556f c2 .byte $c2 ->385570 c2 .byte $c2 ->385571 00 00 00 00 00 00 00 00 .fill 18, 0 ->385579 00 00 00 00 00 00 00 00 00 00 ->385583 c2 .byte $c2 ->385584 c2 .byte $c2 ->385585 00 00 00 00 00 00 00 00 .fill 18, 0 ->38558d 00 00 00 00 00 00 00 00 00 00 ->385597 c2 .byte $c2 ->385598 c2 .byte $c2 ->385599 00 00 00 00 00 00 00 00 .fill 18, 0 ->3855a1 00 00 00 00 00 00 00 00 00 00 ->3855ab c2 .byte $c2 ->3855ac c2 .byte $c2 ->3855ad 00 00 00 00 00 00 00 00 .fill 18, 0 ->3855b5 00 00 00 00 00 00 00 00 00 00 ->3855bf c2 .byte $c2 ->3855c0 c2 .byte $c2 ->3855c1 00 00 00 00 00 00 00 00 .fill 18, 0 ->3855c9 00 00 00 00 00 00 00 00 00 00 ->3855d3 c2 .byte $c2 ->3855d4 c2 .byte $c2 ->3855d5 00 00 00 00 00 00 00 00 .fill 18, 0 ->3855dd 00 00 00 00 00 00 00 00 00 00 ->3855e7 c2 .byte $c2 ->3855e8 c2 .byte $c2 ->3855e9 00 00 00 00 00 00 00 00 .fill 18, 0 ->3855f1 00 00 00 00 00 00 00 00 00 00 ->3855fb c2 .byte $c2 ->3855fc c2 .byte $c2 ->3855fd 00 00 00 00 00 00 00 00 .fill 18, 0 ->385605 00 00 00 00 00 00 00 00 00 00 ->38560f c2 .byte $c2 ->385610 c2 .byte $c2 ->385611 00 00 00 00 00 00 00 00 .fill 18, 0 ->385619 00 00 00 00 00 00 00 00 00 00 ->385623 c2 .byte $c2 ->385624 c2 .byte $c2 ->385625 00 00 00 00 00 00 00 00 .fill 18, 0 ->38562d 00 00 00 00 00 00 00 00 00 00 ->385637 c2 .byte $c2 ->385638 c2 .byte $c2 ->385639 00 00 00 00 00 00 00 00 .fill 18, 0 ->385641 00 00 00 00 00 00 00 00 00 00 ->38564b c2 .byte $c2 ->38564c c2 .byte $c2 ->38564d 00 00 00 00 00 00 00 00 .fill 18, 0 ->385655 00 00 00 00 00 00 00 00 00 00 ->38565f c2 .byte $c2 ->385660 c2 .byte $c2 ->385661 00 00 00 00 00 00 00 00 .fill 18, 0 ->385669 00 00 00 00 00 00 00 00 00 00 ->385673 c2 .byte $c2 ->385674 c2 .byte $c2 ->385675 00 00 00 00 00 00 00 00 .fill 18, 0 ->38567d 00 00 00 00 00 00 00 00 00 00 ->385687 c2 .byte $c2 ->385688 c2 .byte $c2 ->385689 00 00 00 00 00 00 00 00 .fill 18, 0 ->385691 00 00 00 00 00 00 00 00 00 00 ->38569b c2 .byte $c2 ->38569c c2 .byte $c2 ->38569d 00 00 00 00 00 00 00 00 .fill 18, 0 ->3856a5 00 00 00 00 00 00 00 00 00 00 ->3856af c2 .byte $c2 ->3856b0 c2 .byte $c2 ->3856b1 00 00 00 00 00 00 00 00 .fill 18, 0 ->3856b9 00 00 00 00 00 00 00 00 00 00 ->3856c3 c2 .byte $c2 ->3856c4 c2 .byte $c2 ->3856c5 00 00 00 00 00 00 00 00 .fill 18, 0 ->3856cd 00 00 00 00 00 00 00 00 00 00 ->3856d7 c2 .byte $c2 ->3856d8 c2 .byte $c2 ->3856d9 00 00 00 00 00 00 00 00 .fill 18, 0 ->3856e1 00 00 00 00 00 00 00 00 00 00 ->3856eb c2 .byte $c2 ->3856ec c2 .byte $c2 ->3856ed 00 00 00 00 00 00 00 00 .fill 18, 0 ->3856f5 00 00 00 00 00 00 00 00 00 00 ->3856ff c2 .byte $c2 ->385700 c2 .byte $c2 ->385701 00 00 00 00 00 00 00 00 .fill 18, 0 ->385709 00 00 00 00 00 00 00 00 00 00 ->385713 c2 .byte $c2 ->385714 c2 .byte $c2 ->385715 00 00 00 00 00 00 00 00 .fill 18, 0 ->38571d 00 00 00 00 00 00 00 00 00 00 ->385727 c2 .byte $c2 ->385728 c2 .byte $c2 ->385729 00 00 00 00 00 00 00 00 .fill 18, 0 ->385731 00 00 00 00 00 00 00 00 00 00 ->38573b c2 .byte $c2 ->38573c c2 .byte $c2 ->38573d 00 00 00 00 00 00 00 00 .fill 18, 0 ->385745 00 00 00 00 00 00 00 00 00 00 ->38574f c2 .byte $c2 ->385750 c2 .byte $c2 ->385751 00 00 00 00 00 00 00 00 .fill 18, 0 ->385759 00 00 00 00 00 00 00 00 00 00 ->385763 c2 .byte $c2 ->385764 c2 .byte $c2 ->385765 00 00 00 00 00 00 00 00 .fill 18, 0 ->38576d 00 00 00 00 00 00 00 00 00 00 ->385777 c2 .byte $c2 ->385778 c2 .byte $c2 ->385779 00 00 00 00 00 00 00 00 .fill 18, 0 ->385781 00 00 00 00 00 00 00 00 00 00 ->38578b c2 .byte $c2 -.38578c FL_END ->38578c ca .byte $ca ->38578d c3 c3 c3 c3 c3 c3 c3 c3 .fill 18, $C3 ->385795 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 ->38579f cb .byte $cb ->3857a0 08 03 FIELD_ORDER .word 6 * 128 + 8 ->3857a2 02 03 HIGHLIGHT_ORDER .word 6 * 128 + 2 +>384cc8 cc 99 33 66 cc 99 33 66 33 99 cc 66 33 99 cc 66 +>384cd8 02 06 0c d8 f0 e0 c0 00 01 03 07 0f 1f 3f 7f ff +>384ce8 80 c0 e0 f0 f8 fc fe ff ff ff ff ff 00 00 00 00 +>384cf8 0f 0f 0f 0f 0f 0f 0f 0f f0 f0 f0 f0 ff ff ff ff +>384d08 0f 0f 0f 0f ff ff ff ff ff ff ff ff f0 f0 f0 f0 +>384d18 ff ff ff ff 0f 0f 0f 0f 0c 0c 03 03 00 00 00 00 +>384d28 00 00 00 00 0c 0c 03 03 c0 c0 30 30 00 00 00 00 +>384d38 00 00 00 00 c0 c0 30 30 0c 0c 03 03 0c 0c 03 03 +>384d48 cc cc 33 33 00 00 00 00 00 18 3c 7e 18 18 18 18 +>384d58 00 10 30 7f 7f 30 10 00 00 08 0c fe fe 0c 08 00 +>384d68 18 18 18 18 7e 3c 18 00 00 00 36 49 36 00 00 00 +>384d78 00 00 00 00 00 00 00 00 +>384d80 .align 16 +>384d80 00 01 01 00 00 00 00 00 MOUSE_POINTER_PTR .text $00,$01,$01,$00,$00,$00,$00,$00,$01,$01,$01,$00,$00,$00,$00,$00 +>384d88 01 01 01 00 00 00 00 00 +>384d90 01 ff ff 01 00 00 01 01 .text $01,$FF,$FF,$01,$00,$00,$01,$01,$FF,$FF,$FF,$01,$00,$00,$00,$00 +>384d98 ff ff ff 01 00 00 00 00 +>384da0 01 ff ff ff 01 01 55 ff .text $01,$FF,$FF,$FF,$01,$01,$55,$FF,$01,$55,$FF,$FF,$01,$00,$00,$00 +>384da8 01 55 ff ff 01 00 00 00 +>384db0 01 55 ff ff ff ff 01 55 .text $01,$55,$FF,$FF,$FF,$FF,$01,$55,$FF,$FF,$FF,$FF,$01,$00,$00,$00 +>384db8 ff ff ff ff 01 00 00 00 +>384dc0 00 01 55 ff ff ff ff ff .text $00,$01,$55,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$01,$FF,$FF,$01,$00,$00 +>384dc8 ff ff 01 ff ff 01 00 00 +>384dd0 00 00 01 55 ff ff ff ff .text $00,$00,$01,$55,$FF,$FF,$FF,$FF,$01,$FF,$FF,$01,$FF,$01,$00,$00 +>384dd8 01 ff ff 01 ff 01 00 00 +>384de0 00 00 01 01 55 ff ff ff .text $00,$00,$01,$01,$55,$FF,$FF,$FF,$FF,$01,$FF,$FF,$FF,$01,$00,$00 +>384de8 ff 01 ff ff ff 01 00 00 +>384df0 00 00 01 55 01 55 ff ff .text $00,$00,$01,$55,$01,$55,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$01,$01,$00 +>384df8 ff ff ff ff ff 01 01 00 +>384e00 00 00 01 55 55 55 ff ff .text $00,$00,$01,$55,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$01,$FF,$FF,$01 +>384e08 ff ff ff ff 01 ff ff 01 +>384e10 00 00 00 01 55 55 55 ff .text $00,$00,$00,$01,$55,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$01 +>384e18 ff ff ff ff ff ff ff 01 +>384e20 00 00 00 00 01 55 55 55 .text $00,$00,$00,$00,$01,$55,$55,$55,$55,$55,$01,$FF,$FF,$55,$01,$00 +>384e28 55 55 01 ff ff 55 01 00 +>384e30 00 00 00 00 00 01 01 01 .text $00,$00,$00,$00,$00,$01,$01,$01,$01,$01,$55,$FF,$55,$01,$00,$00 +>384e38 01 01 55 ff 55 01 00 00 +>384e40 00 00 00 00 00 00 00 00 .text $00,$00,$00,$00,$00,$00,$00,$00,$01,$55,$55,$55,$01,$00,$00,$00 +>384e48 01 55 55 55 01 00 00 00 +>384e50 00 00 00 00 00 00 00 00 .text $00,$00,$00,$00,$00,$00,$00,$00,$01,$55,$55,$01,$00,$00,$00,$00 +>384e58 01 55 55 01 00 00 00 00 +>384e60 00 00 00 00 00 00 00 00 .text $00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$01,$00,$00,$00,$00,$00 +>384e68 00 01 01 00 00 00 00 00 +>384e70 00 00 00 00 00 00 00 00 .text $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 +>384e78 00 00 00 00 00 00 00 00 +.384e80 FILE_LOAD_SCREEN +>384e80 d5 .byte $D5 +>384e81 c3 c3 c3 c3 c3 c3 c3 c3 .fill 18, $C3 +>384e89 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 +>384e93 c9 .byte $C9 +.384e94 FL_ROW_TOP +>384e94 c2 .byte $c2 +>384e95 2d 4e 4f 20 53 44 20 43 .text '-NO SD CARD FOUND-' +>384e9d 41 52 44 20 46 4f 55 4e 44 2d +>384ea7 c2 .byte $c2 +.384ea8 FL_ROW +>384ea8 c2 .byte $c2 +>384ea9 00 00 00 00 00 00 00 00 .fill 18, 0 +>384eb1 00 00 00 00 00 00 00 00 00 00 +>384ebb c2 .byte $c2 +>384ebc c2 .byte $c2 +>384ebd 00 00 00 00 00 00 00 00 .fill 18, 0 +>384ec5 00 00 00 00 00 00 00 00 00 00 +>384ecf c2 .byte $c2 +>384ed0 c2 .byte $c2 +>384ed1 00 00 00 00 00 00 00 00 .fill 18, 0 +>384ed9 00 00 00 00 00 00 00 00 00 00 +>384ee3 c2 .byte $c2 +>384ee4 c2 .byte $c2 +>384ee5 00 00 00 00 00 00 00 00 .fill 18, 0 +>384eed 00 00 00 00 00 00 00 00 00 00 +>384ef7 c2 .byte $c2 +>384ef8 c2 .byte $c2 +>384ef9 00 00 00 00 00 00 00 00 .fill 18, 0 +>384f01 00 00 00 00 00 00 00 00 00 00 +>384f0b c2 .byte $c2 +>384f0c c2 .byte $c2 +>384f0d 00 00 00 00 00 00 00 00 .fill 18, 0 +>384f15 00 00 00 00 00 00 00 00 00 00 +>384f1f c2 .byte $c2 +>384f20 c2 .byte $c2 +>384f21 00 00 00 00 00 00 00 00 .fill 18, 0 +>384f29 00 00 00 00 00 00 00 00 00 00 +>384f33 c2 .byte $c2 +>384f34 c2 .byte $c2 +>384f35 00 00 00 00 00 00 00 00 .fill 18, 0 +>384f3d 00 00 00 00 00 00 00 00 00 00 +>384f47 c2 .byte $c2 +>384f48 c2 .byte $c2 +>384f49 00 00 00 00 00 00 00 00 .fill 18, 0 +>384f51 00 00 00 00 00 00 00 00 00 00 +>384f5b c2 .byte $c2 +>384f5c c2 .byte $c2 +>384f5d 00 00 00 00 00 00 00 00 .fill 18, 0 +>384f65 00 00 00 00 00 00 00 00 00 00 +>384f6f c2 .byte $c2 +>384f70 c2 .byte $c2 +>384f71 00 00 00 00 00 00 00 00 .fill 18, 0 +>384f79 00 00 00 00 00 00 00 00 00 00 +>384f83 c2 .byte $c2 +>384f84 c2 .byte $c2 +>384f85 00 00 00 00 00 00 00 00 .fill 18, 0 +>384f8d 00 00 00 00 00 00 00 00 00 00 +>384f97 c2 .byte $c2 +>384f98 c2 .byte $c2 +>384f99 00 00 00 00 00 00 00 00 .fill 18, 0 +>384fa1 00 00 00 00 00 00 00 00 00 00 +>384fab c2 .byte $c2 +>384fac c2 .byte $c2 +>384fad 00 00 00 00 00 00 00 00 .fill 18, 0 +>384fb5 00 00 00 00 00 00 00 00 00 00 +>384fbf c2 .byte $c2 +>384fc0 c2 .byte $c2 +>384fc1 00 00 00 00 00 00 00 00 .fill 18, 0 +>384fc9 00 00 00 00 00 00 00 00 00 00 +>384fd3 c2 .byte $c2 +>384fd4 c2 .byte $c2 +>384fd5 00 00 00 00 00 00 00 00 .fill 18, 0 +>384fdd 00 00 00 00 00 00 00 00 00 00 +>384fe7 c2 .byte $c2 +>384fe8 c2 .byte $c2 +>384fe9 00 00 00 00 00 00 00 00 .fill 18, 0 +>384ff1 00 00 00 00 00 00 00 00 00 00 +>384ffb c2 .byte $c2 +>384ffc c2 .byte $c2 +>384ffd 00 00 00 00 00 00 00 00 .fill 18, 0 +>385005 00 00 00 00 00 00 00 00 00 00 +>38500f c2 .byte $c2 +>385010 c2 .byte $c2 +>385011 00 00 00 00 00 00 00 00 .fill 18, 0 +>385019 00 00 00 00 00 00 00 00 00 00 +>385023 c2 .byte $c2 +>385024 c2 .byte $c2 +>385025 00 00 00 00 00 00 00 00 .fill 18, 0 +>38502d 00 00 00 00 00 00 00 00 00 00 +>385037 c2 .byte $c2 +>385038 c2 .byte $c2 +>385039 00 00 00 00 00 00 00 00 .fill 18, 0 +>385041 00 00 00 00 00 00 00 00 00 00 +>38504b c2 .byte $c2 +>38504c c2 .byte $c2 +>38504d 00 00 00 00 00 00 00 00 .fill 18, 0 +>385055 00 00 00 00 00 00 00 00 00 00 +>38505f c2 .byte $c2 +>385060 c2 .byte $c2 +>385061 00 00 00 00 00 00 00 00 .fill 18, 0 +>385069 00 00 00 00 00 00 00 00 00 00 +>385073 c2 .byte $c2 +>385074 c2 .byte $c2 +>385075 00 00 00 00 00 00 00 00 .fill 18, 0 +>38507d 00 00 00 00 00 00 00 00 00 00 +>385087 c2 .byte $c2 +>385088 c2 .byte $c2 +>385089 00 00 00 00 00 00 00 00 .fill 18, 0 +>385091 00 00 00 00 00 00 00 00 00 00 +>38509b c2 .byte $c2 +>38509c c2 .byte $c2 +>38509d 00 00 00 00 00 00 00 00 .fill 18, 0 +>3850a5 00 00 00 00 00 00 00 00 00 00 +>3850af c2 .byte $c2 +>3850b0 c2 .byte $c2 +>3850b1 00 00 00 00 00 00 00 00 .fill 18, 0 +>3850b9 00 00 00 00 00 00 00 00 00 00 +>3850c3 c2 .byte $c2 +>3850c4 c2 .byte $c2 +>3850c5 00 00 00 00 00 00 00 00 .fill 18, 0 +>3850cd 00 00 00 00 00 00 00 00 00 00 +>3850d7 c2 .byte $c2 +>3850d8 c2 .byte $c2 +>3850d9 00 00 00 00 00 00 00 00 .fill 18, 0 +>3850e1 00 00 00 00 00 00 00 00 00 00 +>3850eb c2 .byte $c2 +>3850ec c2 .byte $c2 +>3850ed 00 00 00 00 00 00 00 00 .fill 18, 0 +>3850f5 00 00 00 00 00 00 00 00 00 00 +>3850ff c2 .byte $c2 +>385100 c2 .byte $c2 +>385101 00 00 00 00 00 00 00 00 .fill 18, 0 +>385109 00 00 00 00 00 00 00 00 00 00 +>385113 c2 .byte $c2 +>385114 c2 .byte $c2 +>385115 00 00 00 00 00 00 00 00 .fill 18, 0 +>38511d 00 00 00 00 00 00 00 00 00 00 +>385127 c2 .byte $c2 +>385128 c2 .byte $c2 +>385129 00 00 00 00 00 00 00 00 .fill 18, 0 +>385131 00 00 00 00 00 00 00 00 00 00 +>38513b c2 .byte $c2 +>38513c c2 .byte $c2 +>38513d 00 00 00 00 00 00 00 00 .fill 18, 0 +>385145 00 00 00 00 00 00 00 00 00 00 +>38514f c2 .byte $c2 +>385150 c2 .byte $c2 +>385151 00 00 00 00 00 00 00 00 .fill 18, 0 +>385159 00 00 00 00 00 00 00 00 00 00 +>385163 c2 .byte $c2 +>385164 c2 .byte $c2 +>385165 00 00 00 00 00 00 00 00 .fill 18, 0 +>38516d 00 00 00 00 00 00 00 00 00 00 +>385177 c2 .byte $c2 +>385178 c2 .byte $c2 +>385179 00 00 00 00 00 00 00 00 .fill 18, 0 +>385181 00 00 00 00 00 00 00 00 00 00 +>38518b c2 .byte $c2 +.38518c FL_END +>38518c ca .byte $ca +>38518d c3 c3 c3 c3 c3 c3 c3 c3 .fill 18, $C3 +>385195 c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 +>38519f cb .byte $cb +>3851a0 e8 01 FIELD_ORDER .word 6 * SCREEN_WIDTH + 8 +>3851a2 e2 01 HIGHLIGHT_ORDER .word 6 * SCREEN_WIDTH + 2 ;****** Return to file: tracker.asm ;****** Processing file: Interrupt_Handler.asm -.3857a4 IRQ_HANDLER -.3857a4 48 pha PHA ; begin setdp macro -.3857a5 08 php PHP -.3857a6 c2 20 rep #$20 REP #$20 ; set A long -.3857a8 a9 00 00 lda #$0000 LDA #0 ; set DP to page 0 -.3857ab 5b tcd TCD -.3857ac 28 plp PLP -.3857ad 68 pla PLA ; end setdp macro -.3857ae e2 20 sep #$20 SEP #$20 ; set A short -.3857b0 a9 00 lda #$00 LDA #0 ; set the data bank register to 0 -.3857b2 48 pha PHA -.3857b3 ab plb PLB -.3857b4 ad 40 01 lda $0140 LDA INT_PENDING_REG0 -.3857b7 f0 2d beq $3857e6 BEQ CHECK_PENDING_REG1 -.3857b9 ad 40 01 lda $0140 LDA INT_PENDING_REG0 -.3857bc 29 04 and #$04 AND #FNX0_INT02_TMR0 -.3857be c9 04 cmp #$04 CMP #FNX0_INT02_TMR0 -.3857c0 d0 06 bne $3857c8 BNE END_CHECK -.3857c2 8d 40 01 sta $0140 STA INT_PENDING_REG0 -.3857c5 20 8e 5a jsr $385a8e JSR TIMER0_INTERRUPT -.3857c8 END_CHECK -.3857c8 ad 40 01 lda $0140 LDA INT_PENDING_REG0 -.3857cb 29 40 and #$40 AND #FNX0_INT06_FDC -.3857cd c9 40 cmp #$40 CMP #FNX0_INT06_FDC -.3857cf d0 06 bne $3857d7 BNE END_CHECK -.3857d1 8d 40 01 sta $0140 STA INT_PENDING_REG0 -.3857d4 20 a9 5b jsr $385ba9 JSR FDC_INTERRUPT -.3857d7 END_CHECK -.3857d7 ad 40 01 lda $0140 LDA INT_PENDING_REG0 -.3857da 29 80 and #$80 AND #FNX0_INT07_MOUSE -.3857dc c9 80 cmp #$80 CMP #FNX0_INT07_MOUSE -.3857de d0 06 bne $3857e6 BNE END_CHECK -.3857e0 8d 40 01 sta $0140 STA INT_PENDING_REG0 -.3857e3 20 2b 5b jsr $385b2b JSR MOUSE_INTERRUPT -.3857e6 END_CHECK -.3857e6 CHECK_PENDING_REG1 -.3857e6 e2 20 sep #$20 SEP #$20 ; set A short -.3857e8 ad 41 01 lda $0141 LDA INT_PENDING_REG1 -.3857eb f0 4b beq $385838 BEQ CHECK_PENDING_REG2 ; BEQ EXIT_IRQ_HANDLE -.3857ed ad 41 01 lda $0141 LDA INT_PENDING_REG1 -.3857f0 29 01 and #$01 AND #FNX1_INT00_KBD -.3857f2 c9 01 cmp #$01 CMP #FNX1_INT00_KBD -.3857f4 d0 06 bne $3857fc BNE END_CHECK -.3857f6 8d 41 01 sta $0141 STA INT_PENDING_REG1 -.3857f9 20 42 58 jsr $385842 JSR KEYBOARD_INTERRUPT -.3857fc END_CHECK -.3857fc ad 41 01 lda $0141 LDA INT_PENDING_REG1 -.3857ff 29 08 and #$08 AND #FNX1_INT03_COM2 -.385801 c9 08 cmp #$08 CMP #FNX1_INT03_COM2 -.385803 d0 06 bne $38580b BNE END_CHECK -.385805 8d 41 01 sta $0141 STA INT_PENDING_REG1 -.385808 20 aa 5b jsr $385baa JSR COM2_INTERRUPT -.38580b END_CHECK -.38580b ad 41 01 lda $0141 LDA INT_PENDING_REG1 -.38580e 29 10 and #$10 AND #FNX1_INT04_COM1 -.385810 c9 10 cmp #$10 CMP #FNX1_INT04_COM1 -.385812 d0 06 bne $38581a BNE END_CHECK -.385814 8d 41 01 sta $0141 STA INT_PENDING_REG1 -.385817 20 ab 5b jsr $385bab JSR COM1_INTERRUPT -.38581a END_CHECK -.38581a ad 41 01 lda $0141 LDA INT_PENDING_REG1 -.38581d 29 20 and #$20 AND #FNX1_INT05_MPU401 -.38581f c9 20 cmp #$20 CMP #FNX1_INT05_MPU401 -.385821 d0 06 bne $385829 BNE END_CHECK -.385823 8d 41 01 sta $0141 STA INT_PENDING_REG1 -.385826 20 0d 5b jsr $385b0d JSR MPU401_INTERRUPT -.385829 END_CHECK -.385829 ad 41 01 lda $0141 LDA INT_PENDING_REG1 -.38582c 29 40 and #$40 AND #FNX1_INT06_LPT -.38582e c9 40 cmp #$40 CMP #FNX1_INT06_LPT -.385830 d0 06 bne $385838 BNE END_CHECK -.385832 8d 41 01 sta $0141 STA INT_PENDING_REG1 -.385835 20 ac 5b jsr $385bac JSR LPT1_INTERRUPT -.385838 END_CHECK -.385838 CHECK_PENDING_REG2 -.385838 e2 20 sep #$20 SEP #$20 ; set A short -.38583a ad 42 01 lda $0142 LDA INT_PENDING_REG2 -.38583d f0 00 beq $38583f BEQ EXIT_IRQ_HANDLE -.38583f EXIT_IRQ_HANDLE -.38583f c2 30 rep #$30 REP #$30 ; set A&X long -.385841 6b rtl RTL -.385842 KEYBOARD_INTERRUPT -.385842 a2 00 00 ldx #$0000 ldx #$0000 -.385845 IRQ_HANDLER_FETCH -.385845 af 60 10 af lda $af1060 LDA KBD_INPT_BUF ; Get Scan Code from KeyBoard -.385849 8d 88 0f sta $0f88 STA KEYBOARD_SC_TMP ; Save Code Immediately -.38584c c2 10 rep #$10 REP #$10 ; set X long -.38584e a0 46 00 ldy #$0046 LDY #70 -.385851 20 b1 5d jsr $385db1 JSR WRITE_HEX ; print the HEX key code at column 70 on the top line -.385854 c9 01 cmp #$01 CMP #1 ; ESC -.385856 d0 0f bne $385867 BNE NOT_ESCAPE -.385858 af 15 0f 38 lda $380f15 LDA STATE_MACHINE -.38585c c9 02 cmp #$02 CMP #2 -.38585e d0 07 bne $385867 BNE NOT_ESCAPE -.385860 22 47 70 38 jsl $387047 JSL EXIT_FILE -.385864 4c e9 59 jmp $3859e9 JMP KB_WR_2_SCREEN -.385867 NOT_ESCAPE -.385867 c9 1a cmp #$1a CMP #$1A ; left bracket -.385869 d0 08 bne $385873 BNE NOT_LEFT_BRACKET -.38586b c6 6a dec $6a DEC INSTR_NUMBER -.38586d 20 52 6b jsr $386b52 JSR LOAD_INSTRUMENT ; X is already set to 0 -.385870 4c e9 59 jmp $3859e9 JMP KB_WR_2_SCREEN -.385873 NOT_LEFT_BRACKET -.385873 c9 1b cmp #$1b CMP #$1B ; right bracket -.385875 d0 08 bne $38587f BNE NOT_RIGHT_BRACKET -.385877 e6 6a inc $6a INC INSTR_NUMBER -.385879 20 52 6b jsr $386b52 JSR LOAD_INSTRUMENT ; X is already set to 0 -.38587c 4c e9 59 jmp $3859e9 JMP KB_WR_2_SCREEN -.38587f NOT_RIGHT_BRACKET -.38587f c9 0c cmp #$0c CMP #$0C ; minus -.385881 d0 1f bne $3858a2 BNE NOT_MINUS -.385883 af 15 0f 38 lda $380f15 LDA STATE_MACHINE ; only allow for this in edit mode -.385887 29 0f and #$0f AND #$F -.385889 d0 14 bne $38589f BNE MINUS_DONE -.38588b af 18 0f 38 lda $380f18 LDA PATTERN_NUM -.38588f c9 01 cmp #$01 CMP #1 -.385891 f0 0c beq $38589f BEQ MINUS_DONE -.385893 f8 sed SED ; switch to decimal -.385894 38 sec SEC -.385895 e9 01 sbc #$01 SBC #1 -.385897 8f 18 0f 38 sta $380f18 STA PATTERN_NUM -.38589b d8 cld CLD ; switch out of decimal -.38589c 20 61 5e jsr $385e61 JSR DISPLAY_PATTERN -.38589f MINUS_DONE -.38589f 4c e9 59 jmp $3859e9 JMP KB_WR_2_SCREEN -.3858a2 NOT_MINUS -.3858a2 c9 0d cmp #$0d CMP #$0D ; plus -.3858a4 d0 1f bne $3858c5 BNE BPM_KEYS -.3858a6 af 15 0f 38 lda $380f15 LDA STATE_MACHINE ; only allow for this in edit mode -.3858aa 29 0f and #$0f AND #$F -.3858ac d0 14 bne $3858c2 BNE PLUS_DONE -.3858ae af 18 0f 38 lda $380f18 LDA PATTERN_NUM -.3858b2 c9 30 cmp #$30 CMP #$30 -.3858b4 f0 0c beq $3858c2 BEQ PLUS_DONE -.3858b6 f8 sed SED ; switch to decimal -.3858b7 18 clc CLC -.3858b8 69 01 adc #$01 ADC #1 -.3858ba 8f 18 0f 38 sta $380f18 STA PATTERN_NUM -.3858be d8 cld CLD ; switch out of decimal -.3858bf 20 61 5e jsr $385e61 JSR DISPLAY_PATTERN -.3858c2 PLUS_DONE -.3858c2 4c e9 59 jmp $3859e9 JMP KB_WR_2_SCREEN -.3858c5 BPM_KEYS -.3858c5 c9 27 cmp #$27 CMP #$27 ; semi-colon -.3858c7 d0 0b bne $3858d4 BNE NOT_SEMI_COLON -.3858c9 af 17 0f 38 lda $380f17 LDA BPM -.3858cd c9 04 cmp #$04 CMP #4 -.3858cf f0 f1 beq $3858c2 BEQ PLUS_DONE -.3858d1 3a dec a DEC A -.3858d2 80 0d bra $3858e1 BRA SETUP_TIMER -.3858d4 NOT_SEMI_COLON -.3858d4 c9 28 cmp #$28 CMP #$28 ; quote -.3858d6 d0 16 bne $3858ee BNE TRY_GRAVE -.3858d8 af 17 0f 38 lda $380f17 LDA BPM -.3858dc c9 f0 cmp #$f0 CMP #240 -.3858de f0 e2 beq $3858c2 BEQ PLUS_DONE -.3858e0 1a inc a INC A -.3858e1 SETUP_TIMER -.3858e1 8f 17 0f 38 sta $380f17 STA BPM -.3858e5 20 c9 60 jsr $3860c9 JSR DISPLAY_BPM -.3858e8 20 c5 6a jsr $386ac5 JSR INIT_TIMER0_BPM -.3858eb 4c e9 59 jmp $3859e9 JMP KB_WR_2_SCREEN -.3858ee TRY_GRAVE -.3858ee c9 29 cmp #$29 CMP #$29 -.3858f0 d0 1c bne $38590e BNE SPECIAL_KEYS -.3858f2 a9 00 lda #$00 LDA #0 -.3858f4 eb xba XBA -.3858f5 af 15 0f 38 lda $380f15 LDA STATE_MACHINE -.3858f9 48 pha PHA -.3858fa 29 30 and #$30 AND #$30 -.3858fc 4a lsr a LSR -.3858fd 4a lsr a LSR -.3858fe aa tax TAX -.3858ff 68 pla PLA -.385900 5f cd 60 38 eor $3860cd,x EOR HL_CLR_TABLE+3,X -.385904 8f 15 0f 38 sta $380f15 STA STATE_MACHINE -.385908 20 d6 60 jsr $3860d6 JSR HIGHLIGHT_MODE -.38590b 4c e9 59 jmp $3859e9 JMP KB_WR_2_SCREEN -.38590e SPECIAL_KEYS -.38590e c9 2a cmp #$2a CMP #$2A ; Left Shift Pressed -.385910 d0 03 bne $385915 BNE NOT_KB_SET_SHIFT -.385912 82 2c 01 brl $385a41 BRL KB_SET_SHIFT -.385915 NOT_KB_SET_SHIFT -.385915 c9 aa cmp #$aa CMP #$AA ; Left Shift Unpressed -.385917 d0 03 bne $38591c BNE NOT_KB_CLR_SHIFT -.385919 82 30 01 brl $385a4c BRL KB_CLR_SHIFT -.38591c NOT_KB_CLR_SHIFT -.38591c c9 1d cmp #$1d CMP #$1D ; Left CTRL pressed -.38591e d0 03 bne $385923 BNE NOT_KB_SET_CTRL -.385920 82 34 01 brl $385a57 BRL KB_SET_CTRL -.385923 NOT_KB_SET_CTRL -.385923 c9 9d cmp #$9d CMP #$9D ; Left CTRL Unpressed -.385925 d0 03 bne $38592a BNE NOT_KB_CLR_CTRL -.385927 82 38 01 brl $385a62 BRL KB_CLR_CTRL -.38592a NOT_KB_CLR_CTRL -.38592a c9 38 cmp #$38 CMP #$38 ; Left ALT Pressed -.38592c d0 03 bne $385931 BNE NOT_KB_SET_ALT -.38592e 82 3c 01 brl $385a6d BRL KB_SET_ALT -.385931 NOT_KB_SET_ALT -.385931 c9 b8 cmp #$b8 CMP #$B8 ; Left ALT Unpressed -.385933 d0 03 bne $385938 BNE NOT_SPECIAL -.385935 82 40 01 brl $385a78 BRL KB_CLR_ALT -.385938 NOT_SPECIAL -.385938 c9 48 cmp #$48 CMP #$48 ; UP arrow -.38593a d0 18 bne $385954 BNE NOT_UP -.38593c 48 pha PHA -.38593d af 15 0f 38 lda $380f15 LDA STATE_MACHINE -.385941 29 0f and #$0f AND #$F -.385943 d0 03 bne $385948 BNE UP_WRONG_STATE -.385945 20 ec 5a jsr $385aec JSR DECR_LINE -.385948 UP_WRONG_STATE -.385948 c9 02 cmp #$02 CMP #2 -.38594a d0 04 bne $385950 BNE UP_WRG_DONE -.38594c 22 6f 62 38 jsl $38626f JSL SELECT_PREVIOUS_FILE -.385950 UP_WRG_DONE -.385950 68 pla PLA -.385951 4c e9 59 jmp $3859e9 JMP KB_WR_2_SCREEN -.385954 NOT_UP -.385954 c9 50 cmp #$50 CMP #$50 ; DOWN arrow -.385956 d0 18 bne $385970 BNE NOT_DOWN -.385958 48 pha PHA -.385959 af 15 0f 38 lda $380f15 LDA STATE_MACHINE -.38595d 29 0f and #$0f AND #$F -.38595f d0 03 bne $385964 BNE DOWN_WRONG_STATE -.385961 20 a1 5a jsr $385aa1 JSR INCR_LINE -.385964 DOWN_WRONG_STATE -.385964 c9 02 cmp #$02 CMP #2 -.385966 d0 04 bne $38596c BNE DOWN_WRG_DONE -.385968 22 56 62 38 jsl $386256 JSL SELECT_NEXT_FILE -.38596c DOWN_WRG_DONE -.38596c 68 pla PLA -.38596d 4c e9 59 jmp $3859e9 JMP KB_WR_2_SCREEN -.385970 NOT_DOWN -.385970 KB_UNPRESSED -.385970 29 80 and #$80 AND #$80 ; See if the Scan Code is press or Depressed -.385972 c9 80 cmp #$80 CMP #$80 ; Depress Status - We will not do anything at this point -.385974 d0 0a bne $385980 BNE KB_NORM_SC -.385976 a9 00 lda #$00 LDA #$00 -.385978 85 32 sta $32 STA OPL2_PARAMETER0 ; Set Keyon False -.38597a 20 c6 36 jsr $3836c6 JSR OPL2_SET_KEYON -.38597d 82 00 01 brl $385a80 BRL KB_CHECK_B_DONE -.385980 KB_NORM_SC -.385980 ad 88 0f lda $0f88 LDA KEYBOARD_SC_TMP -.385983 e2 10 sep #$10 SEP #$10 ; set X short -.385985 aa tax TAX -.385986 ad 87 0f lda $0f87 LDA KEYBOARD_SC_FLG ; Check to See if the SHIFT Key is being Pushed -.385989 29 10 and #$10 AND #$10 -.38598b c9 10 cmp #$10 CMP #$10 -.38598d f0 26 beq $3859b5 BEQ SHIFT_KEY_ON -.38598f ad 87 0f lda $0f87 LDA KEYBOARD_SC_FLG ; Check to See if the CTRL Key is being Pushed -.385992 29 20 and #$20 AND #$20 -.385994 c9 20 cmp #$20 CMP #$20 -.385996 f0 24 beq $3859bc BEQ CTRL_KEY_ON -.385998 ad 87 0f lda $0f87 LDA KEYBOARD_SC_FLG ; Check to See if the ALT Key is being Pushed -.38599b 29 40 and #$40 AND #$40 -.38599d c9 40 cmp #$40 CMP #$40 -.38599f f0 35 beq $3859d6 BEQ ALT_KEY_ON -.3859a1 c2 10 rep #$10 REP #$10 ; set X long -.3859a3 ad 88 0f lda $0f88 LDA KEYBOARD_SC_TMP -.3859a6 20 75 6e jsr $386e75 JSR PLAY_TRACKER_NOTE -.3859a9 e2 10 sep #$10 SEP #$10 ; set X short -.3859ab ae 88 0f ldx $0f88 LDX KEYBOARD_SC_TMP -.3859ae bf 00 39 38 lda $383900,x LDA @lScanCode_Press_Set1, x -.3859b2 82 34 00 brl $3859e9 BRL KB_WR_2_SCREEN -.3859b5 bf 80 39 38 lda $383980,x SHIFT_KEY_ON LDA @lScanCode_Shift_Set1, x -.3859b9 82 2d 00 brl $3859e9 BRL KB_WR_2_SCREEN -.3859bc bf 00 3a 38 lda $383a00,x CTRL_KEY_ON LDA @lScanCode_Ctrl_Set1, x -.3859c0 f0 27 beq $3859e9 BEQ KB_WR_2_SCREEN -.3859c2 c9 02 cmp #$02 CMP #2 -.3859c4 d0 0e bne $3859d4 BNE CONTINUE_KEY -.3859c6 af 15 0f 38 lda $380f15 LDA STATE_MACHINE ; check if the load file screen is already opened -.3859ca 29 0f and #$0f AND #$F -.3859cc c9 02 cmp #$02 CMP #2 -.3859ce f0 04 beq $3859d4 BEQ CONTINUE_KEY -.3859d0 22 3e 6f 38 jsl $386f3e JSL LOAD_FILE_DISPLAY -.3859d4 CONTINUE_KEY -.3859d4 80 13 bra $3859e9 BRA KB_WR_2_SCREEN -.3859d6 bf 80 3a 38 lda $383a80,x ALT_KEY_ON LDA @lScanCode_Alt_Set1, x -.3859da f0 0d beq $3859e9 BEQ KB_WR_2_SCREEN -.3859dc 29 0f and #$0f AND #$F -.3859de 20 bf 6e jsr $386ebf JSR TOGGLE_CHANNEL -.3859e1 c2 10 rep #$10 REP #$10 ; set X long -.3859e3 20 6d 61 jsr $38616d JSR DISPLAY_ACTIVE_CHANNELS -.3859e6 e2 10 sep #$10 SEP #$10 ; set X short -.3859e8 60 rts RTS ; early exit -.3859e9 KB_WR_2_SCREEN -.3859e9 c2 10 rep #$10 REP #$10 ; set X long -.3859eb a0 4a 00 ldy #$004a LDY #74 -.3859ee 20 b1 5d jsr $385db1 JSR WRITE_HEX -.3859f1 c9 0d cmp #$0d CMP #$0D ; Enter Key Pressed -.3859f3 d0 1f bne $385a14 BNE KB_CHECK_B_DONE_R -.3859f5 48 pha PHA -.3859f6 af 15 0f 38 lda $380f15 LDA STATE_MACHINE -.3859fa f0 1b beq $385a17 BEQ START_SOF ; if zero then start playing -.3859fc c9 02 cmp #$02 CMP #2 -.3859fe f0 39 beq $385a39 BEQ GO_LOAD_FILE -.385a00 STOP_SOF -.385a00 af 4c 01 00 lda $00014c LDA @lINT_MASK_REG0 ; stop the timer interrupts -.385a04 09 04 ora #$04 ORA #FNX0_INT02_TMR0 -.385a06 8f 4c 01 00 sta $00014c STA @lINT_MASK_REG0 -.385a0a a9 00 lda #$00 LDA #0 ; record mode -.385a0c 8f 15 0f 38 sta $380f15 STA STATE_MACHINE -.385a10 20 97 72 jsr $387297 JSR RAD_ALL_NOTES_OFF -.385a13 68 pla PLA -.385a14 KB_CHECK_B_DONE_R -.385a14 4c 80 5a jmp $385a80 JMP KB_CHECK_B_DONE -.385a17 START_SOF -.385a17 ad 87 0f lda $0f87 LDA KEYBOARD_SC_FLG -.385a1a d0 06 bne $385a22 BNE CONTINUE_FROM_CURRENT_LOCATION -.385a1c 20 7d 6a jsr $386a7d JSR RESET_STATE_MACHINE -.385a1f 20 61 5e jsr $385e61 JSR DISPLAY_PATTERN -.385a22 CONTINUE_FROM_CURRENT_LOCATION -.385a22 a9 01 lda #$01 LDA #1 -.385a24 8f 15 0f 38 sta $380f15 STA STATE_MACHINE -.385a28 20 b5 72 jsr $3872b5 JSR RAD_PLAYNOTES -.385a2b af 4c 01 00 lda $00014c LDA @lINT_MASK_REG0 -.385a2f 29 fb and #$fb AND #~(FNX0_INT02_TMR0) -.385a31 8f 4c 01 00 sta $00014c STA @lINT_MASK_REG0 -.385a35 68 pla PLA -.385a36 4c 80 5a jmp $385a80 JMP KB_CHECK_B_DONE -.385a39 GO_LOAD_FILE -.385a39 68 pla PLA -.385a3a 22 0f 70 38 jsl $38700f JSL READ_FILE -.385a3e 4c 80 5a jmp $385a80 JMP KB_CHECK_B_DONE -.385a41 ad 87 0f lda $0f87 KB_SET_SHIFT LDA KEYBOARD_SC_FLG -.385a44 09 10 ora #$10 ORA #$10 -.385a46 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG -.385a49 4c 80 5a jmp $385a80 JMP KB_CHECK_B_DONE -.385a4c ad 87 0f lda $0f87 KB_CLR_SHIFT LDA KEYBOARD_SC_FLG -.385a4f 29 ef and #$ef AND #$EF -.385a51 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG -.385a54 4c 80 5a jmp $385a80 JMP KB_CHECK_B_DONE -.385a57 ad 87 0f lda $0f87 KB_SET_CTRL LDA KEYBOARD_SC_FLG -.385a5a 09 20 ora #$20 ORA #$20 -.385a5c 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG -.385a5f 4c 80 5a jmp $385a80 JMP KB_CHECK_B_DONE -.385a62 ad 87 0f lda $0f87 KB_CLR_CTRL LDA KEYBOARD_SC_FLG -.385a65 29 df and #$df AND #$DF -.385a67 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG -.385a6a 4c 80 5a jmp $385a80 JMP KB_CHECK_B_DONE -.385a6d ad 87 0f lda $0f87 KB_SET_ALT LDA KEYBOARD_SC_FLG -.385a70 09 40 ora #$40 ORA #$40 -.385a72 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG -.385a75 4c 80 5a jmp $385a80 JMP KB_CHECK_B_DONE -.385a78 ad 87 0f lda $0f87 KB_CLR_ALT LDA KEYBOARD_SC_FLG -.385a7b 29 bf and #$bf AND #$BF -.385a7d 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG -.385a80 KB_CHECK_B_DONE -.385a80 af 64 10 af lda $af1064 LDA STATUS_PORT ; the address should have $AF -.385a84 29 01 and #$01 AND #OUT_BUF_FULL ; Test bit $01 (if 1, Full) -.385a86 c9 01 cmp #$01 CMP #OUT_BUF_FULL ; if Still Byte in the Buffer, fetch it out -.385a88 d0 03 bne $385a8d BNE KB_DONE -.385a8a 4c 45 58 jmp $385845 JMP IRQ_HANDLER_FETCH -.385a8d KB_DONE -.385a8d 60 rts RTS -.385a8e SOF_INTERRUPT -.385a8e TIMER0_INTERRUPT -.385a8e af 15 0f 38 lda $380f15 LDA STATE_MACHINE ; the SOF is still called even when the interrupt is masked. -.385a92 29 01 and #$01 AND #1 -.385a94 f0 45 beq $385adb BEQ EDIT_MODE -.385a96 af 16 0f 38 lda $380f16 LDA @lTICK -.385a9a 1a inc a INC A -.385a9b cf 69 70 38 cmp $387069 CMP @lTuneInfo.InitialSpeed -.385a9f d0 3c bne $385add BNE TICK_DONE -.385aa1 INCR_LINE -.385aa1 a5 6c lda $6c LDA LINE_NUM_HEX -.385aa3 89 03 bit #$03 BIT #3 -.385aa5 d0 0c bne $385ab3 BNE NO_LED -.385aa7 af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL -.385aab 29 fd and #$fd AND #~GABE_CTRL_SDC_LED -.385aad 09 02 ora #$02 ORA #GABE_CTRL_SDC_LED -.385aaf 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL -.385ab3 NO_LED -.385ab3 18 clc CLC -.385ab4 f8 sed SED -.385ab5 e6 6c inc $6c INC LINE_NUM_HEX -.385ab7 af 19 0f 38 lda $380f19 LDA @lLINE_NUM_DEC -.385abb 69 01 adc #$01 ADC #1 -.385abd c9 65 cmp #$65 CMP #$65 ; this is the maximum number of lines -.385abf d0 07 bne $385ac8 BNE INCR_DONE -.385ac1 a9 01 lda #$01 LDA #1 -.385ac3 64 6c stz $6c STZ LINE_NUM_HEX -.385ac5 20 9e 6a jsr $386a9e JSR INCREMENT_ORDER -.385ac8 INCR_DONE -.385ac8 d8 cld CLD -.385ac9 8f 19 0f 38 sta $380f19 STA @lLINE_NUM_DEC -.385acd 20 61 5e jsr $385e61 JSR DISPLAY_PATTERN -.385ad0 af 15 0f 38 lda $380f15 LDA STATE_MACHINE -.385ad4 29 01 and #$01 AND #1 -.385ad6 f0 03 beq $385adb BEQ EDIT_MODE -.385ad8 20 b5 72 jsr $3872b5 JSR RAD_PLAYNOTES -.385adb EDIT_MODE -.385adb a9 00 lda #$00 LDA #0 ; reset the tick to 0 -.385add TICK_DONE -.385add 8f 16 0f 38 sta $380f16 STA @lTICK -.385ae1 af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL -.385ae5 29 fd and #$fd AND #~GABE_CTRL_SDC_LED -.385ae7 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL -.385aeb 60 rts RTS -.385aec DECR_LINE -.385aec 38 sec SEC -.385aed f8 sed SED -.385aee c6 6c dec $6c DEC LINE_NUM_HEX -.385af0 af 19 0f 38 lda $380f19 LDA @lLINE_NUM_DEC -.385af4 e9 01 sbc #$01 SBC #1 -.385af6 d0 06 bne $385afe BNE DECR_DONE -.385af8 a9 3f lda #$3f LDA #63 -.385afa 85 6c sta $6c STA LINE_NUM_HEX -.385afc a9 64 lda #$64 LDA #$64 -.385afe DECR_DONE -.385afe d8 cld CLD -.385aff 8f 19 0f 38 sta $380f19 STA @lLINE_NUM_DEC -.385b03 20 61 5e jsr $385e61 JSR DISPLAY_PATTERN -.385b06 a9 00 lda #$00 LDA #0 ; reset the tick to 0 -.385b08 8f 16 0f 38 sta $380f16 STA @lTICK -.385b0c 60 rts RTS -.385b0d MPU401_INTERRUPT -.385b0d 48 pha PHA -.385b0e c2 10 rep #$10 REP #$10 ; set X long -.385b10 af 31 13 af lda $af1331 MORE_MIDI_DATA LDA @lMIDI_STATUS_REG ; if bit D7 is low, there is more data to read -.385b14 85 61 sta $61 STA MIDI_REG -.385b16 29 80 and #$80 AND #$80 -.385b18 c9 80 cmp #$80 CMP #$80 -.385b1a f0 0d beq $385b29 BEQ MIDI_DONE -.385b1c af 30 13 af lda $af1330 LDA @lMIDI_DATA_REG -.385b20 20 d9 5b jsr $385bd9 JSR RECEIVE_MIDI_DATA -.385b23 a5 61 lda $61 LDA MIDI_REG -.385b25 c9 80 cmp #$80 CMP #$80 -.385b27 d0 e7 bne $385b10 BNE MORE_MIDI_DATA -.385b29 MIDI_DONE -.385b29 68 pla PLA -.385b2a 60 rts RTS -.385b2b MOUSE_INTERRUPT -.385b2b af 60 10 af lda $af1060 LDA KBD_INPT_BUF -.385b2f 48 pha PHA -.385b30 a2 00 00 ldx #$0000 LDX #$0000 -.385b33 e2 10 sep #$10 SEP #$10 ; set X short -.385b35 a6 e0 ldx $e0 LDX MOUSE_PTR -.385b37 d0 06 bne $385b3f BNE MOUSE_BYTE_GT1 -.385b39 29 07 and #$07 AND #%0111 -.385b3b 8f 00 0f 38 sta $380f00 STA MOUSE_BUTTONS_REG -.385b3f MOUSE_BYTE_GT1 -.385b3f 68 pla PLA -.385b40 9f 06 07 af sta $af0706,x STA @lMOUSE_PTR_BYTE0, X -.385b44 e8 inx INX -.385b45 e0 03 cpx #$03 CPX #$03 -.385b47 d0 2c bne $385b75 BNE EXIT_FOR_NEXT_VALUE -.385b49 af 02 07 af lda $af0702 LDA @lMOUSE_PTR_X_POS_L -.385b4d 85 e1 sta $e1 STA MOUSE_POS_X_LO -.385b4f af 03 07 af lda $af0703 LDA @lMOUSE_PTR_X_POS_H -.385b53 85 e2 sta $e2 STA MOUSE_POS_X_HI -.385b55 af 04 07 af lda $af0704 LDA @lMOUSE_PTR_Y_POS_L -.385b59 85 e3 sta $e3 STA MOUSE_POS_Y_LO -.385b5b af 05 07 af lda $af0705 LDA @lMOUSE_PTR_Y_POS_H -.385b5f 85 e4 sta $e4 STA MOUSE_POS_Y_HI -.385b61 18 clc CLC -.385b62 af 00 0f 38 lda $380f00 LDA MOUSE_BUTTONS_REG -.385b66 c2 10 rep #$10 REP #$10 ; set X long -.385b68 a0 3c 00 ldy #$003c LDY #60 -.385b6b 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385b6e e2 10 sep #$10 SEP #$10 ; set X short -.385b70 20 7a 5b jsr $385b7a JSR MOUSE_BUTTON_HANDLER -.385b73 a2 00 ldx #$00 LDX #$00 -.385b75 EXIT_FOR_NEXT_VALUE -.385b75 86 e0 stx $e0 STX MOUSE_PTR -.385b77 c2 10 rep #$10 REP #$10 ; set X long -.385b79 60 rts RTS -.385b7a MOUSE_BUTTON_HANDLER -.385b7a e2 20 sep #$20 SEP #$20 ; set A short -.385b7c af 00 0f 38 lda $380f00 LDA @lMOUSE_BUTTONS_REG -.385b80 f0 26 beq $385ba8 BEQ MOUSE_CLICK_DONE -.385b82 c2 20 rep #$20 REP #$20 ; set A long -.385b84 18 clc CLC -.385b85 af 02 07 af lda $af0702 LDA @lMOUSE_PTR_X_POS_L -.385b89 4a lsr a LSR -.385b8a 4a lsr a LSR -.385b8b 4a lsr a LSR -.385b8c 85 1a sta $1a STA CURSORX -.385b8e 8f 14 00 af sta $af0014 STA @lVKY_TXT_CURSOR_X_REG_L -.385b92 18 clc CLC -.385b93 af 04 07 af lda $af0704 LDA @lMOUSE_PTR_Y_POS_L -.385b97 4a lsr a LSR -.385b98 4a lsr a LSR -.385b99 4a lsr a LSR -.385b9a 85 1c sta $1c STA CURSORY -.385b9c 8f 16 00 af sta $af0016 STA @lVKY_TXT_CURSOR_Y_REG_L -.385ba0 e2 20 sep #$20 SEP #$20 ; set A short -.385ba2 a9 03 lda #$03 LDA #$03 ;Set Cursor Enabled And Flash Rate @1Hz -.385ba4 8f 10 00 af sta $af0010 STA @lVKY_TXT_CURSOR_CTRL_REG -.385ba8 MOUSE_CLICK_DONE -.385ba8 60 rts RTS -.385ba9 FDC_INTERRUPT -.385ba9 60 rts RTS -.385baa COM2_INTERRUPT -.385baa 60 rts RTS -.385bab COM1_INTERRUPT -.385bab 60 rts RTS -.385bac LPT1_INTERRUPT -.385bac 60 rts RTS -.385bad NMI_HANDLER -.385bad 6b rtl RTL +.3851a4 IRQ_HANDLER +.3851a4 48 pha PHA ; begin setdp macro +.3851a5 08 php PHP +.3851a6 c2 20 rep #$20 REP #$20 ; set A long +.3851a8 a9 00 00 lda #$0000 LDA #0 ; set DP to page 0 +.3851ab 5b tcd TCD +.3851ac 28 plp PLP +.3851ad 68 pla PLA ; end setdp macro +.3851ae e2 20 sep #$20 SEP #$20 ; set A short +.3851b0 a9 00 lda #$00 LDA #0 ; set the data bank register to 0 +.3851b2 48 pha PHA +.3851b3 ab plb PLB +.3851b4 ad 40 01 lda $0140 LDA INT_PENDING_REG0 +.3851b7 f0 2d beq $3851e6 BEQ CHECK_PENDING_REG1 +.3851b9 ad 40 01 lda $0140 LDA INT_PENDING_REG0 +.3851bc 29 04 and #$04 AND #FNX0_INT02_TMR0 +.3851be c9 04 cmp #$04 CMP #FNX0_INT02_TMR0 +.3851c0 d0 06 bne $3851c8 BNE END_CHECK +.3851c2 8d 40 01 sta $0140 STA INT_PENDING_REG0 +.3851c5 20 8e 54 jsr $38548e JSR TIMER0_INTERRUPT +.3851c8 END_CHECK +.3851c8 ad 40 01 lda $0140 LDA INT_PENDING_REG0 +.3851cb 29 40 and #$40 AND #FNX0_INT06_FDC +.3851cd c9 40 cmp #$40 CMP #FNX0_INT06_FDC +.3851cf d0 06 bne $3851d7 BNE END_CHECK +.3851d1 8d 40 01 sta $0140 STA INT_PENDING_REG0 +.3851d4 20 a9 55 jsr $3855a9 JSR FDC_INTERRUPT +.3851d7 END_CHECK +.3851d7 ad 40 01 lda $0140 LDA INT_PENDING_REG0 +.3851da 29 80 and #$80 AND #FNX0_INT07_MOUSE +.3851dc c9 80 cmp #$80 CMP #FNX0_INT07_MOUSE +.3851de d0 06 bne $3851e6 BNE END_CHECK +.3851e0 8d 40 01 sta $0140 STA INT_PENDING_REG0 +.3851e3 20 2b 55 jsr $38552b JSR MOUSE_INTERRUPT +.3851e6 END_CHECK +.3851e6 CHECK_PENDING_REG1 +.3851e6 e2 20 sep #$20 SEP #$20 ; set A short +.3851e8 ad 41 01 lda $0141 LDA INT_PENDING_REG1 +.3851eb f0 4b beq $385238 BEQ CHECK_PENDING_REG2 ; BEQ EXIT_IRQ_HANDLE +.3851ed ad 41 01 lda $0141 LDA INT_PENDING_REG1 +.3851f0 29 01 and #$01 AND #FNX1_INT00_KBD +.3851f2 c9 01 cmp #$01 CMP #FNX1_INT00_KBD +.3851f4 d0 06 bne $3851fc BNE END_CHECK +.3851f6 8d 41 01 sta $0141 STA INT_PENDING_REG1 +.3851f9 20 42 52 jsr $385242 JSR KEYBOARD_INTERRUPT +.3851fc END_CHECK +.3851fc ad 41 01 lda $0141 LDA INT_PENDING_REG1 +.3851ff 29 08 and #$08 AND #FNX1_INT03_COM2 +.385201 c9 08 cmp #$08 CMP #FNX1_INT03_COM2 +.385203 d0 06 bne $38520b BNE END_CHECK +.385205 8d 41 01 sta $0141 STA INT_PENDING_REG1 +.385208 20 aa 55 jsr $3855aa JSR COM2_INTERRUPT +.38520b END_CHECK +.38520b ad 41 01 lda $0141 LDA INT_PENDING_REG1 +.38520e 29 10 and #$10 AND #FNX1_INT04_COM1 +.385210 c9 10 cmp #$10 CMP #FNX1_INT04_COM1 +.385212 d0 06 bne $38521a BNE END_CHECK +.385214 8d 41 01 sta $0141 STA INT_PENDING_REG1 +.385217 20 ab 55 jsr $3855ab JSR COM1_INTERRUPT +.38521a END_CHECK +.38521a ad 41 01 lda $0141 LDA INT_PENDING_REG1 +.38521d 29 20 and #$20 AND #FNX1_INT05_MPU401 +.38521f c9 20 cmp #$20 CMP #FNX1_INT05_MPU401 +.385221 d0 06 bne $385229 BNE END_CHECK +.385223 8d 41 01 sta $0141 STA INT_PENDING_REG1 +.385226 20 0d 55 jsr $38550d JSR MPU401_INTERRUPT +.385229 END_CHECK +.385229 ad 41 01 lda $0141 LDA INT_PENDING_REG1 +.38522c 29 40 and #$40 AND #FNX1_INT06_LPT +.38522e c9 40 cmp #$40 CMP #FNX1_INT06_LPT +.385230 d0 06 bne $385238 BNE END_CHECK +.385232 8d 41 01 sta $0141 STA INT_PENDING_REG1 +.385235 20 ac 55 jsr $3855ac JSR LPT1_INTERRUPT +.385238 END_CHECK +.385238 CHECK_PENDING_REG2 +.385238 e2 20 sep #$20 SEP #$20 ; set A short +.38523a ad 42 01 lda $0142 LDA INT_PENDING_REG2 +.38523d f0 00 beq $38523f BEQ EXIT_IRQ_HANDLE +.38523f EXIT_IRQ_HANDLE +.38523f c2 30 rep #$30 REP #$30 ; set A&X long +.385241 6b rtl RTL +.385242 KEYBOARD_INTERRUPT +.385242 a2 00 00 ldx #$0000 ldx #$0000 +.385245 IRQ_HANDLER_FETCH +.385245 af 60 10 af lda $af1060 LDA KBD_INPT_BUF ; Get Scan Code from KeyBoard +.385249 8d 88 0f sta $0f88 STA KEYBOARD_SC_TMP ; Save Code Immediately +.38524c c2 10 rep #$10 REP #$10 ; set X long +.38524e a0 46 00 ldy #$0046 LDY #70 +.385251 20 b1 57 jsr $3857b1 JSR WRITE_HEX ; print the HEX key code at column 70 on the top line +.385254 c9 01 cmp #$01 CMP #1 ; ESC +.385256 d0 0f bne $385267 BNE NOT_ESCAPE +.385258 af 15 0f 38 lda $380f15 LDA STATE_MACHINE +.38525c c9 02 cmp #$02 CMP #2 +.38525e d0 07 bne $385267 BNE NOT_ESCAPE +.385260 22 47 6a 38 jsl $386a47 JSL EXIT_FILE +.385264 4c e9 53 jmp $3853e9 JMP KB_WR_2_SCREEN +.385267 NOT_ESCAPE +.385267 c9 1a cmp #$1a CMP #$1A ; left bracket +.385269 d0 08 bne $385273 BNE NOT_LEFT_BRACKET +.38526b c6 6a dec $6a DEC INSTR_NUMBER +.38526d 20 4e 65 jsr $38654e JSR LOAD_INSTRUMENT ; X is already set to 0 +.385270 4c e9 53 jmp $3853e9 JMP KB_WR_2_SCREEN +.385273 NOT_LEFT_BRACKET +.385273 c9 1b cmp #$1b CMP #$1B ; right bracket +.385275 d0 08 bne $38527f BNE NOT_RIGHT_BRACKET +.385277 e6 6a inc $6a INC INSTR_NUMBER +.385279 20 4e 65 jsr $38654e JSR LOAD_INSTRUMENT ; X is already set to 0 +.38527c 4c e9 53 jmp $3853e9 JMP KB_WR_2_SCREEN +.38527f NOT_RIGHT_BRACKET +.38527f c9 0c cmp #$0c CMP #$0C ; minus +.385281 d0 1f bne $3852a2 BNE NOT_MINUS +.385283 af 15 0f 38 lda $380f15 LDA STATE_MACHINE ; only allow for this in edit mode +.385287 29 0f and #$0f AND #$F +.385289 d0 14 bne $38529f BNE MINUS_DONE +.38528b af 18 0f 38 lda $380f18 LDA PATTERN_NUM +.38528f c9 01 cmp #$01 CMP #1 +.385291 f0 0c beq $38529f BEQ MINUS_DONE +.385293 f8 sed SED ; switch to decimal +.385294 38 sec SEC +.385295 e9 01 sbc #$01 SBC #1 +.385297 8f 18 0f 38 sta $380f18 STA PATTERN_NUM +.38529b d8 cld CLD ; switch out of decimal +.38529c 20 61 58 jsr $385861 JSR DISPLAY_PATTERN +.38529f MINUS_DONE +.38529f 4c e9 53 jmp $3853e9 JMP KB_WR_2_SCREEN +.3852a2 NOT_MINUS +.3852a2 c9 0d cmp #$0d CMP #$0D ; plus +.3852a4 d0 1f bne $3852c5 BNE BPM_KEYS +.3852a6 af 15 0f 38 lda $380f15 LDA STATE_MACHINE ; only allow for this in edit mode +.3852aa 29 0f and #$0f AND #$F +.3852ac d0 14 bne $3852c2 BNE PLUS_DONE +.3852ae af 18 0f 38 lda $380f18 LDA PATTERN_NUM +.3852b2 c9 30 cmp #$30 CMP #$30 +.3852b4 f0 0c beq $3852c2 BEQ PLUS_DONE +.3852b6 f8 sed SED ; switch to decimal +.3852b7 18 clc CLC +.3852b8 69 01 adc #$01 ADC #1 +.3852ba 8f 18 0f 38 sta $380f18 STA PATTERN_NUM +.3852be d8 cld CLD ; switch out of decimal +.3852bf 20 61 58 jsr $385861 JSR DISPLAY_PATTERN +.3852c2 PLUS_DONE +.3852c2 4c e9 53 jmp $3853e9 JMP KB_WR_2_SCREEN +.3852c5 BPM_KEYS +.3852c5 c9 27 cmp #$27 CMP #$27 ; semi-colon +.3852c7 d0 0b bne $3852d4 BNE NOT_SEMI_COLON +.3852c9 af 17 0f 38 lda $380f17 LDA BPM +.3852cd c9 04 cmp #$04 CMP #4 +.3852cf f0 f1 beq $3852c2 BEQ PLUS_DONE +.3852d1 3a dec a DEC A +.3852d2 80 0d bra $3852e1 BRA SETUP_TIMER +.3852d4 NOT_SEMI_COLON +.3852d4 c9 28 cmp #$28 CMP #$28 ; quote +.3852d6 d0 16 bne $3852ee BNE TRY_GRAVE +.3852d8 af 17 0f 38 lda $380f17 LDA BPM +.3852dc c9 f0 cmp #$f0 CMP #240 +.3852de f0 e2 beq $3852c2 BEQ PLUS_DONE +.3852e0 1a inc a INC A +.3852e1 SETUP_TIMER +.3852e1 8f 17 0f 38 sta $380f17 STA BPM +.3852e5 20 c9 5a jsr $385ac9 JSR DISPLAY_BPM +.3852e8 20 c1 64 jsr $3864c1 JSR INIT_TIMER0_BPM +.3852eb 4c e9 53 jmp $3853e9 JMP KB_WR_2_SCREEN +.3852ee TRY_GRAVE +.3852ee c9 29 cmp #$29 CMP #$29 +.3852f0 d0 1c bne $38530e BNE SPECIAL_KEYS +.3852f2 a9 00 lda #$00 LDA #0 +.3852f4 eb xba XBA +.3852f5 af 15 0f 38 lda $380f15 LDA STATE_MACHINE +.3852f9 48 pha PHA +.3852fa 29 30 and #$30 AND #$30 +.3852fc 4a lsr a LSR +.3852fd 4a lsr a LSR +.3852fe aa tax TAX +.3852ff 68 pla PLA +.385300 5f cd 5a 38 eor $385acd,x EOR HL_CLR_TABLE+3,X +.385304 8f 15 0f 38 sta $380f15 STA STATE_MACHINE +.385308 20 d6 5a jsr $385ad6 JSR HIGHLIGHT_MODE +.38530b 4c e9 53 jmp $3853e9 JMP KB_WR_2_SCREEN +.38530e SPECIAL_KEYS +.38530e c9 2a cmp #$2a CMP #$2A ; Left Shift Pressed +.385310 d0 03 bne $385315 BNE NOT_KB_SET_SHIFT +.385312 82 2c 01 brl $385441 BRL KB_SET_SHIFT +.385315 NOT_KB_SET_SHIFT +.385315 c9 aa cmp #$aa CMP #$AA ; Left Shift Unpressed +.385317 d0 03 bne $38531c BNE NOT_KB_CLR_SHIFT +.385319 82 30 01 brl $38544c BRL KB_CLR_SHIFT +.38531c NOT_KB_CLR_SHIFT +.38531c c9 1d cmp #$1d CMP #$1D ; Left CTRL pressed +.38531e d0 03 bne $385323 BNE NOT_KB_SET_CTRL +.385320 82 34 01 brl $385457 BRL KB_SET_CTRL +.385323 NOT_KB_SET_CTRL +.385323 c9 9d cmp #$9d CMP #$9D ; Left CTRL Unpressed +.385325 d0 03 bne $38532a BNE NOT_KB_CLR_CTRL +.385327 82 38 01 brl $385462 BRL KB_CLR_CTRL +.38532a NOT_KB_CLR_CTRL +.38532a c9 38 cmp #$38 CMP #$38 ; Left ALT Pressed +.38532c d0 03 bne $385331 BNE NOT_KB_SET_ALT +.38532e 82 3c 01 brl $38546d BRL KB_SET_ALT +.385331 NOT_KB_SET_ALT +.385331 c9 b8 cmp #$b8 CMP #$B8 ; Left ALT Unpressed +.385333 d0 03 bne $385338 BNE NOT_SPECIAL +.385335 82 40 01 brl $385478 BRL KB_CLR_ALT +.385338 NOT_SPECIAL +.385338 c9 48 cmp #$48 CMP #$48 ; UP arrow +.38533a d0 18 bne $385354 BNE NOT_UP +.38533c 48 pha PHA +.38533d af 15 0f 38 lda $380f15 LDA STATE_MACHINE +.385341 29 0f and #$0f AND #$F +.385343 d0 03 bne $385348 BNE UP_WRONG_STATE +.385345 20 ec 54 jsr $3854ec JSR DECR_LINE +.385348 UP_WRONG_STATE +.385348 c9 02 cmp #$02 CMP #2 +.38534a d0 04 bne $385350 BNE UP_WRG_DONE +.38534c 22 6b 5c 38 jsl $385c6b JSL SELECT_PREVIOUS_FILE +.385350 UP_WRG_DONE +.385350 68 pla PLA +.385351 4c e9 53 jmp $3853e9 JMP KB_WR_2_SCREEN +.385354 NOT_UP +.385354 c9 50 cmp #$50 CMP #$50 ; DOWN arrow +.385356 d0 18 bne $385370 BNE NOT_DOWN +.385358 48 pha PHA +.385359 af 15 0f 38 lda $380f15 LDA STATE_MACHINE +.38535d 29 0f and #$0f AND #$F +.38535f d0 03 bne $385364 BNE DOWN_WRONG_STATE +.385361 20 a1 54 jsr $3854a1 JSR INCR_LINE +.385364 DOWN_WRONG_STATE +.385364 c9 02 cmp #$02 CMP #2 +.385366 d0 04 bne $38536c BNE DOWN_WRG_DONE +.385368 22 52 5c 38 jsl $385c52 JSL SELECT_NEXT_FILE +.38536c DOWN_WRG_DONE +.38536c 68 pla PLA +.38536d 4c e9 53 jmp $3853e9 JMP KB_WR_2_SCREEN +.385370 NOT_DOWN +.385370 KB_UNPRESSED +.385370 29 80 and #$80 AND #$80 ; See if the Scan Code is press or Depressed +.385372 c9 80 cmp #$80 CMP #$80 ; Depress Status - We will not do anything at this point +.385374 d0 0a bne $385380 BNE KB_NORM_SC +.385376 a9 00 lda #$00 LDA #$00 +.385378 85 32 sta $32 STA OPL2_PARAMETER0 ; Set Keyon False +.38537a 20 c6 36 jsr $3836c6 JSR OPL2_SET_KEYON +.38537d 82 00 01 brl $385480 BRL KB_CHECK_B_DONE +.385380 KB_NORM_SC +.385380 ad 88 0f lda $0f88 LDA KEYBOARD_SC_TMP +.385383 e2 10 sep #$10 SEP #$10 ; set X short +.385385 aa tax TAX +.385386 ad 87 0f lda $0f87 LDA KEYBOARD_SC_FLG ; Check to See if the SHIFT Key is being Pushed +.385389 29 10 and #$10 AND #$10 +.38538b c9 10 cmp #$10 CMP #$10 +.38538d f0 26 beq $3853b5 BEQ SHIFT_KEY_ON +.38538f ad 87 0f lda $0f87 LDA KEYBOARD_SC_FLG ; Check to See if the CTRL Key is being Pushed +.385392 29 20 and #$20 AND #$20 +.385394 c9 20 cmp #$20 CMP #$20 +.385396 f0 24 beq $3853bc BEQ CTRL_KEY_ON +.385398 ad 87 0f lda $0f87 LDA KEYBOARD_SC_FLG ; Check to See if the ALT Key is being Pushed +.38539b 29 40 and #$40 AND #$40 +.38539d c9 40 cmp #$40 CMP #$40 +.38539f f0 35 beq $3853d6 BEQ ALT_KEY_ON +.3853a1 c2 10 rep #$10 REP #$10 ; set X long +.3853a3 ad 88 0f lda $0f88 LDA KEYBOARD_SC_TMP +.3853a6 20 71 68 jsr $386871 JSR PLAY_TRACKER_NOTE +.3853a9 e2 10 sep #$10 SEP #$10 ; set X short +.3853ab ae 88 0f ldx $0f88 LDX KEYBOARD_SC_TMP +.3853ae bf 00 39 38 lda $383900,x LDA @lScanCode_Press_Set1, x +.3853b2 82 34 00 brl $3853e9 BRL KB_WR_2_SCREEN +.3853b5 bf 80 39 38 lda $383980,x SHIFT_KEY_ON LDA @lScanCode_Shift_Set1, x +.3853b9 82 2d 00 brl $3853e9 BRL KB_WR_2_SCREEN +.3853bc bf 00 3a 38 lda $383a00,x CTRL_KEY_ON LDA @lScanCode_Ctrl_Set1, x +.3853c0 f0 27 beq $3853e9 BEQ KB_WR_2_SCREEN +.3853c2 c9 02 cmp #$02 CMP #2 +.3853c4 d0 0e bne $3853d4 BNE CONTINUE_KEY +.3853c6 af 15 0f 38 lda $380f15 LDA STATE_MACHINE ; check if the load file screen is already opened +.3853ca 29 0f and #$0f AND #$F +.3853cc c9 02 cmp #$02 CMP #2 +.3853ce f0 04 beq $3853d4 BEQ CONTINUE_KEY +.3853d0 22 3a 69 38 jsl $38693a JSL LOAD_FILE_DISPLAY +.3853d4 CONTINUE_KEY +.3853d4 80 13 bra $3853e9 BRA KB_WR_2_SCREEN +.3853d6 bf 80 3a 38 lda $383a80,x ALT_KEY_ON LDA @lScanCode_Alt_Set1, x +.3853da f0 0d beq $3853e9 BEQ KB_WR_2_SCREEN +.3853dc 29 0f and #$0f AND #$F +.3853de 20 bb 68 jsr $3868bb JSR TOGGLE_CHANNEL +.3853e1 c2 10 rep #$10 REP #$10 ; set X long +.3853e3 20 6d 5b jsr $385b6d JSR DISPLAY_ACTIVE_CHANNELS +.3853e6 e2 10 sep #$10 SEP #$10 ; set X short +.3853e8 60 rts RTS ; early exit +.3853e9 KB_WR_2_SCREEN +.3853e9 c2 10 rep #$10 REP #$10 ; set X long +.3853eb a0 4a 00 ldy #$004a LDY #74 +.3853ee 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3853f1 c9 0d cmp #$0d CMP #$0D ; Enter Key Pressed +.3853f3 d0 1f bne $385414 BNE KB_CHECK_B_DONE_R +.3853f5 48 pha PHA +.3853f6 af 15 0f 38 lda $380f15 LDA STATE_MACHINE +.3853fa f0 1b beq $385417 BEQ START_SOF ; if zero then start playing +.3853fc c9 02 cmp #$02 CMP #2 +.3853fe f0 39 beq $385439 BEQ GO_LOAD_FILE +.385400 STOP_SOF +.385400 af 4c 01 00 lda $00014c LDA @lINT_MASK_REG0 ; stop the timer interrupts +.385404 09 04 ora #$04 ORA #FNX0_INT02_TMR0 +.385406 8f 4c 01 00 sta $00014c STA @lINT_MASK_REG0 +.38540a a9 00 lda #$00 LDA #0 ; record mode +.38540c 8f 15 0f 38 sta $380f15 STA STATE_MACHINE +.385410 20 97 6c jsr $386c97 JSR RAD_ALL_NOTES_OFF +.385413 68 pla PLA +.385414 KB_CHECK_B_DONE_R +.385414 4c 80 54 jmp $385480 JMP KB_CHECK_B_DONE +.385417 START_SOF +.385417 ad 87 0f lda $0f87 LDA KEYBOARD_SC_FLG +.38541a d0 06 bne $385422 BNE CONTINUE_FROM_CURRENT_LOCATION +.38541c 20 79 64 jsr $386479 JSR RESET_STATE_MACHINE +.38541f 20 61 58 jsr $385861 JSR DISPLAY_PATTERN +.385422 CONTINUE_FROM_CURRENT_LOCATION +.385422 a9 01 lda #$01 LDA #1 +.385424 8f 15 0f 38 sta $380f15 STA STATE_MACHINE +.385428 20 b5 6c jsr $386cb5 JSR RAD_PLAYNOTES +.38542b af 4c 01 00 lda $00014c LDA @lINT_MASK_REG0 +.38542f 29 fb and #$fb AND #~(FNX0_INT02_TMR0) +.385431 8f 4c 01 00 sta $00014c STA @lINT_MASK_REG0 +.385435 68 pla PLA +.385436 4c 80 54 jmp $385480 JMP KB_CHECK_B_DONE +.385439 GO_LOAD_FILE +.385439 68 pla PLA +.38543a 22 0f 6a 38 jsl $386a0f JSL READ_FILE +.38543e 4c 80 54 jmp $385480 JMP KB_CHECK_B_DONE +.385441 ad 87 0f lda $0f87 KB_SET_SHIFT LDA KEYBOARD_SC_FLG +.385444 09 10 ora #$10 ORA #$10 +.385446 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG +.385449 4c 80 54 jmp $385480 JMP KB_CHECK_B_DONE +.38544c ad 87 0f lda $0f87 KB_CLR_SHIFT LDA KEYBOARD_SC_FLG +.38544f 29 ef and #$ef AND #$EF +.385451 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG +.385454 4c 80 54 jmp $385480 JMP KB_CHECK_B_DONE +.385457 ad 87 0f lda $0f87 KB_SET_CTRL LDA KEYBOARD_SC_FLG +.38545a 09 20 ora #$20 ORA #$20 +.38545c 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG +.38545f 4c 80 54 jmp $385480 JMP KB_CHECK_B_DONE +.385462 ad 87 0f lda $0f87 KB_CLR_CTRL LDA KEYBOARD_SC_FLG +.385465 29 df and #$df AND #$DF +.385467 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG +.38546a 4c 80 54 jmp $385480 JMP KB_CHECK_B_DONE +.38546d ad 87 0f lda $0f87 KB_SET_ALT LDA KEYBOARD_SC_FLG +.385470 09 40 ora #$40 ORA #$40 +.385472 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG +.385475 4c 80 54 jmp $385480 JMP KB_CHECK_B_DONE +.385478 ad 87 0f lda $0f87 KB_CLR_ALT LDA KEYBOARD_SC_FLG +.38547b 29 bf and #$bf AND #$BF +.38547d 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG +.385480 KB_CHECK_B_DONE +.385480 af 64 10 af lda $af1064 LDA STATUS_PORT ; the address should have $AF +.385484 29 01 and #$01 AND #OUT_BUF_FULL ; Test bit $01 (if 1, Full) +.385486 c9 01 cmp #$01 CMP #OUT_BUF_FULL ; if Still Byte in the Buffer, fetch it out +.385488 d0 03 bne $38548d BNE KB_DONE +.38548a 4c 45 52 jmp $385245 JMP IRQ_HANDLER_FETCH +.38548d KB_DONE +.38548d 60 rts RTS +.38548e SOF_INTERRUPT +.38548e TIMER0_INTERRUPT +.38548e af 15 0f 38 lda $380f15 LDA STATE_MACHINE ; the SOF is still called even when the interrupt is masked. +.385492 29 01 and #$01 AND #1 +.385494 f0 45 beq $3854db BEQ EDIT_MODE +.385496 af 16 0f 38 lda $380f16 LDA @lTICK +.38549a 1a inc a INC A +.38549b cf 69 6a 38 cmp $386a69 CMP @lTuneInfo.InitialSpeed +.38549f d0 3c bne $3854dd BNE TICK_DONE +.3854a1 INCR_LINE +.3854a1 a5 6c lda $6c LDA LINE_NUM_HEX +.3854a3 89 03 bit #$03 BIT #3 +.3854a5 d0 0c bne $3854b3 BNE NO_LED +.3854a7 af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL +.3854ab 29 fd and #$fd AND #~GABE_CTRL_SDC_LED +.3854ad 09 02 ora #$02 ORA #GABE_CTRL_SDC_LED +.3854af 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL +.3854b3 NO_LED +.3854b3 18 clc CLC +.3854b4 f8 sed SED +.3854b5 e6 6c inc $6c INC LINE_NUM_HEX +.3854b7 af 19 0f 38 lda $380f19 LDA @lLINE_NUM_DEC +.3854bb 69 01 adc #$01 ADC #1 +.3854bd c9 65 cmp #$65 CMP #$65 ; this is the maximum number of lines +.3854bf d0 07 bne $3854c8 BNE INCR_DONE +.3854c1 a9 01 lda #$01 LDA #1 +.3854c3 64 6c stz $6c STZ LINE_NUM_HEX +.3854c5 20 9a 64 jsr $38649a JSR INCREMENT_ORDER +.3854c8 INCR_DONE +.3854c8 d8 cld CLD +.3854c9 8f 19 0f 38 sta $380f19 STA @lLINE_NUM_DEC +.3854cd 20 61 58 jsr $385861 JSR DISPLAY_PATTERN +.3854d0 af 15 0f 38 lda $380f15 LDA STATE_MACHINE +.3854d4 29 01 and #$01 AND #1 +.3854d6 f0 03 beq $3854db BEQ EDIT_MODE +.3854d8 20 b5 6c jsr $386cb5 JSR RAD_PLAYNOTES +.3854db EDIT_MODE +.3854db a9 00 lda #$00 LDA #0 ; reset the tick to 0 +.3854dd TICK_DONE +.3854dd 8f 16 0f 38 sta $380f16 STA @lTICK +.3854e1 af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL +.3854e5 29 fd and #$fd AND #~GABE_CTRL_SDC_LED +.3854e7 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL +.3854eb 60 rts RTS +.3854ec DECR_LINE +.3854ec 38 sec SEC +.3854ed f8 sed SED +.3854ee c6 6c dec $6c DEC LINE_NUM_HEX +.3854f0 af 19 0f 38 lda $380f19 LDA @lLINE_NUM_DEC +.3854f4 e9 01 sbc #$01 SBC #1 +.3854f6 d0 06 bne $3854fe BNE DECR_DONE +.3854f8 a9 3f lda #$3f LDA #63 +.3854fa 85 6c sta $6c STA LINE_NUM_HEX +.3854fc a9 64 lda #$64 LDA #$64 +.3854fe DECR_DONE +.3854fe d8 cld CLD +.3854ff 8f 19 0f 38 sta $380f19 STA @lLINE_NUM_DEC +.385503 20 61 58 jsr $385861 JSR DISPLAY_PATTERN +.385506 a9 00 lda #$00 LDA #0 ; reset the tick to 0 +.385508 8f 16 0f 38 sta $380f16 STA @lTICK +.38550c 60 rts RTS +.38550d MPU401_INTERRUPT +.38550d 48 pha PHA +.38550e c2 10 rep #$10 REP #$10 ; set X long +.385510 af 31 13 af lda $af1331 MORE_MIDI_DATA LDA @lMIDI_STATUS_REG ; if bit D7 is low, there is more data to read +.385514 85 61 sta $61 STA MIDI_REG +.385516 29 80 and #$80 AND #$80 +.385518 c9 80 cmp #$80 CMP #$80 +.38551a f0 0d beq $385529 BEQ MIDI_DONE +.38551c af 30 13 af lda $af1330 LDA @lMIDI_DATA_REG +.385520 20 d9 55 jsr $3855d9 JSR RECEIVE_MIDI_DATA +.385523 a5 61 lda $61 LDA MIDI_REG +.385525 c9 80 cmp #$80 CMP #$80 +.385527 d0 e7 bne $385510 BNE MORE_MIDI_DATA +.385529 MIDI_DONE +.385529 68 pla PLA +.38552a 60 rts RTS +.38552b MOUSE_INTERRUPT +.38552b af 60 10 af lda $af1060 LDA KBD_INPT_BUF +.38552f 48 pha PHA +.385530 a2 00 00 ldx #$0000 LDX #$0000 +.385533 e2 10 sep #$10 SEP #$10 ; set X short +.385535 a6 e0 ldx $e0 LDX MOUSE_PTR +.385537 d0 06 bne $38553f BNE MOUSE_BYTE_GT1 +.385539 29 07 and #$07 AND #%0111 +.38553b 8f 00 0f 38 sta $380f00 STA MOUSE_BUTTONS_REG +.38553f MOUSE_BYTE_GT1 +.38553f 68 pla PLA +.385540 9f 06 07 af sta $af0706,x STA @lMOUSE_PTR_BYTE0, X +.385544 e8 inx INX +.385545 e0 03 cpx #$03 CPX #$03 +.385547 d0 2c bne $385575 BNE EXIT_FOR_NEXT_VALUE +.385549 af 02 07 af lda $af0702 LDA @lMOUSE_PTR_X_POS_L +.38554d 85 e1 sta $e1 STA MOUSE_POS_X_LO +.38554f af 03 07 af lda $af0703 LDA @lMOUSE_PTR_X_POS_H +.385553 85 e2 sta $e2 STA MOUSE_POS_X_HI +.385555 af 04 07 af lda $af0704 LDA @lMOUSE_PTR_Y_POS_L +.385559 85 e3 sta $e3 STA MOUSE_POS_Y_LO +.38555b af 05 07 af lda $af0705 LDA @lMOUSE_PTR_Y_POS_H +.38555f 85 e4 sta $e4 STA MOUSE_POS_Y_HI +.385561 18 clc CLC +.385562 af 00 0f 38 lda $380f00 LDA MOUSE_BUTTONS_REG +.385566 c2 10 rep #$10 REP #$10 ; set X long +.385568 a0 3c 00 ldy #$003c LDY #60 +.38556b 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38556e e2 10 sep #$10 SEP #$10 ; set X short +.385570 20 7a 55 jsr $38557a JSR MOUSE_BUTTON_HANDLER +.385573 a2 00 ldx #$00 LDX #$00 +.385575 EXIT_FOR_NEXT_VALUE +.385575 86 e0 stx $e0 STX MOUSE_PTR +.385577 c2 10 rep #$10 REP #$10 ; set X long +.385579 60 rts RTS +.38557a MOUSE_BUTTON_HANDLER +.38557a e2 20 sep #$20 SEP #$20 ; set A short +.38557c af 00 0f 38 lda $380f00 LDA @lMOUSE_BUTTONS_REG +.385580 f0 26 beq $3855a8 BEQ MOUSE_CLICK_DONE +.385582 c2 20 rep #$20 REP #$20 ; set A long +.385584 18 clc CLC +.385585 af 02 07 af lda $af0702 LDA @lMOUSE_PTR_X_POS_L +.385589 4a lsr a LSR +.38558a 4a lsr a LSR +.38558b 4a lsr a LSR +.38558c 85 1a sta $1a STA CURSORX +.38558e 8f 14 00 af sta $af0014 STA @lVKY_TXT_CURSOR_X_REG_L +.385592 18 clc CLC +.385593 af 04 07 af lda $af0704 LDA @lMOUSE_PTR_Y_POS_L +.385597 4a lsr a LSR +.385598 4a lsr a LSR +.385599 4a lsr a LSR +.38559a 85 1c sta $1c STA CURSORY +.38559c 8f 16 00 af sta $af0016 STA @lVKY_TXT_CURSOR_Y_REG_L +.3855a0 e2 20 sep #$20 SEP #$20 ; set A short +.3855a2 a9 03 lda #$03 LDA #$03 ;Set Cursor Enabled And Flash Rate @1Hz +.3855a4 8f 10 00 af sta $af0010 STA @lVKY_TXT_CURSOR_CTRL_REG +.3855a8 MOUSE_CLICK_DONE +.3855a8 60 rts RTS +.3855a9 FDC_INTERRUPT +.3855a9 60 rts RTS +.3855aa COM2_INTERRUPT +.3855aa 60 rts RTS +.3855ab COM1_INTERRUPT +.3855ab 60 rts RTS +.3855ac LPT1_INTERRUPT +.3855ac 60 rts RTS +.3855ad NMI_HANDLER +.3855ad 6b rtl RTL ;****** Return to file: tracker.asm @@ -4725,959 +4619,959 @@ =$af1331 MIDI_STATUS_REG = $AF1331 ; read - status, write control =$af1160 MIDI_ADDRESS_HI = $AF1160 =$af1161 MIDI_ADDRESS_LO = $AF1161 -.385bae INIT_MIDI -.385bae 48 pha PHA -.385baf e2 20 sep #$20 SEP #$20 ; set A short -.385bb1 64 60 stz $60 STZ MIDI_COUNTER -.385bb3 64 66 stz $66 STZ TIMING_CNTR -.385bb5 a9 05 lda #$05 LDA #5 ; (C256 - MIDI IN) Bit[0] = 1, Bit[2] = 1 (Page 132 Manual) -.385bb7 8f 30 11 af sta $af1130 STA @lGP25_REG -.385bbb a9 3f lda #$3f LDA #$3F -.385bbd 8f 31 13 af sta $af1331 STA @lMIDI_STATUS_REG -.385bc1 a0 46 05 ldy #$0546 LDY #10 * 128 + 70 -.385bc4 af 30 13 af lda $af1330 MORE_DATA LDA @lMIDI_DATA_REG -.385bc8 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385bcb c8 iny INY -.385bcc c8 iny INY -.385bcd af 31 13 af lda $af1331 LDA @lMIDI_STATUS_REG -.385bd1 29 80 and #$80 AND #$80 -.385bd3 c9 80 cmp #$80 CMP #$80 -.385bd5 d0 ed bne $385bc4 BNE MORE_DATA -.385bd7 INIT_MIDI_DONE -.385bd7 68 pla PLA -.385bd8 60 rts RTS -.385bd9 RECEIVE_MIDI_DATA -.385bd9 c2 10 rep #$10 REP #$10 ; set X long -.385bdb 48 pha PHA -.385bdc 10 16 bpl $385bf4 BPL RECEIVED_DATA_MSG -.385bde 48 pha PHA -.385bdf 29 0f and #$0f AND #$F ; channel - store it somewhere when you care -.385be1 85 63 sta $63 STA MIDI_CHANNEL -.385be3 68 pla PLA -.385be4 29 70 and #$70 AND #$70 -.385be6 4a lsr a LSR -.385be7 4a lsr a LSR -.385be8 4a lsr a LSR -.385be9 85 62 sta $62 STA MIDI_CTRL -.385beb c9 0e cmp #$0e CMP #$E -.385bed d0 11 bne $385c00 BNE RECEIVE_MIDI_DATA_DONE -.385bef 20 c2 5c jsr $385cc2 JSR SYSTEM_COMMAND -.385bf2 80 0c bra $385c00 BRA RECEIVE_MIDI_DATA_DONE -.385bf4 RECEIVED_DATA_MSG -.385bf4 48 pha PHA -.385bf5 e2 10 sep #$10 SEP #$10 ; set X short -.385bf7 a5 62 lda $62 LDA MIDI_CTRL -.385bf9 aa tax TAX -.385bfa 68 pla PLA -.385bfb fc 2c 6f jsr ($386f2c,x) JSR (MIDI_COMMAND_TABLE,X) -.385bfe c2 10 rep #$10 REP #$10 ; set X long -.385c00 RECEIVE_MIDI_DATA_DONE -.385c00 68 pla PLA -.385c01 60 rts RTS -.385c02 NOTE_OFF -.385c02 NOTE_ON -.385c02 a6 60 ldx $60 LDX MIDI_COUNTER -.385c04 95 64 sta $64,x STA MIDI_DATA1,X -.385c06 8a txa TXA -.385c07 1a inc a INC A -.385c08 85 60 sta $60 STA MIDI_COUNTER -.385c0a c9 02 cmp #$02 CMP #2 -.385c0c d0 71 bne $385c7f BNE MORE_NOTE_DATA_NEEDED -.385c0e 64 60 stz $60 STZ MIDI_COUNTER ; reset the counter -.385c10 a9 00 lda #$00 LDA #0 -.385c12 85 27 sta $27 STA OPL2_CHANNEL -.385c14 c2 10 rep #$10 REP #$10 ; set X long -.385c16 a5 62 lda $62 LDA MIDI_CTRL -.385c18 a0 42 06 ldy #$0642 LDY #12*128 + 66 -.385c1b 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385c1e a5 64 lda $64 LDA MIDI_DATA1 -.385c20 8f 12 01 00 sta $000112 STA @lD0_OPERAND_B -.385c24 a0 44 06 ldy #$0644 LDY #12*128 + 68 -.385c27 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385c2a a9 00 lda #$00 LDA #0 -.385c2c 8f 11 01 00 sta $000111 STA @lD0_OPERAND_A + 1 -.385c30 8f 13 01 00 sta $000113 STA @lD0_OPERAND_B + 1 -.385c34 a9 0c lda #$0c LDA #12 -.385c36 8f 10 01 00 sta $000110 STA @lD0_OPERAND_A -.385c3a 38 sec SEC -.385c3b af 14 01 00 lda $000114 LDA @lD0_RESULT -.385c3f e9 02 sbc #$02 SBC #2 -.385c41 85 31 sta $31 STA OPL2_OCTAVE -.385c43 a0 48 06 ldy #$0648 LDY #12*128 + 72 -.385c46 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385c49 af 16 01 00 lda $000116 LDA @lD0_REMAINDER -.385c4d 85 30 sta $30 STA OPL2_NOTE -.385c4f a0 4a 06 ldy #$064a LDY #12*128 + 74 -.385c52 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385c55 a5 65 lda $65 LDA MIDI_DATA2 -.385c57 a0 4c 06 ldy #$064c LDY #12*128 + 76 -.385c5a 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385c5d c9 00 cmp #$00 CMP #0 -.385c5f d0 0f bne $385c70 BNE PLAY_NOTE_ON ; otherwise, turn note on -.385c61 85 32 sta $32 STA OPL2_PARAMETER0 -.385c63 a9 ff lda #$ff LDA #$FF -.385c65 a0 4e 06 ldy #$064e LDY #12*128 + 78 -.385c68 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385c6b 20 c6 36 jsr $3836c6 JSR OPL2_SET_KEYON -.385c6e 80 0f bra $385c7f BRA MORE_NOTE_DATA_NEEDED -.385c70 PLAY_NOTE_ON -.385c70 a9 01 lda #$01 LDA #1 -.385c72 85 32 sta $32 STA OPL2_PARAMETER0 -.385c74 c2 20 rep #$20 REP #$20 ; set A long -.385c76 20 f5 37 jsr $3837f5 JSR OPL2_GET_REG_OFFSET -.385c79 22 01 32 38 jsl $383201 JSL OPL2_PLAYNOTE -.385c7d e2 20 sep #$20 SEP #$20 ; set A short -.385c7f MORE_NOTE_DATA_NEEDED -.385c7f e2 10 sep #$10 SEP #$10 ; set X short -.385c81 60 rts RTS -.385c82 POLY_PRESSURE -.385c82 CONTROL_CHANGE -.385c82 PITCH_BEND -.385c82 a6 60 ldx $60 LDX MIDI_COUNTER -.385c84 95 64 sta $64,x STA MIDI_DATA1,X -.385c86 8a txa TXA -.385c87 1a inc a INC A -.385c88 85 60 sta $60 STA MIDI_COUNTER -.385c8a c9 02 cmp #$02 CMP #2 -.385c8c d0 1c bne $385caa BNE MORE_CTRL_DATA_NEEDED -.385c8e c2 10 rep #$10 REP #$10 ; set X long -.385c90 a5 62 lda $62 LDA MIDI_CTRL -.385c92 a0 42 07 ldy #$0742 LDY #14*128 + 66 -.385c95 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385c98 a5 64 lda $64 LDA MIDI_DATA1 -.385c9a a0 44 07 ldy #$0744 LDY #14*128+68 -.385c9d 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385ca0 a5 65 lda $65 LDA MIDI_DATA2 -.385ca2 a0 46 07 ldy #$0746 LDY #14*128+70 -.385ca5 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385ca8 64 60 stz $60 STZ MIDI_COUNTER -.385caa MORE_CTRL_DATA_NEEDED -.385caa 60 rts RTS -.385cab PROGRAM_CHANGE -.385cab CHANNEL_PRESSURE -.385cab 48 pha PHA -.385cac c2 10 rep #$10 REP #$10 ; set X long -.385cae a5 62 lda $62 LDA MIDI_CTRL -.385cb0 a0 c2 07 ldy #$07c2 LDY #15*128 + 66 -.385cb3 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385cb6 68 pla PLA -.385cb7 a0 c4 07 ldy #$07c4 LDY #15*128 + 68 -.385cba 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385cbd a9 10 lda #$10 LDA #16 -.385cbf 85 62 sta $62 STA MIDI_CTRL -.385cc1 60 rts RTS -.385cc2 SYSTEM_COMMAND -.385cc2 c2 10 rep #$10 REP #$10 ; set X long -.385cc4 af 66 00 00 lda $000066 LDA @lTIMING_CNTR -.385cc8 1a inc a INC A -.385cc9 c9 03 cmp #$03 CMP #3 -.385ccb d0 02 bne $385ccf BNE DISPLAY_COUNTER -.385ccd a9 00 lda #$00 LDA #0 -.385ccf DISPLAY_COUNTER -.385ccf a0 42 08 ldy #$0842 LDY #16*128 + 66 -.385cd2 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385cd5 8f 66 00 00 sta $000066 STA @lTIMING_CNTR -.385cd9 60 rts RTS -.385cda INVALID_COMMAND -.385cda 60 rts RTS +.3855ae INIT_MIDI +.3855ae 48 pha PHA +.3855af e2 20 sep #$20 SEP #$20 ; set A short +.3855b1 64 60 stz $60 STZ MIDI_COUNTER +.3855b3 64 66 stz $66 STZ TIMING_CNTR +.3855b5 a9 05 lda #$05 LDA #5 ; (C256 - MIDI IN) Bit[0] = 1, Bit[2] = 1 (Page 132 Manual) +.3855b7 8f 30 11 af sta $af1130 STA @lGP25_REG +.3855bb a9 3f lda #$3f LDA #$3F +.3855bd 8f 31 13 af sta $af1331 STA @lMIDI_STATUS_REG +.3855c1 a0 66 03 ldy #$0366 LDY #10 * SCREEN_WIDTH + 70 +.3855c4 af 30 13 af lda $af1330 MORE_DATA LDA @lMIDI_DATA_REG +.3855c8 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3855cb c8 iny INY +.3855cc c8 iny INY +.3855cd af 31 13 af lda $af1331 LDA @lMIDI_STATUS_REG +.3855d1 29 80 and #$80 AND #$80 +.3855d3 c9 80 cmp #$80 CMP #$80 +.3855d5 d0 ed bne $3855c4 BNE MORE_DATA +.3855d7 INIT_MIDI_DONE +.3855d7 68 pla PLA +.3855d8 60 rts RTS +.3855d9 RECEIVE_MIDI_DATA +.3855d9 c2 10 rep #$10 REP #$10 ; set X long +.3855db 48 pha PHA +.3855dc 10 16 bpl $3855f4 BPL RECEIVED_DATA_MSG +.3855de 48 pha PHA +.3855df 29 0f and #$0f AND #$F ; channel - store it somewhere when you care +.3855e1 85 63 sta $63 STA MIDI_CHANNEL +.3855e3 68 pla PLA +.3855e4 29 70 and #$70 AND #$70 +.3855e6 4a lsr a LSR +.3855e7 4a lsr a LSR +.3855e8 4a lsr a LSR +.3855e9 85 62 sta $62 STA MIDI_CTRL +.3855eb c9 0e cmp #$0e CMP #$E +.3855ed d0 11 bne $385600 BNE RECEIVE_MIDI_DATA_DONE +.3855ef 20 c2 56 jsr $3856c2 JSR SYSTEM_COMMAND +.3855f2 80 0c bra $385600 BRA RECEIVE_MIDI_DATA_DONE +.3855f4 RECEIVED_DATA_MSG +.3855f4 48 pha PHA +.3855f5 e2 10 sep #$10 SEP #$10 ; set X short +.3855f7 a5 62 lda $62 LDA MIDI_CTRL +.3855f9 aa tax TAX +.3855fa 68 pla PLA +.3855fb fc 28 69 jsr ($386928,x) JSR (MIDI_COMMAND_TABLE,X) +.3855fe c2 10 rep #$10 REP #$10 ; set X long +.385600 RECEIVE_MIDI_DATA_DONE +.385600 68 pla PLA +.385601 60 rts RTS +.385602 NOTE_OFF +.385602 NOTE_ON +.385602 a6 60 ldx $60 LDX MIDI_COUNTER +.385604 95 64 sta $64,x STA MIDI_DATA1,X +.385606 8a txa TXA +.385607 1a inc a INC A +.385608 85 60 sta $60 STA MIDI_COUNTER +.38560a c9 02 cmp #$02 CMP #2 +.38560c d0 71 bne $38567f BNE MORE_NOTE_DATA_NEEDED +.38560e 64 60 stz $60 STZ MIDI_COUNTER ; reset the counter +.385610 a9 00 lda #$00 LDA #0 +.385612 85 27 sta $27 STA OPL2_CHANNEL +.385614 c2 10 rep #$10 REP #$10 ; set X long +.385616 a5 62 lda $62 LDA MIDI_CTRL +.385618 a0 02 04 ldy #$0402 LDY #12*SCREEN_WIDTH + 66 +.38561b 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38561e a5 64 lda $64 LDA MIDI_DATA1 +.385620 8f 12 01 00 sta $000112 STA @lD0_OPERAND_B +.385624 a0 04 04 ldy #$0404 LDY #12*SCREEN_WIDTH + 68 +.385627 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38562a a9 00 lda #$00 LDA #0 +.38562c 8f 11 01 00 sta $000111 STA @lD0_OPERAND_A + 1 +.385630 8f 13 01 00 sta $000113 STA @lD0_OPERAND_B + 1 +.385634 a9 0c lda #$0c LDA #12 +.385636 8f 10 01 00 sta $000110 STA @lD0_OPERAND_A +.38563a 38 sec SEC +.38563b af 14 01 00 lda $000114 LDA @lD0_RESULT +.38563f e9 02 sbc #$02 SBC #2 +.385641 85 31 sta $31 STA OPL2_OCTAVE +.385643 a0 08 04 ldy #$0408 LDY #12*SCREEN_WIDTH + 72 +.385646 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.385649 af 16 01 00 lda $000116 LDA @lD0_REMAINDER +.38564d 85 30 sta $30 STA OPL2_NOTE +.38564f a0 0a 04 ldy #$040a LDY #12*SCREEN_WIDTH + 74 +.385652 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.385655 a5 65 lda $65 LDA MIDI_DATA2 +.385657 a0 0c 04 ldy #$040c LDY #12*SCREEN_WIDTH + 76 +.38565a 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38565d c9 00 cmp #$00 CMP #0 +.38565f d0 0f bne $385670 BNE PLAY_NOTE_ON ; otherwise, turn note on +.385661 85 32 sta $32 STA OPL2_PARAMETER0 +.385663 a9 ff lda #$ff LDA #$FF +.385665 a0 0e 04 ldy #$040e LDY #12*SCREEN_WIDTH + 78 +.385668 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38566b 20 c6 36 jsr $3836c6 JSR OPL2_SET_KEYON +.38566e 80 0f bra $38567f BRA MORE_NOTE_DATA_NEEDED +.385670 PLAY_NOTE_ON +.385670 a9 01 lda #$01 LDA #1 +.385672 85 32 sta $32 STA OPL2_PARAMETER0 +.385674 c2 20 rep #$20 REP #$20 ; set A long +.385676 20 f5 37 jsr $3837f5 JSR OPL2_GET_REG_OFFSET +.385679 22 01 32 38 jsl $383201 JSL OPL2_PLAYNOTE +.38567d e2 20 sep #$20 SEP #$20 ; set A short +.38567f MORE_NOTE_DATA_NEEDED +.38567f e2 10 sep #$10 SEP #$10 ; set X short +.385681 60 rts RTS +.385682 POLY_PRESSURE +.385682 CONTROL_CHANGE +.385682 PITCH_BEND +.385682 a6 60 ldx $60 LDX MIDI_COUNTER +.385684 95 64 sta $64,x STA MIDI_DATA1,X +.385686 8a txa TXA +.385687 1a inc a INC A +.385688 85 60 sta $60 STA MIDI_COUNTER +.38568a c9 02 cmp #$02 CMP #2 +.38568c d0 1c bne $3856aa BNE MORE_CTRL_DATA_NEEDED +.38568e c2 10 rep #$10 REP #$10 ; set X long +.385690 a5 62 lda $62 LDA MIDI_CTRL +.385692 a0 a2 04 ldy #$04a2 LDY #14*SCREEN_WIDTH + 66 +.385695 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.385698 a5 64 lda $64 LDA MIDI_DATA1 +.38569a a0 a4 04 ldy #$04a4 LDY #14*SCREEN_WIDTH+68 +.38569d 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3856a0 a5 65 lda $65 LDA MIDI_DATA2 +.3856a2 a0 a6 04 ldy #$04a6 LDY #14*SCREEN_WIDTH+70 +.3856a5 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3856a8 64 60 stz $60 STZ MIDI_COUNTER +.3856aa MORE_CTRL_DATA_NEEDED +.3856aa 60 rts RTS +.3856ab PROGRAM_CHANGE +.3856ab CHANNEL_PRESSURE +.3856ab 48 pha PHA +.3856ac c2 10 rep #$10 REP #$10 ; set X long +.3856ae a5 62 lda $62 LDA MIDI_CTRL +.3856b0 a0 f2 04 ldy #$04f2 LDY #15*SCREEN_WIDTH + 66 +.3856b3 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3856b6 68 pla PLA +.3856b7 a0 f4 04 ldy #$04f4 LDY #15*SCREEN_WIDTH + 68 +.3856ba 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3856bd a9 10 lda #$10 LDA #16 +.3856bf 85 62 sta $62 STA MIDI_CTRL +.3856c1 60 rts RTS +.3856c2 SYSTEM_COMMAND +.3856c2 c2 10 rep #$10 REP #$10 ; set X long +.3856c4 af 66 00 00 lda $000066 LDA @lTIMING_CNTR +.3856c8 1a inc a INC A +.3856c9 c9 03 cmp #$03 CMP #3 +.3856cb d0 02 bne $3856cf BNE DISPLAY_COUNTER +.3856cd a9 00 lda #$00 LDA #0 +.3856cf DISPLAY_COUNTER +.3856cf a0 42 05 ldy #$0542 LDY #16*SCREEN_WIDTH + 66 +.3856d2 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3856d5 8f 66 00 00 sta $000066 STA @lTIMING_CNTR +.3856d9 60 rts RTS +.3856da INVALID_COMMAND +.3856da 60 rts RTS ;****** Return to file: tracker.asm ;****** Processing file: display_func.asm -.385cdb DRAW_DISPLAY -.385cdb a9 80 lda #$80 LDA #128 -.385cdd 85 11 sta $11 STA COLS_PER_LINE -.385cdf a9 40 lda #$40 LDA #64 -.385ce1 85 15 sta $15 STA LINES_MAX -.385ce3 a9 50 lda #$50 LDA #80 -.385ce5 85 0f sta $0f STA COLS_VISIBLE -.385ce7 a9 3c lda #$3c LDA #60 -.385ce9 85 13 sta $13 STA LINES_VISIBLE -.385ceb a9 00 lda #$00 LDA #0 -.385ced 8f 08 00 af sta $af0008 STA BORDER_X_SIZE -.385cf1 8f 09 00 af sta $af0009 STA BORDER_Y_SIZE -.385cf5 e2 20 sep #$20 SEP #$20 ; set A short -.385cf7 a9 20 lda #$20 LDA #$20 -.385cf9 8f 05 00 af sta $af0005 STA BORDER_COLOR_B -.385cfd 8f 07 00 af sta $af0007 STA BORDER_COLOR_R -.385d01 a9 00 lda #$00 LDA #0 -.385d03 8f 06 00 af sta $af0006 STA BORDER_COLOR_G -.385d07 a9 01 lda #$01 LDA #Border_Ctrl_Enable -.385d09 8f 04 00 af sta $af0004 STA BORDER_CTRL_REG -.385d0d a9 01 lda #$01 LDA #Mstr_Ctrl_Text_Mode_En -.385d0f 8f 00 00 af sta $af0000 STA MASTER_CTRL_REG_L -.385d13 c2 20 rep #$20 REP #$20 ; set A long -.385d15 a9 00 a0 lda #$a000 LDA #<>CS_TEXT_MEM_PTR ; store the initial screen buffer location -.385d18 85 0c sta $0c STA SCREENBEGIN -.385d1a 85 17 sta $17 STA CURSORPOS -.385d1c e2 20 sep #$20 SEP #$20 ; set A short -.385d1e a9 af lda #$af LDA #`CS_TEXT_MEM_PTR -.385d20 85 0e sta $0e STA SCREENBEGIN+2 -.385d22 85 19 sta $19 STA CURSORPOS+2 -.385d24 c2 30 rep #$30 REP #$30 ; set A&X long -.385d26 a9 ff 0d lda #$0dff LDA #128*28-1 -.385d29 a2 80 3b ldx #$3b80 LDX #<>TRACKER_SCREEN -.385d2c a0 00 a0 ldy #$a000 LDY #<>CS_TEXT_MEM_PTR -.385d2f 54 af 38 mvn $38,$af MVN #`TRACKER_SCREEN,#$AF -.385d32 a9 00 08 lda #$0800 LDA #256 * 8 -.385d35 a2 80 4b ldx #$4b80 LDX #<>FNXFONT -.385d38 a0 00 80 ldy #$8000 LDY #<>FONT_MEMORY_BANK0 -.385d3b 54 af 38 mvn $38,$af MVN #`FNXFONT,#$AF -.385d3e a9 ff 60 lda #$60ff LDA #$60FF -.385d41 8f 48 1f af sta $af1f48 STA FG_CHAR_LUT_PTR + 8; -.385d45 8f 88 1f af sta $af1f88 STA BG_CHAR_LUT_PTR + 8; -.385d49 a9 80 00 lda #$0080 LDA #$0080 -.385d4c 8f 4a 1f af sta $af1f4a STA FG_CHAR_LUT_PTR + 10; -.385d50 8f 8a 1f af sta $af1f8a STA BG_CHAR_LUT_PTR + 10; -.385d54 a9 20 80 lda #$8020 LDA #$8020 -.385d57 8f 4c 1f af sta $af1f4c STA FG_CHAR_LUT_PTR + 12; -.385d5b 8f 8c 1f af sta $af1f8c STA BG_CHAR_LUT_PTR + 12; -.385d5f a9 10 00 lda #$0010 LDA #$0010 -.385d62 8f 4e 1f af sta $af1f4e STA FG_CHAR_LUT_PTR + 14; -.385d66 8f 8e 1f af sta $af1f8e STA BG_CHAR_LUT_PTR + 14; -.385d6a a9 cc cc lda #$cccc LDA #$CCCC -.385d6d 8f 50 1f af sta $af1f50 STA FG_CHAR_LUT_PTR + 16; -.385d71 8f 90 1f af sta $af1f90 STA BG_CHAR_LUT_PTR + 16; -.385d75 a9 cc 00 lda #$00cc LDA #$00CC -.385d78 8f 52 1f af sta $af1f52 STA FG_CHAR_LUT_PTR + 18; -.385d7c 8f 92 1f af sta $af1f92 STA BG_CHAR_LUT_PTR + 18; -.385d80 a9 22 dd lda #$dd22 LDA #$DD22 -.385d83 8f 54 1f af sta $af1f54 STA FG_CHAR_LUT_PTR + 20; -.385d87 8f 94 1f af sta $af1f94 STA BG_CHAR_LUT_PTR + 20; -.385d8b a9 dd 00 lda #$00dd LDA #$00DD -.385d8e 8f 56 1f af sta $af1f56 STA FG_CHAR_LUT_PTR + 22; -.385d92 8f 96 1f af sta $af1f96 STA BG_CHAR_LUT_PTR + 22; -.385d96 a2 00 20 ldx #$2000 LDX #128*64 -.385d99 e2 20 sep #$20 SEP #$20 ; set A short -.385d9b a9 20 lda #$20 LDA #$20 -.385d9d SETTEXTCOLOR -.385d9d 9f ff bf af sta $afbfff,x STA CS_COLOR_MEM_PTR-1,X -.385da1 ca dex DEX -.385da2 d0 f9 bne $385d9d BNE SETTEXTCOLOR -.385da4 a0 00 13 ldy #$1300 LDY #38 * 128 -.385da7 20 79 60 jsr $386079 JSR REVERSE_LUT -.385daa 20 d6 60 jsr $3860d6 JSR HIGHLIGHT_MODE -.385dad 20 6d 61 jsr $38616d JSR DISPLAY_ACTIVE_CHANNELS -.385db0 60 rts RTS -.385db1 WRITE_HEX -.385db1 48 pha PHA -.385db2 da phx PHX -.385db3 5a phy PHY -.385db4 8f 01 0f 38 sta $380f01 STA @lTEMP_STORAGE -.385db8 29 f0 and #$f0 AND #$F0 -.385dba 4a lsr a lsr A -.385dbb 4a lsr a lsr A -.385dbc 4a lsr a lsr A -.385dbd 4a lsr a lsr A -.385dbe e2 10 sep #$10 SEP #$10 ; set X short -.385dc0 aa tax TAX -.385dc1 bf 05 0f 38 lda $380f05,x LDA HEX_MAP,X -.385dc5 8f 03 0f 38 sta $380f03 STA @lLOW_NIBBLE -.385dc9 af 01 0f 38 lda $380f01 LDA @lTEMP_STORAGE -.385dcd 29 0f and #$0f AND #$0F -.385dcf aa tax TAX -.385dd0 bf 05 0f 38 lda $380f05,x LDA HEX_MAP,X -.385dd4 8f 04 0f 38 sta $380f04 STA @lHIGH_NIBBLE -.385dd8 c2 30 rep #$30 REP #$30 ; set A&X long -.385dda 7a ply PLY -.385ddb af 03 0f 38 lda $380f03 LDA @lLOW_NIBBLE -.385ddf 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385de1 a9 30 30 lda #$3030 LDA #$3030 -.385de4 bb tyx TYX -.385de5 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X -.385de9 e2 20 sep #$20 SEP #$20 ; set A short -.385deb fa plx PLX -.385dec 68 pla PLA -.385ded 60 rts RTS -.385dee WRITE_OFF_ON -.385dee da phx PHX -.385def c9 00 cmp #$00 CMP #0 -.385df1 f0 25 beq $385e18 BEQ DISPLAY_OFF -.385df3 a9 4f lda #$4f LDA #'O' -.385df5 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385df7 a9 30 lda #$30 LDA #$30 -.385df9 bb tyx TYX -.385dfa 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X -.385dfe c8 iny INY -.385dff a9 6e lda #$6e LDA #'n' -.385e01 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385e03 a9 30 lda #$30 LDA #$30 -.385e05 bb tyx TYX -.385e06 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X -.385e0a c8 iny INY -.385e0b a9 20 lda #$20 LDA #$20 -.385e0d 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385e0f a9 30 lda #$30 LDA #$30 -.385e11 bb tyx TYX -.385e12 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X -.385e16 80 23 bra $385e3b BRA ON_OFF_DONE -.385e18 DISPLAY_OFF -.385e18 a9 4f lda #$4f LDA #'O' -.385e1a 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385e1c a9 30 lda #$30 LDA #$30 -.385e1e bb tyx TYX -.385e1f 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X -.385e23 c8 iny INY -.385e24 a9 66 lda #$66 LDA #'f' -.385e26 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385e28 a9 30 lda #$30 LDA #$30 -.385e2a bb tyx TYX -.385e2b 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X -.385e2f c8 iny INY -.385e30 a9 66 lda #$66 LDA #'f' -.385e32 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385e34 a9 30 lda #$30 LDA #$30 -.385e36 bb tyx TYX -.385e37 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X -.385e3b ON_OFF_DONE -.385e3b fa plx PLX -.385e3c 60 rts RTS -.385e3d WRITE_INSTRUMENT_NAME -.385e3d a9 0a lda #$0a LDA #10 -.385e3f 8f 01 0f 38 sta $380f01 STA @lTEMP_STORAGE -.385e43 WRITE_CHAR -.385e43 a7 67 lda [$67] LDA [INSTR_ADDR] -.385e45 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385e47 e6 67 inc $67 INC INSTR_ADDR -.385e49 d0 02 bne $385e4d BNE WRITE_CONTINUE -.385e4b e6 68 inc $68 INC INSTR_ADDR + 1 -.385e4d WRITE_CONTINUE -.385e4d a9 30 lda #$30 LDA #$30 -.385e4f bb tyx TYX -.385e50 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X -.385e54 c8 iny INY -.385e55 af 01 0f 38 lda $380f01 LDA @lTEMP_STORAGE -.385e59 3a dec a DEC A -.385e5a 8f 01 0f 38 sta $380f01 STA @lTEMP_STORAGE -.385e5e d0 e3 bne $385e43 BNE WRITE_CHAR -.385e60 60 rts RTS -.385e61 DISPLAY_PATTERN -.385e61 8b phb PHB -.385e62 0b phd PHD -.385e63 a9 39 lda #$39 LDA #`PATTERNS -.385e65 85 72 sta $72 STA PTRN_ADDR + 2 -.385e67 af 18 0f 38 lda $380f18 LDA PATTERN_NUM ; this is a BCD value so it won't work once values are above 9 -.385e6b a0 93 0b ldy #$0b93 LDY #23*128 + 19 -.385e6e 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385e71 3a dec a DEC A ; use 0 based offsets -.385e72 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A -.385e76 9c 01 01 stz $0101 STZ UNSIGNED_MULT_A + 1 -.385e79 c2 20 rep #$20 REP #$20 ; set A long -.385e7b a9 01 07 lda #$0701 LDA #PATTERN_BYTES ; this is the pattern size -.385e7e 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B -.385e82 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT -.385e86 1a inc a INC A ; skip the pattern # byte -.385e87 85 70 sta $70 STA PTRN_ADDR -.385e89 e2 20 sep #$20 SEP #$20 ; set A short -.385e8b af 19 0f 38 lda $380f19 LDA LINE_NUM_DEC -.385e8f a0 87 0b ldy #$0b87 LDY #23*128 + 7 -.385e92 20 b1 5d jsr $385db1 JSR WRITE_HEX -.385e95 a9 20 lda #$20 LDA #32 -.385e97 85 6e sta $6e STA REM_LINES -.385e99 a0 00 ae ldy #$ae00 LDY #<>CS_TEXT_MEM_PTR + 128 * 28 ; top of the pattern display -.385e9c a5 6c lda $6c LDA LINE_NUM_HEX -.385e9e c9 0a cmp #$0a CMP #10 -.385ea0 b0 2f bcs $385ed1 BCS DRAW_DATA ; if line# is greater than 10, skip blank lines and topline -.385ea2 DRAW_BLANK_LINES -.385ea2 38 sec SEC -.385ea3 a9 09 lda #$09 LDA #9 -.385ea5 e5 6c sbc $6c SBC LINE_NUM_HEX -.385ea7 f0 15 beq $385ebe BEQ DRAW_TOP_LINE -.385ea9 85 6d sta $6d STA TAB_COUNTER -.385eab BLANKS_LOOP -.385eab c2 20 rep #$20 REP #$20 ; set A long -.385ead a9 7f 00 lda #$007f LDA #127 -.385eb0 a2 80 49 ldx #$4980 LDX #<>blank_line -.385eb3 54 af 38 mvn $38,$af MVN #`blank_line,#$AF -.385eb6 e2 20 sep #$20 SEP #$20 ; set A short -.385eb8 c6 6e dec $6e DEC REM_LINES -.385eba c6 6d dec $6d DEC TAB_COUNTER -.385ebc d0 ed bne $385eab BNE BLANKS_LOOP -.385ebe DRAW_TOP_LINE -.385ebe c2 20 rep #$20 REP #$20 ; set A long -.385ec0 a9 7f 00 lda #$007f LDA #127 -.385ec3 a2 00 48 ldx #$4800 LDX #<>top_line -.385ec6 54 af 38 mvn $38,$af MVN #`top_line,#$AF -.385ec9 e2 20 sep #$20 SEP #$20 ; set A short -.385ecb c6 6e dec $6e DEC REM_LINES -.385ecd a9 01 lda #$01 LDA #1 -.385ecf 80 05 bra $385ed6 BRA MOD_TOP_LINE -.385ed1 DRAW_DATA -.385ed1 38 sec SEC -.385ed2 a5 6c lda $6c LDA LINE_NUM_HEX -.385ed4 e9 09 sbc #$09 SBC #9 -.385ed6 MOD_TOP_LINE -.385ed6 85 6d sta $6d STA TAB_COUNTER -.385ed8 TRIPLET -.385ed8 a9 00 lda #$00 LDA #0 -.385eda 48 pha PHA -.385edb ab plb PLB -.385edc a9 1c lda #$1c LDA #LINE_BYTES -.385ede 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A -.385ee2 9c 01 01 stz $0101 STZ UNSIGNED_MULT_A + 1 -.385ee5 9c 03 01 stz $0103 STZ UNSIGNED_MULT_B + 1 -.385ee8 a5 6d lda $6d LDA TAB_COUNTER -.385eea 3a dec a DEC A ; use zero based offset -.385eeb 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B -.385eef c2 20 rep #$20 REP #$20 ; set A long -.385ef1 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT -.385ef5 85 73 sta $73 STA LINE_ADDR -.385ef7 e2 20 sep #$20 SEP #$20 ; set A short -.385ef9 a5 6d lda $6d LDA TAB_COUNTER -.385efb 29 03 and #$03 AND #3 -.385efd f0 15 beq $385f14 BEQ draw_tick_line -.385eff c2 20 rep #$20 REP #$20 ; set A long -.385f01 a9 7f 00 lda #$007f LDA #127 -.385f04 a2 80 4a ldx #$4a80 LDX #<>untick_line -.385f07 54 af 38 mvn $38,$af MVN #`untick_line,#$AF -.385f0a e2 20 sep #$20 SEP #$20 ; set A short -.385f0c 20 93 5f jsr $385f93 JSR DRAW_LINE_DATA -.385f0f c6 6e dec $6e DEC REM_LINES -.385f11 4c 26 5f jmp $385f26 JMP next_line -.385f14 draw_tick_line -.385f14 c2 20 rep #$20 REP #$20 ; set A long -.385f16 a9 7f 00 lda #$007f LDA #127 -.385f19 a2 00 4a ldx #$4a00 LDX #<>tick_line -.385f1c 54 af 38 mvn $38,$af MVN #`tick_line,#$AF -.385f1f e2 20 sep #$20 SEP #$20 ; set A short -.385f21 20 93 5f jsr $385f93 JSR DRAW_LINE_DATA -.385f24 c6 6e dec $6e DEC REM_LINES -.385f26 next_line -.385f26 e6 6d inc $6d INC TAB_COUNTER -.385f28 a5 6d lda $6d LDA TAB_COUNTER -.385f2a c9 41 cmp #$41 CMP #65 -.385f2c f0 06 beq $385f34 BEQ DRAW_BOTTOM_BAR -.385f2e a5 6e lda $6e LDA REM_LINES -.385f30 d0 a6 bne $385ed8 BNE TRIPLET -.385f32 f0 22 beq $385f56 BEQ DRAW_LINE_DONE -.385f34 DRAW_BOTTOM_BAR -.385f34 c2 20 rep #$20 REP #$20 ; set A long -.385f36 a9 7f 00 lda #$007f LDA #127 -.385f39 a2 00 49 ldx #$4900 LDX #<>btm_line -.385f3c 54 af 38 mvn $38,$af MVN #`btm_line,#$AF -.385f3f e2 20 sep #$20 SEP #$20 ; set A short -.385f41 a5 6e lda $6e LDA REM_LINES -.385f43 f0 11 beq $385f56 BEQ DRAW_LINE_DONE -.385f45 BLANKS_BTM_LOOP -.385f45 c2 20 rep #$20 REP #$20 ; set A long -.385f47 a9 7f 00 lda #$007f LDA #127 -.385f4a a2 80 49 ldx #$4980 LDX #<>blank_line -.385f4d 54 af 38 mvn $38,$af MVN #`blank_line,#$AF -.385f50 e2 20 sep #$20 SEP #$20 ; set A short -.385f52 c6 6e dec $6e DEC REM_LINES -.385f54 d0 ef bne $385f45 BNE BLANKS_BTM_LOOP -.385f56 DRAW_LINE_DONE -.385f56 2b pld PLD -.385f57 ab plb PLB -.385f58 60 rts RTS -.385f59 DISPLAY_FILENAME -.385f59 a0 00 00 ldy #$0000 LDY #0 -.385f5c a2 b3 0b ldx #$0bb3 LDX #23*128 + 51 -.385f5f DF_LOOP -.385f5f b7 51 lda [$51],y LDA [SDOS_FILE_REC_PTR],Y -.385f61 5a phy PHY -.385f62 9b txy TXY -.385f63 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385f65 e8 inx INX -.385f66 7a ply PLY -.385f67 c8 iny INY -.385f68 c0 08 00 cpy #$0008 CPY #8 -.385f6b d0 08 bne $385f75 BNE DF_NOT_DOT -.385f6d a9 2e lda #$2e LDA #'.' -.385f6f 5a phy PHY -.385f70 9b txy TXY -.385f71 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385f73 e8 inx INX -.385f74 7a ply PLY -.385f75 DF_NOT_DOT -.385f75 c0 0b 00 cpy #$000b CPY #11 -.385f78 d0 e5 bne $385f5f BNE DF_LOOP -.385f7a 9b txy TXY -.385f7b c8 iny INY -.385f7c c8 iny INY -.385f7d a9 76 lda #$76 LDA #'v' -.385f7f 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385f81 c8 iny INY -.385f82 af 67 70 38 lda $387067 LDA @lTuneInfo.version -.385f86 89 02 bit #$02 BIT #2 -.385f88 d0 04 bne $385f8e BNE DF_V2 -.385f8a a9 31 lda #$31 LDA #'1' -.385f8c 80 02 bra $385f90 BRA DF_DONE -.385f8e DF_V2 -.385f8e a9 32 lda #$32 LDA #'2' -.385f90 DF_DONE -.385f90 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385f92 60 rts RTS -.385f93 DRAW_LINE_DATA -.385f93 5a phy PHY -.385f94 da phx PHX -.385f95 a9 09 lda #$09 LDA #9 ; number of channels to populate -.385f97 85 f7 sta $f7 STA RAD_CHANNEL -.385f99 c2 20 rep #$20 REP #$20 ; set A long -.385f9b 98 tya TYA ; copy Y into A -.385f9c 38 sec SEC -.385f9d e9 80 a0 sbc #$a080 SBC #$A080 -.385fa0 aa tax TAX -.385fa1 e2 20 sep #$20 SEP #$20 ; set A short -.385fa3 a4 73 ldy $73 LDY LINE_ADDR -.385fa5 c8 iny INY ; skip the line number -.385fa6 NEXT_CHANNEL -.385fa6 64 4e stz $4e STZ RAD_TEMP -.385fa8 b7 70 lda [$70],y LDA [PTRN_ADDR],Y ; note/octave -.385faa e8 inx INX ; skip the first column -.385fab c8 iny INY -.385fac c9 00 cmp #$00 CMP #0 -.385fae d0 04 bne $385fb4 BNE DL_DRAW_NOTE -.385fb0 e8 inx INX -.385fb1 e8 inx INX -.385fb2 80 03 bra $385fb7 BRA DL_SKIP_NOTE_DISPLAY -.385fb4 DL_DRAW_NOTE -.385fb4 20 55 60 jsr $386055 JSR DISPLAY_NOTE_OCTAVE -.385fb7 DL_SKIP_NOTE_DISPLAY -.385fb7 2a rol a ROL A ; put bit 7 into the carry -.385fb8 90 0b bcc $385fc5 BCC SKIP_MID_COL -.385fba a9 31 lda #$31 LDA #'1' -.385fbc 5a phy PHY -.385fbd 9b txy TXY -.385fbe 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.385fc0 7a ply PLY -.385fc1 a9 10 lda #$10 LDA #$10 -.385fc3 85 4e sta $4e STA RAD_TEMP -.385fc5 SKIP_MID_COL -.385fc5 e8 inx INX ; skip the middle column -.385fc6 b7 70 lda [$70],y LDA [PTRN_ADDR],Y ; instrument/effect -.385fc8 c8 iny INY -.385fc9 20 e2 5f jsr $385fe2 JSR DISPLAY_VALUE_SKIP_LOW_NIBBLE_IF_ZERO -.385fcc c9 00 cmp #$00 CMP #0 ; if the effect byte is 0, don't display the next value -.385fce d0 04 bne $385fd4 BNE SHOW_EFFECT -.385fd0 e8 inx INX -.385fd1 e8 inx INX -.385fd2 80 05 bra $385fd9 BRA DL_SKIP_EFFECT -.385fd4 SHOW_EFFECT -.385fd4 b7 70 lda [$70],y LDA [PTRN_ADDR],Y ; -.385fd6 20 34 60 jsr $386034 JSR DISPLAY_DEC_VALUE -.385fd9 DL_SKIP_EFFECT -.385fd9 c8 iny INY -.385fda e8 inx INX ; skip the vertical bar -.385fdb c6 f7 dec $f7 DEC RAD_CHANNEL -.385fdd d0 c7 bne $385fa6 BNE NEXT_CHANNEL -.385fdf fa plx PLX -.385fe0 7a ply PLY -.385fe1 60 rts RTS -.385fe2 DISPLAY_VALUE_SKIP_LOW_NIBBLE_IF_ZERO -.385fe2 5a phy PHY -.385fe3 48 pha PHA -.385fe4 9b txy TXY -.385fe5 a2 00 00 ldx #$0000 LDX #0 -.385fe8 eb xba XBA -.385fe9 a9 00 lda #$00 LDA #0 -.385feb eb xba XBA -.385fec 29 f0 and #$f0 AND #$F0 ; high-nibble -.385fee d0 09 bne $385ff9 BNE DV_DISPLAY_VALUE -.385ff0 a5 4e lda $4e LDA RAD_TEMP -.385ff2 d0 03 bne $385ff7 BNE DV_DISPLAY_ZERO -.385ff4 c8 iny INY -.385ff5 80 0e bra $386005 BRA DV_LOW_NIBBLE -.385ff7 DV_DISPLAY_ZERO -.385ff7 a9 00 lda #$00 LDA #0 -.385ff9 DV_DISPLAY_VALUE -.385ff9 4a lsr a LSR -.385ffa 4a lsr a LSR -.385ffb 4a lsr a LSR -.385ffc 4a lsr a LSR -.385ffd aa tax TAX -.385ffe bf 05 0f 38 lda $380f05,x LDA HEX_MAP, X -.386002 97 0c sta [$0c],y STA [SCREENBEGIN],Y -.386004 c8 iny INY -.386005 DV_LOW_NIBBLE -.386005 68 pla PLA -.386006 29 0f and #$0f AND #$F ; low-nibble - effect -.386008 f0 07 beq $386011 BEQ SKIP_VALUE -.38600a aa tax TAX -.38600b bf 05 0f 38 lda $380f05,x LDA HEX_MAP, X -.38600f 97 0c sta [$0c],y STA [SCREENBEGIN],Y -.386011 SKIP_VALUE -.386011 c8 iny INY -.386012 bb tyx TYX -.386013 7a ply PLY -.386014 60 rts RTS -.386015 DISPLAY_VALUE -.386015 5a phy PHY -.386016 48 pha PHA -.386017 9b txy TXY -.386018 29 f0 and #$f0 AND #$F0 ; high-nibble -.38601a 4a lsr a LSR -.38601b 4a lsr a LSR -.38601c 4a lsr a LSR -.38601d 4a lsr a LSR -.38601e aa tax TAX -.38601f bf 05 0f 38 lda $380f05,x LDA HEX_MAP, X -.386023 97 0c sta [$0c],y STA [SCREENBEGIN],Y -.386025 c8 iny INY -.386026 68 pla PLA -.386027 29 0f and #$0f AND #$F ; low-nibble -.386029 aa tax TAX -.38602a bf 05 0f 38 lda $380f05,x LDA HEX_MAP, X -.38602e 97 0c sta [$0c],y STA [SCREENBEGIN],Y -.386030 c8 iny INY -.386031 bb tyx TYX -.386032 7a ply PLY -.386033 60 rts RTS -.386034 DISPLAY_DEC_VALUE -.386034 48 pha PHA -.386035 29 07 and #$07 AND #$7 -.386037 85 6f sta $6f STA DEC_MEM -.386039 68 pla PLA -.38603a 29 f8 and #$f8 AND #$F8 ; count in BCD in factors of 8 -.38603c 18 clc CLC -.38603d 4a lsr a LSR -.38603e 4a lsr a LSR -.38603f 4a lsr a LSR -.386040 85 76 sta $76 STA CONV_VAL -.386042 f8 sed SED ; switch to decimal mode -.386043 f0 09 beq $38604e BEQ ADD_DEC -.386045 18 clc CLC -.386046 a9 00 lda #$00 LDA #0 -.386048 MULT_DEC -.386048 69 08 adc #$08 ADC #$8 -.38604a c6 76 dec $76 DEC CONV_VAL -.38604c d0 fa bne $386048 BNE MULT_DEC -.38604e ADD_DEC -.38604e 65 6f adc $6f ADC DEC_MEM -.386050 20 15 60 jsr $386015 JSR DISPLAY_VALUE -.386053 d8 cld CLD -.386054 60 rts RTS -.386055 DISPLAY_NOTE_OCTAVE -.386055 5a phy PHY -.386056 48 pha PHA -.386057 48 pha PHA -.386058 9b txy TXY -.386059 c2 20 rep #$20 REP #$20 ; set A long -.38605b 29 0f 00 and #$000f AND #$F ; low-nibble - C#=1, D=2, ... C=12, 0 is no note and $F is Key Off -.38605e aa tax TAX -.38605f e2 20 sep #$20 SEP #$20 ; set A short -.386061 bf 5a 70 38 lda $38705a,x LDA @lnote_array, X -.386065 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.386067 c8 iny INY -.386068 68 pla PLA -.386069 29 70 and #$70 AND #$70 ; high-nibble -.38606b 4a lsr a LSR -.38606c 4a lsr a LSR -.38606d 4a lsr a LSR -.38606e 4a lsr a LSR -.38606f 18 clc CLC -.386070 69 30 adc #$30 ADC #$30 -.386072 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.386074 c8 iny INY -.386075 bb tyx TYX -.386076 68 pla PLA -.386077 7a ply PLY -.386078 60 rts RTS -.386079 REVERSE_LUT -.386079 8b phb PHB -.38607a a9 af lda #$af LDA #`CS_COLOR_MEM_PTR -.38607c 48 pha PHA -.38607d ab plb PLB -.38607e a9 09 lda #$09 LDA #9 -.386080 85 6d sta $6d STA TAB_COUNTER -.386082 REVERSE_LUT_TABS -.386082 a9 42 lda #$42 LDA #$42 ; purple background and white foreground -.386084 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y -.386087 c8 iny INY -.386088 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y -.38608b c8 iny INY -.38608c 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y -.38608f c8 iny INY -.386090 a9 52 lda #$52 LDA #$52 ; purple background and yellow foreground -.386092 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y -.386095 c8 iny INY -.386096 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y -.386099 c8 iny INY -.38609a a9 42 lda #$42 LDA #$42 ; purple background and white foreground -.38609c 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y -.38609f c8 iny INY -.3860a0 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y -.3860a3 c8 iny INY -.3860a4 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y -.3860a7 c8 iny INY -.3860a8 c8 iny INY ; skip separator -.3860a9 c6 6d dec $6d DEC TAB_COUNTER -.3860ab d0 d5 bne $386082 BNE REVERSE_LUT_TABS -.3860ad ab plb PLB -.3860ae 60 rts RTS -=646 INSTR_HL_SCR = 128 * 5 + 6 -=772 INSTR_NUM_HL_SCR = 128 * 6 + 4 -=693 ORDER_HL_SCR = 128 * 5 + 53 -=3329 PTTRN_HL_SCR = 128 * 26 + 1 -.3860af DISPLAY_SPEED -.3860af 5a phy PHY -.3860b0 af 69 70 38 lda $387069 LDA @lTuneInfo.InitialSpeed -.3860b4 a0 a8 0b ldy #$0ba8 LDY #23*128 + 40 -.3860b7 20 b1 5d jsr $385db1 JSR WRITE_HEX -.3860ba af 6a 70 38 lda $38706a LDA @lTuneInfo.hasSlowTimer -.3860be f0 07 beq $3860c7 BEQ DS_DONE -.3860c0 a9 2a lda #$2a LDA #'*' -.3860c2 a0 a7 0b ldy #$0ba7 LDY #23*128 + 39 -.3860c5 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.3860c7 DS_DONE -.3860c7 7a ply PLY -.3860c8 60 rts RTS -.3860c9 DISPLAY_BPM -.3860c9 60 rts RTS -.3860ca HL_CLR_TABLE ->3860ca 40 20 20 10 .byte $40, $20, $20, $10 ->3860ce 20 40 20 30 .byte $20, $40, $20, $30 ->3860d2 20 20 40 20 .byte $20, $20, $40, $20 -.3860d6 HIGHLIGHT_MODE -.3860d6 a9 00 lda #$00 LDA #0 -.3860d8 eb xba XBA -.3860d9 af 15 0f 38 lda $380f15 LDA STATE_MACHINE -.3860dd 29 30 and #$30 AND #$30 -.3860df 4a lsr a LSR -.3860e0 4a lsr a LSR -.3860e1 48 pha PHA -.3860e2 48 pha PHA -.3860e3 aa tax TAX -.3860e4 bf ca 60 38 lda $3860ca,x LDA HL_CLR_TABLE,X -.3860e8 a2 0a 00 ldx #$000a LDX #10 -.3860eb a0 86 22 ldy #$2286 LDY #$2000 + INSTR_HL_SCR -.3860ee INSTR_HIGHLIGHT_LOOP -.3860ee 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.3860f0 c8 iny INY -.3860f1 ca dex DEX -.3860f2 d0 fa bne $3860ee BNE INSTR_HIGHLIGHT_LOOP -.3860f4 a0 04 23 ldy #$2304 LDY #$2000 + INSTR_NUM_HL_SCR -.3860f7 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.3860f9 68 pla PLA -.3860fa aa tax TAX -.3860fb bf cb 60 38 lda $3860cb,x LDA HL_CLR_TABLE+1,X -.3860ff a2 05 00 ldx #$0005 LDX #5 -.386102 a0 b5 22 ldy #$22b5 LDY #$2000 + ORDER_HL_SCR -.386105 ORDER_HIGHLIGHT_LOOP -.386105 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.386107 c8 iny INY -.386108 ca dex DEX -.386109 d0 fa bne $386105 BNE ORDER_HIGHLIGHT_LOOP -.38610b 68 pla PLA -.38610c aa tax TAX -.38610d bf cc 60 38 lda $3860cc,x LDA HL_CLR_TABLE+2,X -.386111 a2 09 00 ldx #$0009 LDX #9 -.386114 a0 01 2d ldy #$2d01 LDY #$2000 + PTTRN_HL_SCR -.386117 HL_PATTERN_LOOP -.386117 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.386119 c8 iny INY -.38611a c8 iny INY -.38611b c8 iny INY -.38611c c8 iny INY -.38611d c8 iny INY -.38611e 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.386120 c8 iny INY -.386121 c8 iny INY -.386122 c8 iny INY -.386123 c8 iny INY -.386124 ca dex DEX -.386125 d0 f0 bne $386117 BNE HL_PATTERN_LOOP -.386127 20 6d 61 jsr $38616d JSR DISPLAY_ACTIVE_CHANNELS -.38612a 60 rts RTS -.38612b DISPLAY_ORDERS -.38612b af 68 70 38 lda $387068 LDA @lTuneInfo.songLength -.38612f f0 3b beq $38616c BEQ DO_DONE -.386131 c9 0e cmp #$0e CMP #14 -.386133 90 02 bcc $386137 BCC DO_DISPLAY_ORDERS -.386135 a9 0e lda #$0e LDA #14 ; only display up to 14 orders -.386137 DO_DISPLAY_ORDERS -.386137 85 6d sta $6d STA TAB_COUNTER -.386139 a2 00 00 ldx #$0000 LDX #0 -.38613c a0 b5 03 ldy #$03b5 LDY #128 * 7 + 53 -.38613f c2 20 rep #$20 REP #$20 ; set A long -.386141 a9 24 fc lda #$fc24 LDA #<>ORDERS -.386144 85 f0 sta $f0 STA RAD_ADDR -.386146 a9 39 00 lda #$0039 LDA #<`ORDERS -.386149 85 f2 sta $f2 STA RAD_ADDR + 2 -.38614b e2 20 sep #$20 SEP #$20 ; set A short -.38614d NEXT_ORDER -.38614d 8a txa TXA -.38614e 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386151 c8 iny INY -.386152 c8 iny INY -.386153 c8 iny INY -.386154 5a phy PHY -.386155 9b txy TXY -.386156 b7 f0 lda [$f0],y LDA [RAD_ADDR],Y -.386158 1a inc a INC A -.386159 7a ply PLY -.38615a 20 b1 5d jsr $385db1 JSR WRITE_HEX -.38615d e8 inx INX -.38615e c2 20 rep #$20 REP #$20 ; set A long -.386160 98 tya TYA -.386161 18 clc CLC -.386162 69 7d 00 adc #$007d ADC #128 - 3 -.386165 a8 tay TAY -.386166 e2 20 sep #$20 SEP #$20 ; set A short -.386168 c6 6d dec $6d DEC TAB_COUNTER -.38616a d0 e1 bne $38614d BNE NEXT_ORDER -.38616c DO_DONE -.38616c 60 rts RTS -.38616d DISPLAY_ACTIVE_CHANNELS -.38616d a2 09 00 ldx #$0009 LDX #9 -.386170 a0 4b 2d ldy #$2d4b LDY #$2000 + 128 * 26 + 75 -.386173 DAC_LOOP -.386173 bf b5 6e 38 lda $386eb5,x LDA CHANNELS-1,X -.386177 f0 06 beq $38617f BEQ INACTIVE_CHANNEL -.386179 a9 40 lda #$40 LDA #$40 ; white -.38617b 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.38617d 80 04 bra $386183 BRA DAC_CONTINUE -.38617f INACTIVE_CHANNEL -.38617f a9 20 lda #$20 LDA #$20 ; purple -.386181 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.386183 DAC_CONTINUE -.386183 88 dey DEY -.386184 88 dey DEY -.386185 88 dey DEY -.386186 88 dey DEY -.386187 88 dey DEY -.386188 88 dey DEY -.386189 88 dey DEY -.38618a 88 dey DEY -.38618b 88 dey DEY -.38618c ca dex DEX -.38618d d0 e4 bne $386173 BNE DAC_LOOP -.38618f 60 rts RTS -.386190 DISPLAY_CHAR -.386190 5a phy PHY -.386191 a4 1a ldy $1a LDY CURSORX -.386193 97 0c sta [$0c],y STA [SCREENBEGIN],Y -.386195 c8 iny INY -.386196 84 1a sty $1a STY CURSORX -.386198 7a ply PLY -.386199 6b rtl RTL -.38619a DISPLAY_NEXT_LINE -.38619a c2 20 rep #$20 REP #$20 ; set A long -.38619c a5 1a lda $1a LDA CURSORX -.38619e 29 80 ff and #$ff80 AND #$FF80 ; lines are $0, $80, etc -.3861a1 18 clc CLC -.3861a2 69 9f 00 adc #$009f ADC #128+31 ; move to the next line and offset to the file box -.3861a5 85 1a sta $1a STA CURSORX -.3861a7 e2 20 sep #$20 SEP #$20 ; set A short -.3861a9 6b rtl RTL -.3861aa DISPLAY_MSG -.3861aa 8b phb PHB -.3861ab 48 pha PHA ; begin setdbr macro -.3861ac 08 php PHP -.3861ad e2 20 sep #$20 SEP #$20 ; set A short -.3861af a9 00 lda #$00 LDA #`CS_COLOR_MEM_PTR ; store the initial colour buffer location -.38622f 85 17 sta $17 STA CURSORPOS -.386231 ad 1f 03 lda $031f LDA SDOS_LINE_SELECT -.386234 8d 00 01 sta $0100 STA UNSIGNED_MULT_A -.386237 a9 80 00 lda #$0080 LDA #128 -.38623a 8d 02 01 sta $0102 STA UNSIGNED_MULT_B -.38623d ad 04 01 lda $0104 LDA UNSIGNED_MULT_RESULT -.386240 18 clc CLC -.386241 69 9f 05 adc #$059f ADC #128 * 11 + 31 -.386244 a8 tay TAY -.386245 e2 20 sep #$20 SEP #$20 ; set A short -.386247 a9 af lda #$af LDA #`CS_TEXT_MEM_PTR -.386249 85 19 sta $19 STA CURSORPOS+2 -.38624b a2 12 00 ldx #$0012 LDX #18 -.38624e 68 pla PLA -.38624f HS_LOOP -.38624f 97 17 sta [$17],y STA [CURSORPOS],Y -.386251 c8 iny INY -.386252 ca dex DEX -.386253 d0 fa bne $38624f BNE HS_LOOP -.386255 6b rtl RTL -.386256 SELECT_NEXT_FILE -.386256 18 clc CLC -.386257 ad 1f 03 lda $031f LDA SDOS_LINE_SELECT -.38625a 1a inc a INC A -.38625b c9 26 cmp #$26 CMP #38 -.38625d b0 0f bcs $38626e BCS DO_NOT_SELECT -.38625f a9 50 lda #$50 LDA #$50 ; black background -.386261 22 29 62 38 jsl $386229 JSL TEXT_COLOUR_SELECTED -.386265 ee 1f 03 inc $031f INC SDOS_LINE_SELECT -.386268 a9 05 lda #$05 LDA #5 ; yellow background -.38626a 22 29 62 38 jsl $386229 JSL TEXT_COLOUR_SELECTED -.38626e DO_NOT_SELECT -.38626e 6b rtl RTL -.38626f SELECT_PREVIOUS_FILE -.38626f 18 clc CLC -.386270 ad 1f 03 lda $031f LDA SDOS_LINE_SELECT -.386273 3a dec a DEC A -.386274 30 f8 bmi $38626e BMI DO_NOT_SELECT -.386276 a9 50 lda #$50 LDA #$50 ; black background -.386278 22 29 62 38 jsl $386229 JSL TEXT_COLOUR_SELECTED -.38627c ce 1f 03 dec $031f DEC SDOS_LINE_SELECT -.38627f a9 05 lda #$05 LDA #5 ; yellow background -.386281 22 29 62 38 jsl $386229 JSL TEXT_COLOUR_SELECTED -.386285 6b rtl RTL +.3856db DRAW_DISPLAY +.3856db a9 50 lda #$50 LDA #SCREEN_WIDTH +.3856dd 85 11 sta $11 STA COLS_PER_LINE +.3856df a9 40 lda #$40 LDA #64 +.3856e1 85 15 sta $15 STA LINES_MAX +.3856e3 a9 50 lda #$50 LDA #80 +.3856e5 85 0f sta $0f STA COLS_VISIBLE +.3856e7 a9 3c lda #$3c LDA #60 +.3856e9 85 13 sta $13 STA LINES_VISIBLE +.3856eb a9 00 lda #$00 LDA #0 +.3856ed 8f 08 00 af sta $af0008 STA BORDER_X_SIZE +.3856f1 8f 09 00 af sta $af0009 STA BORDER_Y_SIZE +.3856f5 e2 20 sep #$20 SEP #$20 ; set A short +.3856f7 a9 20 lda #$20 LDA #$20 +.3856f9 8f 05 00 af sta $af0005 STA BORDER_COLOR_B +.3856fd 8f 07 00 af sta $af0007 STA BORDER_COLOR_R +.385701 a9 00 lda #$00 LDA #0 +.385703 8f 06 00 af sta $af0006 STA BORDER_COLOR_G +.385707 a9 01 lda #$01 LDA #Border_Ctrl_Enable +.385709 8f 04 00 af sta $af0004 STA BORDER_CTRL_REG +.38570d a9 01 lda #$01 LDA #Mstr_Ctrl_Text_Mode_En +.38570f 8f 00 00 af sta $af0000 STA MASTER_CTRL_REG_L +.385713 c2 20 rep #$20 REP #$20 ; set A long +.385715 a9 00 a0 lda #$a000 LDA #<>CS_TEXT_MEM_PTR ; store the initial screen buffer location +.385718 85 0c sta $0c STA SCREENBEGIN +.38571a 85 17 sta $17 STA CURSORPOS +.38571c e2 20 sep #$20 SEP #$20 ; set A short +.38571e a9 af lda #$af LDA #`CS_TEXT_MEM_PTR +.385720 85 0e sta $0e STA SCREENBEGIN+2 +.385722 85 19 sta $19 STA CURSORPOS+2 +.385724 c2 30 rep #$30 REP #$30 ; set A&X long +.385726 a9 bf 08 lda #$08bf LDA #SCREEN_WIDTH*28-1 +.385729 a2 80 3b ldx #$3b80 LDX #<>TRACKER_SCREEN +.38572c a0 00 a0 ldy #$a000 LDY #<>CS_TEXT_MEM_PTR +.38572f 54 af 38 mvn $38,$af MVN #`TRACKER_SCREEN,#$AF +.385732 a9 00 08 lda #$0800 LDA #256 * 8 +.385735 a2 80 45 ldx #$4580 LDX #<>FNXFONT +.385738 a0 00 80 ldy #$8000 LDY #<>FONT_MEMORY_BANK0 +.38573b 54 af 38 mvn $38,$af MVN #`FNXFONT,#$AF +.38573e a9 ff 60 lda #$60ff LDA #$60FF +.385741 8f 48 1f af sta $af1f48 STA FG_CHAR_LUT_PTR + 8; +.385745 8f 88 1f af sta $af1f88 STA BG_CHAR_LUT_PTR + 8; +.385749 a9 80 00 lda #$0080 LDA #$0080 +.38574c 8f 4a 1f af sta $af1f4a STA FG_CHAR_LUT_PTR + 10; +.385750 8f 8a 1f af sta $af1f8a STA BG_CHAR_LUT_PTR + 10; +.385754 a9 20 80 lda #$8020 LDA #$8020 +.385757 8f 4c 1f af sta $af1f4c STA FG_CHAR_LUT_PTR + 12; +.38575b 8f 8c 1f af sta $af1f8c STA BG_CHAR_LUT_PTR + 12; +.38575f a9 10 00 lda #$0010 LDA #$0010 +.385762 8f 4e 1f af sta $af1f4e STA FG_CHAR_LUT_PTR + 14; +.385766 8f 8e 1f af sta $af1f8e STA BG_CHAR_LUT_PTR + 14; +.38576a a9 cc cc lda #$cccc LDA #$CCCC +.38576d 8f 50 1f af sta $af1f50 STA FG_CHAR_LUT_PTR + 16; +.385771 8f 90 1f af sta $af1f90 STA BG_CHAR_LUT_PTR + 16; +.385775 a9 cc 00 lda #$00cc LDA #$00CC +.385778 8f 52 1f af sta $af1f52 STA FG_CHAR_LUT_PTR + 18; +.38577c 8f 92 1f af sta $af1f92 STA BG_CHAR_LUT_PTR + 18; +.385780 a9 22 dd lda #$dd22 LDA #$DD22 +.385783 8f 54 1f af sta $af1f54 STA FG_CHAR_LUT_PTR + 20; +.385787 8f 94 1f af sta $af1f94 STA BG_CHAR_LUT_PTR + 20; +.38578b a9 dd 00 lda #$00dd LDA #$00DD +.38578e 8f 56 1f af sta $af1f56 STA FG_CHAR_LUT_PTR + 22; +.385792 8f 96 1f af sta $af1f96 STA BG_CHAR_LUT_PTR + 22; +.385796 a2 00 14 ldx #$1400 LDX #SCREEN_WIDTH*64 +.385799 e2 20 sep #$20 SEP #$20 ; set A short +.38579b a9 20 lda #$20 LDA #$20 +.38579d SETTEXTCOLOR +.38579d 9f ff bf af sta $afbfff,x STA CS_COLOR_MEM_PTR-1,X +.3857a1 ca dex DEX +.3857a2 d0 f9 bne $38579d BNE SETTEXTCOLOR +.3857a4 a0 e0 0b ldy #$0be0 LDY #38 * SCREEN_WIDTH +.3857a7 20 79 5a jsr $385a79 JSR REVERSE_LUT +.3857aa 20 d6 5a jsr $385ad6 JSR HIGHLIGHT_MODE +.3857ad 20 6d 5b jsr $385b6d JSR DISPLAY_ACTIVE_CHANNELS +.3857b0 60 rts RTS +.3857b1 WRITE_HEX +.3857b1 48 pha PHA +.3857b2 da phx PHX +.3857b3 5a phy PHY +.3857b4 8f 01 0f 38 sta $380f01 STA @lTEMP_STORAGE +.3857b8 29 f0 and #$f0 AND #$F0 +.3857ba 4a lsr a lsr A +.3857bb 4a lsr a lsr A +.3857bc 4a lsr a lsr A +.3857bd 4a lsr a lsr A +.3857be e2 10 sep #$10 SEP #$10 ; set X short +.3857c0 aa tax TAX +.3857c1 bf 05 0f 38 lda $380f05,x LDA HEX_MAP,X +.3857c5 8f 03 0f 38 sta $380f03 STA @lLOW_NIBBLE +.3857c9 af 01 0f 38 lda $380f01 LDA @lTEMP_STORAGE +.3857cd 29 0f and #$0f AND #$0F +.3857cf aa tax TAX +.3857d0 bf 05 0f 38 lda $380f05,x LDA HEX_MAP,X +.3857d4 8f 04 0f 38 sta $380f04 STA @lHIGH_NIBBLE +.3857d8 c2 30 rep #$30 REP #$30 ; set A&X long +.3857da 7a ply PLY +.3857db af 03 0f 38 lda $380f03 LDA @lLOW_NIBBLE +.3857df 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.3857e1 a9 30 30 lda #$3030 LDA #$3030 +.3857e4 bb tyx TYX +.3857e5 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X +.3857e9 e2 20 sep #$20 SEP #$20 ; set A short +.3857eb fa plx PLX +.3857ec 68 pla PLA +.3857ed 60 rts RTS +.3857ee WRITE_OFF_ON +.3857ee da phx PHX +.3857ef c9 00 cmp #$00 CMP #0 +.3857f1 f0 25 beq $385818 BEQ DISPLAY_OFF +.3857f3 a9 4f lda #$4f LDA #'O' +.3857f5 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.3857f7 a9 30 lda #$30 LDA #$30 +.3857f9 bb tyx TYX +.3857fa 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X +.3857fe c8 iny INY +.3857ff a9 6e lda #$6e LDA #'n' +.385801 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385803 a9 30 lda #$30 LDA #$30 +.385805 bb tyx TYX +.385806 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X +.38580a c8 iny INY +.38580b a9 20 lda #$20 LDA #$20 +.38580d 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.38580f a9 30 lda #$30 LDA #$30 +.385811 bb tyx TYX +.385812 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X +.385816 80 23 bra $38583b BRA ON_OFF_DONE +.385818 DISPLAY_OFF +.385818 a9 4f lda #$4f LDA #'O' +.38581a 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.38581c a9 30 lda #$30 LDA #$30 +.38581e bb tyx TYX +.38581f 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X +.385823 c8 iny INY +.385824 a9 66 lda #$66 LDA #'f' +.385826 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385828 a9 30 lda #$30 LDA #$30 +.38582a bb tyx TYX +.38582b 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X +.38582f c8 iny INY +.385830 a9 66 lda #$66 LDA #'f' +.385832 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385834 a9 30 lda #$30 LDA #$30 +.385836 bb tyx TYX +.385837 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X +.38583b ON_OFF_DONE +.38583b fa plx PLX +.38583c 60 rts RTS +.38583d WRITE_INSTRUMENT_NAME +.38583d a9 0a lda #$0a LDA #10 +.38583f 8f 01 0f 38 sta $380f01 STA @lTEMP_STORAGE +.385843 WRITE_CHAR +.385843 a7 67 lda [$67] LDA [INSTR_ADDR] +.385845 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385847 e6 67 inc $67 INC INSTR_ADDR +.385849 d0 02 bne $38584d BNE WRITE_CONTINUE +.38584b e6 68 inc $68 INC INSTR_ADDR + 1 +.38584d WRITE_CONTINUE +.38584d a9 30 lda #$30 LDA #$30 +.38584f bb tyx TYX +.385850 9f 00 c0 af sta $afc000,x STA @lCS_COLOR_MEM_PTR, X +.385854 c8 iny INY +.385855 af 01 0f 38 lda $380f01 LDA @lTEMP_STORAGE +.385859 3a dec a DEC A +.38585a 8f 01 0f 38 sta $380f01 STA @lTEMP_STORAGE +.38585e d0 e3 bne $385843 BNE WRITE_CHAR +.385860 60 rts RTS +.385861 DISPLAY_PATTERN +.385861 8b phb PHB +.385862 0b phd PHD +.385863 a9 39 lda #$39 LDA #`PATTERNS +.385865 85 72 sta $72 STA PTRN_ADDR + 2 +.385867 af 18 0f 38 lda $380f18 LDA PATTERN_NUM ; this is a BCD value so it won't work once values are above 9 +.38586b a0 43 07 ldy #$0743 LDY #23*SCREEN_WIDTH + 19 +.38586e 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.385871 3a dec a DEC A ; use 0 based offsets +.385872 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A +.385876 9c 01 01 stz $0101 STZ UNSIGNED_MULT_A + 1 +.385879 c2 20 rep #$20 REP #$20 ; set A long +.38587b a9 01 07 lda #$0701 LDA #PATTERN_BYTES ; this is the pattern size +.38587e 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B +.385882 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT +.385886 1a inc a INC A ; skip the pattern # byte +.385887 85 70 sta $70 STA PTRN_ADDR +.385889 e2 20 sep #$20 SEP #$20 ; set A short +.38588b af 19 0f 38 lda $380f19 LDA LINE_NUM_DEC +.38588f a0 37 07 ldy #$0737 LDY #23*SCREEN_WIDTH + 7 +.385892 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.385895 a9 20 lda #$20 LDA #32 +.385897 85 6e sta $6e STA REM_LINES +.385899 a0 c0 a8 ldy #$a8c0 LDY #<>CS_TEXT_MEM_PTR + SCREEN_WIDTH * 28 ; top of the pattern display +.38589c a5 6c lda $6c LDA LINE_NUM_HEX +.38589e c9 0a cmp #$0a CMP #10 +.3858a0 b0 2f bcs $3858d1 BCS DRAW_DATA ; if line# is greater than 10, skip blank lines and topline +.3858a2 DRAW_BLANK_LINES +.3858a2 38 sec SEC +.3858a3 a9 09 lda #$09 LDA #9 +.3858a5 e5 6c sbc $6c SBC LINE_NUM_HEX +.3858a7 f0 15 beq $3858be BEQ DRAW_TOP_LINE +.3858a9 85 6d sta $6d STA TAB_COUNTER +.3858ab BLANKS_LOOP +.3858ab c2 20 rep #$20 REP #$20 ; set A long +.3858ad a9 4f 00 lda #$004f LDA #SCREEN_WIDTH-1 +.3858b0 a2 40 44 ldx #$4440 LDX #<>blank_line +.3858b3 54 af 38 mvn $38,$af MVN #`blank_line,#$AF +.3858b6 e2 20 sep #$20 SEP #$20 ; set A short +.3858b8 c6 6e dec $6e DEC REM_LINES +.3858ba c6 6d dec $6d DEC TAB_COUNTER +.3858bc d0 ed bne $3858ab BNE BLANKS_LOOP +.3858be DRAW_TOP_LINE +.3858be c2 20 rep #$20 REP #$20 ; set A long +.3858c0 a9 4f 00 lda #$004f LDA #SCREEN_WIDTH-1 +.3858c3 a2 50 43 ldx #$4350 LDX #<>top_line +.3858c6 54 af 38 mvn $38,$af MVN #`top_line,#$AF +.3858c9 e2 20 sep #$20 SEP #$20 ; set A short +.3858cb c6 6e dec $6e DEC REM_LINES +.3858cd a9 01 lda #$01 LDA #1 +.3858cf 80 05 bra $3858d6 BRA MOD_TOP_LINE +.3858d1 DRAW_DATA +.3858d1 38 sec SEC +.3858d2 a5 6c lda $6c LDA LINE_NUM_HEX +.3858d4 e9 09 sbc #$09 SBC #9 +.3858d6 MOD_TOP_LINE +.3858d6 85 6d sta $6d STA TAB_COUNTER +.3858d8 TRIPLET +.3858d8 a9 00 lda #$00 LDA #0 +.3858da 48 pha PHA +.3858db ab plb PLB +.3858dc a9 1c lda #$1c LDA #LINE_BYTES +.3858de 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A +.3858e2 9c 01 01 stz $0101 STZ UNSIGNED_MULT_A + 1 +.3858e5 9c 03 01 stz $0103 STZ UNSIGNED_MULT_B + 1 +.3858e8 a5 6d lda $6d LDA TAB_COUNTER +.3858ea 3a dec a DEC A ; use zero based offset +.3858eb 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B +.3858ef c2 20 rep #$20 REP #$20 ; set A long +.3858f1 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT +.3858f5 85 73 sta $73 STA LINE_ADDR +.3858f7 e2 20 sep #$20 SEP #$20 ; set A short +.3858f9 a5 6d lda $6d LDA TAB_COUNTER +.3858fb 29 03 and #$03 AND #3 +.3858fd f0 15 beq $385914 BEQ draw_tick_line +.3858ff c2 20 rep #$20 REP #$20 ; set A long +.385901 a9 4f 00 lda #$004f LDA #SCREEN_WIDTH-1 +.385904 a2 e0 44 ldx #$44e0 LDX #<>untick_line +.385907 54 af 38 mvn $38,$af MVN #`untick_line,#$AF +.38590a e2 20 sep #$20 SEP #$20 ; set A short +.38590c 20 93 59 jsr $385993 JSR DRAW_LINE_DATA +.38590f c6 6e dec $6e DEC REM_LINES +.385911 4c 26 59 jmp $385926 JMP next_line +.385914 draw_tick_line +.385914 c2 20 rep #$20 REP #$20 ; set A long +.385916 a9 4f 00 lda #$004f LDA #SCREEN_WIDTH-1 +.385919 a2 90 44 ldx #$4490 LDX #<>tick_line +.38591c 54 af 38 mvn $38,$af MVN #`tick_line,#$AF +.38591f e2 20 sep #$20 SEP #$20 ; set A short +.385921 20 93 59 jsr $385993 JSR DRAW_LINE_DATA +.385924 c6 6e dec $6e DEC REM_LINES +.385926 next_line +.385926 e6 6d inc $6d INC TAB_COUNTER +.385928 a5 6d lda $6d LDA TAB_COUNTER +.38592a c9 41 cmp #$41 CMP #65 +.38592c f0 06 beq $385934 BEQ DRAW_BOTTOM_BAR +.38592e a5 6e lda $6e LDA REM_LINES +.385930 d0 a6 bne $3858d8 BNE TRIPLET +.385932 f0 22 beq $385956 BEQ DRAW_LINE_DONE +.385934 DRAW_BOTTOM_BAR +.385934 c2 20 rep #$20 REP #$20 ; set A long +.385936 a9 4f 00 lda #$004f LDA #SCREEN_WIDTH-1 +.385939 a2 f0 43 ldx #$43f0 LDX #<>btm_line +.38593c 54 af 38 mvn $38,$af MVN #`btm_line,#$AF +.38593f e2 20 sep #$20 SEP #$20 ; set A short +.385941 a5 6e lda $6e LDA REM_LINES +.385943 f0 11 beq $385956 BEQ DRAW_LINE_DONE +.385945 BLANKS_BTM_LOOP +.385945 c2 20 rep #$20 REP #$20 ; set A long +.385947 a9 4f 00 lda #$004f LDA #SCREEN_WIDTH-1 +.38594a a2 40 44 ldx #$4440 LDX #<>blank_line +.38594d 54 af 38 mvn $38,$af MVN #`blank_line,#$AF +.385950 e2 20 sep #$20 SEP #$20 ; set A short +.385952 c6 6e dec $6e DEC REM_LINES +.385954 d0 ef bne $385945 BNE BLANKS_BTM_LOOP +.385956 DRAW_LINE_DONE +.385956 2b pld PLD +.385957 ab plb PLB +.385958 60 rts RTS +.385959 DISPLAY_FILENAME +.385959 a0 00 00 ldy #$0000 LDY #0 +.38595c a2 63 07 ldx #$0763 LDX #23*SCREEN_WIDTH + 51 +.38595f DF_LOOP +.38595f b7 51 lda [$51],y LDA [SDOS_FILE_REC_PTR],Y +.385961 5a phy PHY +.385962 9b txy TXY +.385963 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385965 e8 inx INX +.385966 7a ply PLY +.385967 c8 iny INY +.385968 c0 08 00 cpy #$0008 CPY #8 +.38596b d0 08 bne $385975 BNE DF_NOT_DOT +.38596d a9 2e lda #$2e LDA #'.' +.38596f 5a phy PHY +.385970 9b txy TXY +.385971 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385973 e8 inx INX +.385974 7a ply PLY +.385975 DF_NOT_DOT +.385975 c0 0b 00 cpy #$000b CPY #11 +.385978 d0 e5 bne $38595f BNE DF_LOOP +.38597a 9b txy TXY +.38597b c8 iny INY +.38597c c8 iny INY +.38597d a9 76 lda #$76 LDA #'v' +.38597f 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385981 c8 iny INY +.385982 af 67 6a 38 lda $386a67 LDA @lTuneInfo.version +.385986 89 02 bit #$02 BIT #2 +.385988 d0 04 bne $38598e BNE DF_V2 +.38598a a9 31 lda #$31 LDA #'1' +.38598c 80 02 bra $385990 BRA DF_DONE +.38598e DF_V2 +.38598e a9 32 lda #$32 LDA #'2' +.385990 DF_DONE +.385990 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385992 60 rts RTS +.385993 DRAW_LINE_DATA +.385993 5a phy PHY +.385994 da phx PHX +.385995 a9 09 lda #$09 LDA #9 ; number of channels to populate +.385997 85 f7 sta $f7 STA RAD_CHANNEL +.385999 c2 20 rep #$20 REP #$20 ; set A long +.38599b 98 tya TYA ; copy Y into A +.38599c 38 sec SEC +.38599d e9 50 a0 sbc #$a050 SBC #$A000 + SCREEN_WIDTH +.3859a0 aa tax TAX +.3859a1 e2 20 sep #$20 SEP #$20 ; set A short +.3859a3 a4 73 ldy $73 LDY LINE_ADDR +.3859a5 c8 iny INY ; skip the line number +.3859a6 NEXT_CHANNEL +.3859a6 64 4e stz $4e STZ RAD_TEMP +.3859a8 b7 70 lda [$70],y LDA [PTRN_ADDR],Y ; note/octave +.3859aa e8 inx INX ; skip the first column +.3859ab c8 iny INY +.3859ac c9 00 cmp #$00 CMP #0 +.3859ae d0 04 bne $3859b4 BNE DL_DRAW_NOTE +.3859b0 e8 inx INX +.3859b1 e8 inx INX +.3859b2 80 03 bra $3859b7 BRA DL_SKIP_NOTE_DISPLAY +.3859b4 DL_DRAW_NOTE +.3859b4 20 55 5a jsr $385a55 JSR DISPLAY_NOTE_OCTAVE +.3859b7 DL_SKIP_NOTE_DISPLAY +.3859b7 2a rol a ROL A ; put bit 7 into the carry +.3859b8 90 0b bcc $3859c5 BCC SKIP_MID_COL +.3859ba a9 31 lda #$31 LDA #'1' +.3859bc 5a phy PHY +.3859bd 9b txy TXY +.3859be 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.3859c0 7a ply PLY +.3859c1 a9 10 lda #$10 LDA #$10 +.3859c3 85 4e sta $4e STA RAD_TEMP +.3859c5 SKIP_MID_COL +.3859c5 e8 inx INX ; skip the middle column +.3859c6 b7 70 lda [$70],y LDA [PTRN_ADDR],Y ; instrument/effect +.3859c8 c8 iny INY +.3859c9 20 e2 59 jsr $3859e2 JSR DISPLAY_VALUE_SKIP_LOW_NIBBLE_IF_ZERO +.3859cc c9 00 cmp #$00 CMP #0 ; if the effect byte is 0, don't display the next value +.3859ce d0 04 bne $3859d4 BNE SHOW_EFFECT +.3859d0 e8 inx INX +.3859d1 e8 inx INX +.3859d2 80 05 bra $3859d9 BRA DL_SKIP_EFFECT +.3859d4 SHOW_EFFECT +.3859d4 b7 70 lda [$70],y LDA [PTRN_ADDR],Y ; +.3859d6 20 34 5a jsr $385a34 JSR DISPLAY_DEC_VALUE +.3859d9 DL_SKIP_EFFECT +.3859d9 c8 iny INY +.3859da e8 inx INX ; skip the vertical bar +.3859db c6 f7 dec $f7 DEC RAD_CHANNEL +.3859dd d0 c7 bne $3859a6 BNE NEXT_CHANNEL +.3859df fa plx PLX +.3859e0 7a ply PLY +.3859e1 60 rts RTS +.3859e2 DISPLAY_VALUE_SKIP_LOW_NIBBLE_IF_ZERO +.3859e2 5a phy PHY +.3859e3 48 pha PHA +.3859e4 9b txy TXY +.3859e5 a2 00 00 ldx #$0000 LDX #0 +.3859e8 eb xba XBA +.3859e9 a9 00 lda #$00 LDA #0 +.3859eb eb xba XBA +.3859ec 29 f0 and #$f0 AND #$F0 ; high-nibble +.3859ee d0 09 bne $3859f9 BNE DV_DISPLAY_VALUE +.3859f0 a5 4e lda $4e LDA RAD_TEMP +.3859f2 d0 03 bne $3859f7 BNE DV_DISPLAY_ZERO +.3859f4 c8 iny INY +.3859f5 80 0e bra $385a05 BRA DV_LOW_NIBBLE +.3859f7 DV_DISPLAY_ZERO +.3859f7 a9 00 lda #$00 LDA #0 +.3859f9 DV_DISPLAY_VALUE +.3859f9 4a lsr a LSR +.3859fa 4a lsr a LSR +.3859fb 4a lsr a LSR +.3859fc 4a lsr a LSR +.3859fd aa tax TAX +.3859fe bf 05 0f 38 lda $380f05,x LDA HEX_MAP, X +.385a02 97 0c sta [$0c],y STA [SCREENBEGIN],Y +.385a04 c8 iny INY +.385a05 DV_LOW_NIBBLE +.385a05 68 pla PLA +.385a06 29 0f and #$0f AND #$F ; low-nibble - effect +.385a08 f0 07 beq $385a11 BEQ SKIP_VALUE +.385a0a aa tax TAX +.385a0b bf 05 0f 38 lda $380f05,x LDA HEX_MAP, X +.385a0f 97 0c sta [$0c],y STA [SCREENBEGIN],Y +.385a11 SKIP_VALUE +.385a11 c8 iny INY +.385a12 bb tyx TYX +.385a13 7a ply PLY +.385a14 60 rts RTS +.385a15 DISPLAY_VALUE +.385a15 5a phy PHY +.385a16 48 pha PHA +.385a17 9b txy TXY +.385a18 29 f0 and #$f0 AND #$F0 ; high-nibble +.385a1a 4a lsr a LSR +.385a1b 4a lsr a LSR +.385a1c 4a lsr a LSR +.385a1d 4a lsr a LSR +.385a1e aa tax TAX +.385a1f bf 05 0f 38 lda $380f05,x LDA HEX_MAP, X +.385a23 97 0c sta [$0c],y STA [SCREENBEGIN],Y +.385a25 c8 iny INY +.385a26 68 pla PLA +.385a27 29 0f and #$0f AND #$F ; low-nibble +.385a29 aa tax TAX +.385a2a bf 05 0f 38 lda $380f05,x LDA HEX_MAP, X +.385a2e 97 0c sta [$0c],y STA [SCREENBEGIN],Y +.385a30 c8 iny INY +.385a31 bb tyx TYX +.385a32 7a ply PLY +.385a33 60 rts RTS +.385a34 DISPLAY_DEC_VALUE +.385a34 48 pha PHA +.385a35 29 07 and #$07 AND #$7 +.385a37 85 6f sta $6f STA DEC_MEM +.385a39 68 pla PLA +.385a3a 29 f8 and #$f8 AND #$F8 ; count in BCD in factors of 8 +.385a3c 18 clc CLC +.385a3d 4a lsr a LSR +.385a3e 4a lsr a LSR +.385a3f 4a lsr a LSR +.385a40 85 76 sta $76 STA CONV_VAL +.385a42 f8 sed SED ; switch to decimal mode +.385a43 f0 09 beq $385a4e BEQ ADD_DEC +.385a45 18 clc CLC +.385a46 a9 00 lda #$00 LDA #0 +.385a48 MULT_DEC +.385a48 69 08 adc #$08 ADC #$8 +.385a4a c6 76 dec $76 DEC CONV_VAL +.385a4c d0 fa bne $385a48 BNE MULT_DEC +.385a4e ADD_DEC +.385a4e 65 6f adc $6f ADC DEC_MEM +.385a50 20 15 5a jsr $385a15 JSR DISPLAY_VALUE +.385a53 d8 cld CLD +.385a54 60 rts RTS +.385a55 DISPLAY_NOTE_OCTAVE +.385a55 5a phy PHY +.385a56 48 pha PHA +.385a57 48 pha PHA +.385a58 9b txy TXY +.385a59 c2 20 rep #$20 REP #$20 ; set A long +.385a5b 29 0f 00 and #$000f AND #$F ; low-nibble - C#=1, D=2, ... C=12, 0 is no note and $F is Key Off +.385a5e aa tax TAX +.385a5f e2 20 sep #$20 SEP #$20 ; set A short +.385a61 bf 5a 6a 38 lda $386a5a,x LDA @lnote_array, X +.385a65 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385a67 c8 iny INY +.385a68 68 pla PLA +.385a69 29 70 and #$70 AND #$70 ; high-nibble +.385a6b 4a lsr a LSR +.385a6c 4a lsr a LSR +.385a6d 4a lsr a LSR +.385a6e 4a lsr a LSR +.385a6f 18 clc CLC +.385a70 69 30 adc #$30 ADC #$30 +.385a72 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385a74 c8 iny INY +.385a75 bb tyx TYX +.385a76 68 pla PLA +.385a77 7a ply PLY +.385a78 60 rts RTS +.385a79 REVERSE_LUT +.385a79 8b phb PHB +.385a7a a9 af lda #$af LDA #`CS_COLOR_MEM_PTR +.385a7c 48 pha PHA +.385a7d ab plb PLB +.385a7e a9 09 lda #$09 LDA #9 +.385a80 85 6d sta $6d STA TAB_COUNTER +.385a82 REVERSE_LUT_TABS +.385a82 a9 42 lda #$42 LDA #$42 ; purple background and white foreground +.385a84 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y +.385a87 c8 iny INY +.385a88 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y +.385a8b c8 iny INY +.385a8c 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y +.385a8f c8 iny INY +.385a90 a9 52 lda #$52 LDA #$52 ; purple background and yellow foreground +.385a92 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y +.385a95 c8 iny INY +.385a96 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y +.385a99 c8 iny INY +.385a9a a9 42 lda #$42 LDA #$42 ; purple background and white foreground +.385a9c 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y +.385a9f c8 iny INY +.385aa0 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y +.385aa3 c8 iny INY +.385aa4 99 00 c0 sta $afc000,y STA CS_COLOR_MEM_PTR, Y +.385aa7 c8 iny INY +.385aa8 c8 iny INY ; skip separator +.385aa9 c6 6d dec $6d DEC TAB_COUNTER +.385aab d0 d5 bne $385a82 BNE REVERSE_LUT_TABS +.385aad ab plb PLB +.385aae 60 rts RTS +=406 INSTR_HL_SCR = SCREEN_WIDTH * 5 + 6 +=484 INSTR_NUM_HL_SCR = SCREEN_WIDTH * 6 + 4 +=453 ORDER_HL_SCR = SCREEN_WIDTH * 5 + 53 +=2081 PTTRN_HL_SCR = SCREEN_WIDTH * 26 + 1 +.385aaf DISPLAY_SPEED +.385aaf 5a phy PHY +.385ab0 af 69 6a 38 lda $386a69 LDA @lTuneInfo.InitialSpeed +.385ab4 a0 58 07 ldy #$0758 LDY #23*SCREEN_WIDTH + 40 +.385ab7 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.385aba af 6a 6a 38 lda $386a6a LDA @lTuneInfo.hasSlowTimer +.385abe f0 07 beq $385ac7 BEQ DS_DONE +.385ac0 a9 2a lda #$2a LDA #'*' +.385ac2 a0 57 07 ldy #$0757 LDY #23*SCREEN_WIDTH + 39 +.385ac5 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385ac7 DS_DONE +.385ac7 7a ply PLY +.385ac8 60 rts RTS +.385ac9 DISPLAY_BPM +.385ac9 60 rts RTS +.385aca HL_CLR_TABLE +>385aca 40 20 20 10 .byte $40, $20, $20, $10 +>385ace 20 40 20 30 .byte $20, $40, $20, $30 +>385ad2 20 20 40 20 .byte $20, $20, $40, $20 +.385ad6 HIGHLIGHT_MODE +.385ad6 a9 00 lda #$00 LDA #0 +.385ad8 eb xba XBA +.385ad9 af 15 0f 38 lda $380f15 LDA STATE_MACHINE +.385add 29 30 and #$30 AND #$30 +.385adf 4a lsr a LSR +.385ae0 4a lsr a LSR +.385ae1 48 pha PHA +.385ae2 48 pha PHA +.385ae3 aa tax TAX +.385ae4 bf ca 5a 38 lda $385aca,x LDA HL_CLR_TABLE,X +.385ae8 a2 0a 00 ldx #$000a LDX #10 +.385aeb a0 96 21 ldy #$2196 LDY #$2000 + INSTR_HL_SCR +.385aee INSTR_HIGHLIGHT_LOOP +.385aee 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385af0 c8 iny INY +.385af1 ca dex DEX +.385af2 d0 fa bne $385aee BNE INSTR_HIGHLIGHT_LOOP +.385af4 a0 e4 21 ldy #$21e4 LDY #$2000 + INSTR_NUM_HL_SCR +.385af7 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385af9 68 pla PLA +.385afa aa tax TAX +.385afb bf cb 5a 38 lda $385acb,x LDA HL_CLR_TABLE+1,X +.385aff a2 05 00 ldx #$0005 LDX #5 +.385b02 a0 c5 21 ldy #$21c5 LDY #$2000 + ORDER_HL_SCR +.385b05 ORDER_HIGHLIGHT_LOOP +.385b05 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385b07 c8 iny INY +.385b08 ca dex DEX +.385b09 d0 fa bne $385b05 BNE ORDER_HIGHLIGHT_LOOP +.385b0b 68 pla PLA +.385b0c aa tax TAX +.385b0d bf cc 5a 38 lda $385acc,x LDA HL_CLR_TABLE+2,X +.385b11 a2 09 00 ldx #$0009 LDX #9 +.385b14 a0 21 28 ldy #$2821 LDY #$2000 + PTTRN_HL_SCR +.385b17 HL_PATTERN_LOOP +.385b17 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385b19 c8 iny INY +.385b1a c8 iny INY +.385b1b c8 iny INY +.385b1c c8 iny INY +.385b1d c8 iny INY +.385b1e 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385b20 c8 iny INY +.385b21 c8 iny INY +.385b22 c8 iny INY +.385b23 c8 iny INY +.385b24 ca dex DEX +.385b25 d0 f0 bne $385b17 BNE HL_PATTERN_LOOP +.385b27 20 6d 5b jsr $385b6d JSR DISPLAY_ACTIVE_CHANNELS +.385b2a 60 rts RTS +.385b2b DISPLAY_ORDERS +.385b2b af 68 6a 38 lda $386a68 LDA @lTuneInfo.songLength +.385b2f f0 3b beq $385b6c BEQ DO_DONE +.385b31 c9 0e cmp #$0e CMP #14 +.385b33 90 02 bcc $385b37 BCC DO_DISPLAY_ORDERS +.385b35 a9 0e lda #$0e LDA #14 ; only display up to 14 orders +.385b37 DO_DISPLAY_ORDERS +.385b37 85 6d sta $6d STA TAB_COUNTER +.385b39 a2 00 00 ldx #$0000 LDX #0 +.385b3c a0 65 02 ldy #$0265 LDY #SCREEN_WIDTH * 7 + 53 +.385b3f c2 20 rep #$20 REP #$20 ; set A long +.385b41 a9 24 fc lda #$fc24 LDA #<>ORDERS +.385b44 85 f0 sta $f0 STA RAD_ADDR +.385b46 a9 39 00 lda #$0039 LDA #<`ORDERS +.385b49 85 f2 sta $f2 STA RAD_ADDR + 2 +.385b4b e2 20 sep #$20 SEP #$20 ; set A short +.385b4d NEXT_ORDER +.385b4d 8a txa TXA +.385b4e 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.385b51 c8 iny INY +.385b52 c8 iny INY +.385b53 c8 iny INY +.385b54 5a phy PHY +.385b55 9b txy TXY +.385b56 b7 f0 lda [$f0],y LDA [RAD_ADDR],Y +.385b58 1a inc a INC A +.385b59 7a ply PLY +.385b5a 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.385b5d e8 inx INX +.385b5e c2 20 rep #$20 REP #$20 ; set A long +.385b60 98 tya TYA +.385b61 18 clc CLC +.385b62 69 4d 00 adc #$004d ADC #SCREEN_WIDTH - 3 +.385b65 a8 tay TAY +.385b66 e2 20 sep #$20 SEP #$20 ; set A short +.385b68 c6 6d dec $6d DEC TAB_COUNTER +.385b6a d0 e1 bne $385b4d BNE NEXT_ORDER +.385b6c DO_DONE +.385b6c 60 rts RTS +.385b6d DISPLAY_ACTIVE_CHANNELS +.385b6d a2 09 00 ldx #$0009 LDX #9 +.385b70 a0 6b 28 ldy #$286b LDY #$2000 + SCREEN_WIDTH * 26 + 75 +.385b73 DAC_LOOP +.385b73 bf b1 68 38 lda $3868b1,x LDA CHANNELS-1,X +.385b77 f0 06 beq $385b7f BEQ INACTIVE_CHANNEL +.385b79 a9 40 lda #$40 LDA #$40 ; white +.385b7b 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385b7d 80 04 bra $385b83 BRA DAC_CONTINUE +.385b7f INACTIVE_CHANNEL +.385b7f a9 20 lda #$20 LDA #$20 ; purple +.385b81 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.385b83 DAC_CONTINUE +.385b83 88 dey DEY +.385b84 88 dey DEY +.385b85 88 dey DEY +.385b86 88 dey DEY +.385b87 88 dey DEY +.385b88 88 dey DEY +.385b89 88 dey DEY +.385b8a 88 dey DEY +.385b8b 88 dey DEY +.385b8c ca dex DEX +.385b8d d0 e4 bne $385b73 BNE DAC_LOOP +.385b8f 60 rts RTS +.385b90 DISPLAY_CHAR +.385b90 5a phy PHY +.385b91 a4 1a ldy $1a LDY CURSORX +.385b93 97 0c sta [$0c],y STA [SCREENBEGIN],Y +.385b95 c8 iny INY +.385b96 84 1a sty $1a STY CURSORX +.385b98 7a ply PLY +.385b99 6b rtl RTL +.385b9a DISPLAY_NEXT_LINE_dep +.385b9a c2 20 rep #$20 REP #$20 ; set A long +.385b9c a5 1a lda $1a LDA CURSORX +.385b9e 29 e0 ff and #$ffe0 AND #$FFE0 ; lines are $0, 80, 160, etc +.385ba1 18 clc CLC +.385ba2 69 6f 00 adc #$006f ADC #SCREEN_WIDTH + 31 ; move to the next line and offset to the file box +.385ba5 85 1a sta $1a STA CURSORX +.385ba7 e2 20 sep #$20 SEP #$20 ; set A short +.385ba9 6b rtl RTL +.385baa DISPLAY_MSG +.385baa 8b phb PHB +.385bab 48 pha PHA ; begin setdbr macro +.385bac 08 php PHP +.385bad e2 20 sep #$20 SEP #$20 ; set A short +.385baf a9 00 lda #$00 LDA #`CS_COLOR_MEM_PTR ; store the initial colour buffer location +.385c2b 85 17 sta $17 STA CURSORPOS +.385c2d ad 1f 03 lda $031f LDA SDOS_LINE_SELECT +.385c30 8d 00 01 sta $0100 STA UNSIGNED_MULT_A +.385c33 a9 50 00 lda #$0050 LDA #SCREEN_WIDTH +.385c36 8d 02 01 sta $0102 STA UNSIGNED_MULT_B +.385c39 ad 04 01 lda $0104 LDA UNSIGNED_MULT_RESULT +.385c3c 18 clc CLC +.385c3d 69 8f 03 adc #$038f ADC #SCREEN_WIDTH * 11 + 31 +.385c40 a8 tay TAY +.385c41 e2 20 sep #$20 SEP #$20 ; set A short +.385c43 a9 af lda #$af LDA #`CS_TEXT_MEM_PTR +.385c45 85 19 sta $19 STA CURSORPOS+2 +.385c47 a2 12 00 ldx #$0012 LDX #18 +.385c4a 68 pla PLA +.385c4b HS_LOOP +.385c4b 97 17 sta [$17],y STA [CURSORPOS],Y +.385c4d c8 iny INY +.385c4e ca dex DEX +.385c4f d0 fa bne $385c4b BNE HS_LOOP +.385c51 6b rtl RTL +.385c52 SELECT_NEXT_FILE +.385c52 18 clc CLC +.385c53 ad 1f 03 lda $031f LDA SDOS_LINE_SELECT +.385c56 1a inc a INC A +.385c57 c9 26 cmp #$26 CMP #38 +.385c59 b0 0f bcs $385c6a BCS DO_NOT_SELECT +.385c5b a9 50 lda #$50 LDA #$50 ; black background +.385c5d 22 25 5c 38 jsl $385c25 JSL TEXT_COLOUR_SELECTED +.385c61 ee 1f 03 inc $031f INC SDOS_LINE_SELECT +.385c64 a9 05 lda #$05 LDA #5 ; yellow background +.385c66 22 25 5c 38 jsl $385c25 JSL TEXT_COLOUR_SELECTED +.385c6a DO_NOT_SELECT +.385c6a 6b rtl RTL +.385c6b SELECT_PREVIOUS_FILE +.385c6b 18 clc CLC +.385c6c ad 1f 03 lda $031f LDA SDOS_LINE_SELECT +.385c6f 3a dec a DEC A +.385c70 30 f8 bmi $385c6a BMI DO_NOT_SELECT +.385c72 a9 50 lda #$50 LDA #$50 ; black background +.385c74 22 25 5c 38 jsl $385c25 JSL TEXT_COLOUR_SELECTED +.385c78 ce 1f 03 dec $031f DEC SDOS_LINE_SELECT +.385c7b a9 05 lda #$05 LDA #5 ; yellow background +.385c7d 22 25 5c 38 jsl $385c25 JSL TEXT_COLOUR_SELECTED +.385c81 6b rtl RTL ;****** Return to file: tracker.asm @@ -5855,1477 +5749,1480 @@ >001a 00 00 cluster .word 0 >001c 00 00 size_l .word 0 >001e 00 00 size_h .word 0 -.386286 ISDOS_INIT -.386286 af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL -.38628a 29 fd and #$fd AND #~GABE_CTRL_SDC_LED -.38628c 09 02 ora #$02 ORA #GABE_CTRL_SDC_LED -.38628e 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL -.386292 c2 20 rep #$20 REP #$20 ; set A long -.386294 a9 00 00 lda #$0000 LDA #0 -.386297 8d 08 5f sta $5f08 STA SD_ROOT_OFFSET -.38629a 8d 22 5f sta $5f22 STA SD_NEXT_CLUSTER -.38629d e2 20 sep #$20 SEP #$20 ; set A short -.38629f 85 3f sta $3f STA SDCARD_PRSNT_MNT -.3862a1 a9 01 lda #$01 LDA #SDC_TRANS_INIT_SD -.3862a3 8f 02 ea af sta $afea02 STA SDC_TRANS_TYPE_REG -.3862a7 a9 01 lda #$01 LDA #SDC_TRANS_START -.3862a9 8f 03 ea af sta $afea03 STA SDC_TRANS_CONTROL_REG -.3862ad af 04 ea af lda $afea04 SD_WAIT LDA SDC_TRANS_STATUS_REG -.3862b1 29 01 and #$01 AND #SDC_TRANS_BUSY -.3862b3 c9 01 cmp #$01 CMP #SDC_TRANS_BUSY -.3862b5 f0 f6 beq $3862ad BEQ SD_WAIT -.3862b7 af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG -.3862bb f0 08 beq $3862c5 BEQ SD_INIT_SUCCESS -.3862bd a2 95 68 ldx #$6895 LDX #<>sd_no_card_msg -.3862c0 20 aa 61 jsr $3861aa JSR DISPLAY_MSG -.3862c3 80 06 bra $3862cb BRA SD_INIT_DONE -.3862c5 SD_INIT_SUCCESS -.3862c5 a9 01 lda #$01 LDA #1 -.3862c7 85 3f sta $3f STA SDCARD_PRSNT_MNT -.3862c9 80 00 bra $3862cb BRA SD_INIT_DONE -.3862cb SD_INIT_DONE -.3862cb af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL -.3862cf 29 fd and #$fd AND #~GABE_CTRL_SDC_LED -.3862d1 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL -.3862d5 6b rtl RTL -.3862d6 CALC_OFFSET_BYTES -.3862d6 a5 8a lda $8a LDA SD_MULT_AREA + 2 ; high 16-bits -.3862d8 0a asl a ASL A -.3862d9 85 8b sta $8b STA SD_MULT_AREA + 3 -.3862db 18 clc CLC -.3862dc a5 88 lda $88 LDA SD_MULT_AREA -.3862de 0a asl a ASL A -.3862df 85 89 sta $89 STA SD_MULT_AREA + 1 -.3862e1 90 02 bcc $3862e5 BCC CALC_DONE -.3862e3 e6 8b inc $8b INC SD_MULT_AREA + 3 -.3862e5 CALC_DONE -.3862e5 e2 20 sep #$20 SEP #$20 ; set A short -.3862e7 64 88 stz $88 stz SD_MULT_AREA -.3862e9 c2 20 rep #$20 REP #$20 ; set A long -.3862eb 60 rts RTS -.3862ec ISDOS_READ_MBR_BOOT -.3862ec a5 3f lda $3f LDA SDCARD_PRSNT_MNT ; this must be non-zero -.3862ee d0 01 bne $3862f1 BNE RMBR_CARD_PRESENT -.3862f0 6b rtl RTL -.3862f1 RMBR_CARD_PRESENT -.3862f1 c2 20 rep #$20 REP #$20 ; set A long -.3862f3 a9 00 60 lda #$6000 LDA #SD_BLK_BEGIN -.3862f6 85 80 sta $80 STA SD_DATA -.3862f8 a9 00 00 lda #$0000 LDA #0 -.3862fb 85 82 sta $82 STA SD_DATA + 2 -.3862fd a9 00 00 lda #$0000 LDA #0 -.386300 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG -.386304 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG -.386308 e2 20 sep #$20 SEP #$20 ; set A short -.38630a 22 d6 63 38 jsl $3863d6 JSL ISDOS_READ_BLOCK -.38630e af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG -.386312 f0 01 beq $386315 BEQ SD_CONTINUE_1 -.386314 6b rtl RTL -.386315 SD_CONTINUE_1 -.386315 c2 20 rep #$20 REP #$20 ; set A long -.386317 ad fe 61 lda $61fe LDA SD_BLK_BEGIN + 510 -.38631a c9 55 aa cmp #$aa55 CMP #$AA55 -.38631d f0 01 beq $386320 BEQ VALID_SIG -.38631f 6b rtl RTL -.386320 VALID_SIG -.386320 c2 20 rep #$20 REP #$20 ; set A long -.386322 a2 be 01 ldx #$01be LDX #446 ; offset to first partition -.386325 bd 08 60 lda $6008,x LDA SD_BLK_BEGIN,X + 8 -.386328 85 88 sta $88 STA SD_MULT_AREA -.38632a bd 0a 60 lda $600a,x LDA SD_BLK_BEGIN,X + 10 -.38632d 85 8a sta $8a STA SD_MULT_AREA + 2 -.38632f 20 d6 62 jsr $3862d6 JSR CALC_OFFSET_BYTES -.386332 a5 88 lda $88 LDA SD_MULT_AREA -.386334 8d 00 5f sta $5f00 STA SD_FIRST_SECTOR -.386337 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG -.38633b a5 8a lda $8a LDA SD_MULT_AREA + 2 -.38633d 8d 02 5f sta $5f02 STA SD_FIRST_SECTOR + 2 -.386340 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG -.386344 a9 00 62 lda #$6200 LDA #SD_BTSCT_BEGIN -.386347 85 80 sta $80 STA SD_DATA -.386349 a9 00 00 lda #$0000 LDA #0 -.38634c 85 82 sta $82 STA SD_DATA + 2 -.38634e e2 20 sep #$20 SEP #$20 ; set A short -.386350 22 d6 63 38 jsl $3863d6 JSL ISDOS_READ_BLOCK -.386354 af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG -.386358 f0 01 beq $38635b BEQ SD_CONTINUE_2 -.38635a 6b rtl RTL -.38635b SD_CONTINUE_2 -.38635b c2 20 rep #$20 REP #$20 ; set A long -.38635d a2 00 00 ldx #$0000 LDX #0 -.386360 bd 0b 62 lda $620b,x LDA SD_BTSCT_BEGIN,X + $B -.386363 8d 14 5f sta $5f14 STA SD_BYTES_PER_SECTOR -.386366 e2 20 sep #$20 SEP #$20 ; set A short -.386368 bd 0d 62 lda $620d,x LDA SD_BTSCT_BEGIN,X + $D -.38636b 8d 24 5f sta $5f24 STA SD_SECTORS_PER_CLUSTER -.38636e a9 00 lda #$00 LDA #0 -.386370 8d 25 5f sta $5f25 STA SD_SECTORS_PER_CLUSTER + 1 -.386373 c2 20 rep #$20 REP #$20 ; set A long -.386375 bd 10 62 lda $6210,x LDA SD_BTSCT_BEGIN,X + $10 -.386378 29 ff 00 and #$00ff AND #$FF -.38637b 8d 16 5f sta $5f16 STA SD_FAT_COUNT -.38637e bd 11 62 lda $6211,x LDA SD_BTSCT_BEGIN,X + $11 -.386381 8d 1c 5f sta $5f1c STA SD_ROOT_ENTRIES -.386384 bd 13 62 lda $6213,x LDA SD_BTSCT_BEGIN,X + $13 -.386387 f0 28 beq $3863b1 BEQ SD_LARGE_SECTORS -.386389 8d 18 5f sta $5f18 STA SD_SECTORS -.38638c a9 00 00 lda #$0000 LDA #0 -.38638f 8d 1a 5f sta $5f1a STA SD_SECTORS + 2 -.386392 ad 18 5f lda $5f18 LDA SD_SECTORS -.386395 8d 12 01 sta $0112 STA D0_OPERAND_B -.386398 ad 24 5f lda $5f24 LDA SD_SECTORS_PER_CLUSTER -.38639b 8d 10 01 sta $0110 STA D0_OPERAND_A -.38639e ad 14 01 lda $0114 LDA D0_RESULT -.3863a1 c9 f7 0f cmp #$0ff7 CMP #$FF7 -.3863a4 b0 17 bcs $3863bd BCS SD_SMALL_SECTORS ; number of sectors is more than fat12 can handle -.3863a6 e2 20 sep #$20 SEP #$20 ; set A short -.3863a8 a9 00 lda #$00 LDA #0 -.3863aa 8d 26 5f sta $5f26 STA SD_FAT16 -.3863ad c2 20 rep #$20 REP #$20 ; set A long -.3863af 80 15 bra $3863c6 BRA SD_FAT12 -.3863b1 SD_LARGE_SECTORS -.3863b1 bd 20 62 lda $6220,x LDA SD_BTSCT_BEGIN,X + $20 -.3863b4 8d 18 5f sta $5f18 STA SD_SECTORS -.3863b7 bd 22 62 lda $6222,x LDA SD_BTSCT_BEGIN,X + $22 -.3863ba 8d 1a 5f sta $5f1a STA SD_SECTORS + 2 -.3863bd SD_SMALL_SECTORS -.3863bd e2 20 sep #$20 SEP #$20 ; set A short -.3863bf a9 01 lda #$01 LDA #1 -.3863c1 8d 26 5f sta $5f26 STA SD_FAT16 -.3863c4 c2 20 rep #$20 REP #$20 ; set A long -.3863c6 SD_FAT12 -.3863c6 bd 0e 62 lda $620e,x LDA SD_BTSCT_BEGIN,X + $E -.3863c9 8d 10 5f sta $5f10 STA SD_RESERVED_SECTORS -.3863cc bd 16 62 lda $6216,x LDA SD_BTSCT_BEGIN,X + $16 -.3863cf 8d 12 5f sta $5f12 STA SD_SECTORS_PER_FAT -.3863d2 20 c5 67 jsr $3867c5 JSR COMPUTE_FAT_ROOT_DATA_OFFSETS -.3863d5 RMBR_DONE -.3863d5 6b rtl RTL -.3863d6 ISDOS_READ_BLOCK -.3863d6 5a phy PHY -.3863d7 af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL -.3863db 29 fd and #$fd AND #~GABE_CTRL_SDC_LED -.3863dd 09 02 ora #$02 ORA #GABE_CTRL_SDC_LED -.3863df 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL -.3863e3 a5 3f lda $3f LDA SDCARD_PRSNT_MNT -.3863e5 d0 02 bne $3863e9 BNE SR_CARD_PRESENT -.3863e7 80 2d bra $386416 BRA SR_DONE -.3863e9 SR_CARD_PRESENT -.3863e9 a9 02 lda #$02 LDA #SDC_TRANS_READ_BLK -.3863eb 8f 02 ea af sta $afea02 STA SDC_TRANS_TYPE_REG -.3863ef a9 01 lda #$01 LDA #SDC_TRANS_START -.3863f1 8f 03 ea af sta $afea03 STA SDC_TRANS_CONTROL_REG -.3863f5 af 04 ea af lda $afea04 SR_WAIT LDA SDC_TRANS_STATUS_REG -.3863f9 29 01 and #$01 AND #SDC_TRANS_BUSY -.3863fb c9 01 cmp #$01 CMP #SDC_TRANS_BUSY -.3863fd f0 f6 beq $3863f5 BEQ SR_WAIT -.3863ff af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG -.386403 f0 02 beq $386407 BEQ SD_READ_BLOCK_OK -.386405 80 0f bra $386416 BRA SR_DONE -.386407 SD_READ_BLOCK_OK -.386407 a0 00 00 ldy #$0000 LDY #0 -.38640a SR_READ_LOOP -.38640a af 10 ea af lda $afea10 LDA SDC_RX_FIFO_DATA_REG -.38640e 97 80 sta [$80],y STA [SD_DATA],Y -.386410 c8 iny INY -.386411 c0 00 02 cpy #$0200 CPY #512 -.386414 d0 f4 bne $38640a BNE SR_READ_LOOP -.386416 SR_DONE -.386416 a9 01 lda #$01 LDA #1 -.386418 8f 14 ea af sta $afea14 STA SDC_RX_FIFO_CTRL_REG -.38641c af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL -.386420 29 fd and #$fd AND #~GABE_CTRL_SDC_LED -.386422 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL -.386426 7a ply PLY -.386427 6b rtl RTL -.386428 DISPLAY_FAT_NAME -.386428 48 pha PHA ; - store the value of filetype -.386429 a0 00 00 ldy #$0000 LDY #0 -.38642c _RD_VOLNAME_LOOP -.38642c b7 80 lda [$80],y LDA [SD_DATA],Y -.38642e 22 18 10 00 jsl $001018 JSL PUTC -.386432 c8 iny INY -.386433 c0 08 00 cpy #$0008 CPY #8 -.386436 f0 07 beq $38643f BEQ _RD_DOT -.386438 c0 0b 00 cpy #$000b CPY #11 -.38643b d0 ef bne $38642c BNE _RD_VOLNAME_LOOP -.38643d 80 0e bra $38644d BRA _DFAT_NAME_DONE -.38643f _RD_DOT -.38643f 68 pla PLA ; - read the value of filetype -.386440 48 pha PHA ; - store the value of filetype -.386441 89 18 bit #$18 BIT #$18 -.386443 d0 e7 bne $38642c BNE _RD_VOLNAME_LOOP -.386445 a9 2e lda #$2e LDA #"." -.386447 22 18 10 00 jsl $001018 JSL PUTC -.38644b 80 df bra $38642c BRA _RD_VOLNAME_LOOP -.38644d _DFAT_NAME_DONE -.38644d 68 pla PLA ; - read the value of filetype -.38644e 89 18 bit #$18 BIT #$18 -.386450 d0 3b bne $38648d BNE RD_DFAT_DONE -.386452 a9 38 lda #$38 LDA #`sd_cluster_str -.386454 8b phb PHB -.386455 48 pha PHA -.386456 ab plb PLB -.386457 a2 c4 69 ldx #$69c4 LDX #<>sd_cluster_str -.38645a 22 1c 10 00 jsl $00101c JSL PUTS -.38645e ab plb PLB -.38645f a0 1b 00 ldy #$001b LDY #fatrec.cluster + 1 -.386462 b7 80 lda [$80],y LDA [SD_DATA],Y -.386464 22 80 10 00 jsl $001080 JSL PRINTAH -.386468 a0 1a 00 ldy #$001a LDY #fatrec.cluster -.38646b b7 80 lda [$80],y LDA [SD_DATA],Y -.38646d 22 80 10 00 jsl $001080 JSL PRINTAH -.386471 a9 38 lda #$38 LDA #`sd_filesize_str -.386473 8b phb PHB -.386474 48 pha PHA -.386475 ab plb PLB -.386476 a2 cf 69 ldx #$69cf LDX #<>sd_filesize_str -.386479 22 1c 10 00 jsl $00101c JSL PUTS -.38647d ab plb PLB -.38647e a0 1f 00 ldy #$001f LDY #fatrec.size_h + 1 -.386481 RD_SIZE_LOOP -.386481 b7 80 lda [$80],y LDA [SD_DATA],Y -.386483 22 80 10 00 jsl $001080 JSL PRINTAH -.386487 88 dey DEY -.386488 c0 1b 00 cpy #$001b CPY #$1B -.38648b d0 f4 bne $386481 BNE RD_SIZE_LOOP -.38648d RD_DFAT_DONE -.38648d a9 0d lda #$0d LDA #$D -.38648f 22 18 10 00 jsl $001018 JSL PUTC -.386493 60 rts RTS -.386494 ISDOS_DISPLAY_ROOT_DIR -.386494 a5 3f lda $3f LDA SDCARD_PRSNT_MNT ; this must be non-zero -.386496 d0 01 bne $386499 BNE RD_CARD_PRESENT -.386498 6b rtl RTL -.386499 RD_CARD_PRESENT -.386499 c2 20 rep #$20 REP #$20 ; set A long -.38649b a9 00 00 lda #$0000 LDA #0 ; reset the root entries offset -.38649e 8d 20 5f sta $5f20 STA SD_DIR_OFFSET -.3864a1 RD_NEXT_SECTOR -.3864a1 a9 00 64 lda #$6400 LDA #SD_ROOT_BEGIN -.3864a4 85 80 sta $80 STA SD_DATA -.3864a6 a9 00 00 lda #$0000 LDA #0 -.3864a9 85 82 sta $82 STA SD_DATA + 2 -.3864ab ad 20 5f lda $5f20 LDA SD_DIR_OFFSET ; multiply by 512 -.3864ae 0a asl a ASL A -.3864af eb xba XBA -.3864b0 8d 20 01 sta $0120 STA ADDER_A -.3864b3 a9 00 00 lda #$0000 LDA #0 -.3864b6 8d 22 01 sta $0122 STA ADDER_A + 2 -.3864b9 ad 08 5f lda $5f08 LDA SD_ROOT_OFFSET -.3864bc 8d 24 01 sta $0124 STA ADDER_B -.3864bf ad 0a 5f lda $5f0a LDA SD_ROOT_OFFSET+2 -.3864c2 8d 26 01 sta $0126 STA ADDER_B + 2 -.3864c5 ad 28 01 lda $0128 LDA ADDER_R -.3864c8 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG -.3864cc ad 2a 01 lda $012a LDA ADDER_R + 2 -.3864cf 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG -.3864d3 e2 20 sep #$20 SEP #$20 ; set A short -.3864d5 22 d6 63 38 jsl $3863d6 JSL ISDOS_READ_BLOCK -.3864d9 af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG -.3864dd f0 08 beq $3864e7 BEQ RD_DIR_ENTRY -.3864df a2 35 69 ldx #$6935 LDX #<>SD_ROOT_ERROR_MSG -.3864e2 20 aa 61 jsr $3861aa JSR DISPLAY_MSG -.3864e5 80 6a bra $386551 BRA RD_DONE -.3864e7 RD_DIR_ENTRY -.3864e7 a7 80 lda [$80] LDA [SD_DATA] -.3864e9 d0 04 bne $3864ef BNE RD_CONTINUE ; if first byte is 0, entry is available and there are no following entries -.3864eb 5c 51 65 38 jmp $386551 JML RD_DONE -.3864ef RD_CONTINUE -.3864ef c9 e5 cmp #$e5 CMP #$E5 -.3864f1 f0 35 beq $386528 BEQ RD_SKIP -.3864f3 RD_LOOP -.3864f3 a0 0b 00 ldy #$000b LDY #fatrec.type -.3864f6 b7 80 lda [$80],y LDA [SD_DATA],Y -.3864f8 c9 0f cmp #$0f CMP #$F ; long file name -.3864fa d0 04 bne $386500 BNE RD_NOT_VFAT -.3864fc 5c 7c 65 38 jmp $38657c JML RD_READ_LONG_FILENAME -.386500 RD_NOT_VFAT -.386500 89 02 bit #$02 BIT #2 ; hidden -.386502 f0 02 beq $386506 BEQ RD_NOT_HIDDEN -.386504 80 22 bra $386528 BRA RD_SKIP -.386506 RD_NOT_HIDDEN -.386506 89 08 bit #$08 BIT #8 ; volume name -.386508 f0 04 beq $38650e BEQ RD_NOT_VOLUME -.38650a 5c 67 65 38 jmp $386567 JML RD_READ_VOLNAME -.38650e RD_NOT_VOLUME -.38650e 89 10 bit #$10 BIT #$10 ; directory -.386510 f0 04 beq $386516 BEQ RD_NOT_DIRECTORY -.386512 5c 52 65 38 jmp $386552 JML RD_DIRNAME -.386516 RD_NOT_DIRECTORY -.386516 48 pha PHA ; - store the value of filetype -.386517 a9 38 lda #$38 LDA #`sd_filename -.386519 8b phb PHB -.38651a 48 pha PHA -.38651b ab plb PLB -.38651c a2 b6 69 ldx #$69b6 LDX #<>sd_filename -.38651f 22 1c 10 00 jsl $00101c JSL PUTS -.386523 ab plb PLB -.386524 68 pla PLA -.386525 20 28 64 jsr $386428 JSR DISPLAY_FAT_NAME -.386528 RD_SKIP -.386528 c2 20 rep #$20 REP #$20 ; set A long -.38652a a5 80 lda $80 LDA SD_DATA -.38652c 29 e0 01 and #$01e0 AND #$1E0 -.38652f c9 e0 01 cmp #$01e0 CMP #$1E0 -.386532 d0 0f bne $386543 BNE RD_SKIP_NEXT -.386534 ad 20 5f lda $5f20 LDA SD_DIR_OFFSET -.386537 1a inc a INC A -.386538 cd 1c 5f cmp $5f1c CMP SD_ROOT_ENTRIES -.38653b b0 14 bcs $386551 BCS RD_DONE -.38653d 8d 20 5f sta $5f20 STA SD_DIR_OFFSET ; next sector -.386540 4c a1 64 jmp $3864a1 JMP RD_NEXT_SECTOR -.386543 RD_SKIP_NEXT -.386543 a5 80 lda $80 LDA SD_DATA -.386545 18 clc CLC -.386546 69 20 00 adc #$0020 ADC #$20 -.386549 85 80 sta $80 STA SD_DATA -.38654b e2 20 sep #$20 SEP #$20 ; set A short -.38654d 5c e7 64 38 jmp $3864e7 JML RD_DIR_ENTRY -.386551 RD_DONE -.386551 6b rtl RTL -.386552 RD_DIRNAME -.386552 48 pha PHA ; - store the value of filetype -.386553 a9 38 lda #$38 LDA #`sd_dir_name -.386555 8b phb PHB -.386556 48 pha PHA -.386557 ab plb PLB -.386558 a2 a8 69 ldx #$69a8 LDX #<>sd_dir_name -.38655b 22 1c 10 00 jsl $00101c JSL PUTS -.38655f ab plb PLB -.386560 68 pla PLA -.386561 20 28 64 jsr $386428 JSR DISPLAY_FAT_NAME -.386564 4c 28 65 jmp $386528 JMP RD_SKIP -.386567 RD_READ_VOLNAME -.386567 48 pha PHA ; - store the value of filetype -.386568 a9 38 lda #$38 LDA #`sd_volume_name -.38656a 8b phb PHB -.38656b 48 pha PHA -.38656c ab plb PLB -.38656d a2 8c 69 ldx #$698c LDX #<>sd_volume_name -.386570 22 1c 10 00 jsl $00101c JSL PUTS -.386574 ab plb PLB -.386575 68 pla PLA -.386576 20 28 64 jsr $386428 JSR DISPLAY_FAT_NAME -.386579 4c 28 65 jmp $386528 JMP RD_SKIP -.38657c RD_READ_LONG_FILENAME -.38657c 4c 28 65 jmp $386528 JMP RD_SKIP -.38657f STORE_FILE_LIST -.38657f a0 0b 00 ldy #$000b LDY #11 -.386582 c9 10 cmp #$10 CMP #$10 -.386584 f0 02 beq $386588 BEQ SF_DIR -.386586 a9 01 lda #$01 LDA #1 -.386588 SF_DIR -.386588 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR],Y -.38658a a0 00 00 ldy #$0000 LDY #0 -.38658d a2 0b 00 ldx #$000b LDX #11 -.386590 SF_LOOP_NAME -.386590 b7 80 lda [$80],y LDA [SD_DATA],Y -.386592 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR],Y -.386594 c8 iny INY -.386595 ca dex DEX -.386596 d0 f8 bne $386590 BNE SF_LOOP_NAME -.386598 c2 20 rep #$20 REP #$20 ; set A long -.38659a a0 1a 00 ldy #$001a LDY #fatrec.cluster -.38659d b7 80 lda [$80],y LDA [SD_DATA],Y -.38659f a0 10 00 ldy #$0010 LDY #16 -.3865a2 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR],Y -.3865a4 a0 1c 00 ldy #$001c LDY #fatrec.size_l -.3865a7 b7 80 lda [$80],y LDA [SD_DATA],Y -.3865a9 a0 0c 00 ldy #$000c LDY #12 -.3865ac 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR],Y -.3865ae a0 1e 00 ldy #$001e LDY #fatrec.size_h -.3865b1 b7 80 lda [$80],y LDA [SD_DATA],Y -.3865b3 a0 0e 00 ldy #$000e LDY #14 -.3865b6 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR],Y -.3865b8 a5 51 lda $51 LDA SDOS_FILE_REC_PTR -.3865ba 18 clc CLC -.3865bb 69 12 00 adc #$0012 ADC #18 -.3865be 85 51 sta $51 STA SDOS_FILE_REC_PTR -.3865c0 e2 20 sep #$20 SEP #$20 ; set A short -.3865c2 60 rts RTS -.3865c3 ISDOS_PARSE_ROOT_DIR -.3865c3 a5 3f lda $3f LDA SDCARD_PRSNT_MNT -.3865c5 d0 01 bne $3865c8 BNE SP_CARD_PRESENT -.3865c7 6b rtl RTL -.3865c8 SP_CARD_PRESENT -.3865c8 c2 20 rep #$20 REP #$20 ; set A long -.3865ca a9 00 00 lda #$0000 LDA #0 ; reset the root entries offset -.3865cd 8d 20 5f sta $5f20 STA SD_DIR_OFFSET -.3865d0 SP_NEXT_SECTOR -.3865d0 a9 00 64 lda #$6400 LDA #SD_ROOT_BEGIN -.3865d3 85 80 sta $80 STA SD_DATA -.3865d5 a9 00 00 lda #$0000 LDA #0 -.3865d8 85 82 sta $82 STA SD_DATA + 2 -.3865da ad 20 5f lda $5f20 LDA SD_DIR_OFFSET ; multiply by 512 -.3865dd 0a asl a ASL A -.3865de eb xba XBA -.3865df 8d 20 01 sta $0120 STA ADDER_A -.3865e2 a9 00 00 lda #$0000 LDA #0 -.3865e5 8d 22 01 sta $0122 STA ADDER_A + 2 -.3865e8 ad 08 5f lda $5f08 LDA SD_ROOT_OFFSET -.3865eb 8d 24 01 sta $0124 STA ADDER_B -.3865ee ad 0a 5f lda $5f0a LDA SD_ROOT_OFFSET+2 -.3865f1 8d 26 01 sta $0126 STA ADDER_B + 2 -.3865f4 ad 28 01 lda $0128 LDA ADDER_R -.3865f7 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG -.3865fb ad 2a 01 lda $012a LDA ADDER_R + 2 -.3865fe 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG -.386602 e2 20 sep #$20 SEP #$20 ; set A short -.386604 22 d6 63 38 jsl $3863d6 JSL ISDOS_READ_BLOCK -.386608 af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG -.38660c f0 04 beq $386612 BEQ SP_DIR_ENTRY -.38660e 5c 6e 66 38 jmp $38666e JML SP_DONE -.386612 SP_DIR_ENTRY -.386612 a7 80 lda [$80] LDA [SD_DATA] -.386614 d0 04 bne $38661a BNE SP_CONTINUE ; if first byte is 0, entry is available and there are no following entries -.386616 5c 6e 66 38 jmp $38666e JML SP_DONE -.38661a SP_CONTINUE -.38661a c9 e5 cmp #$e5 CMP #$E5 -.38661c f0 27 beq $386645 BEQ SP_SKIP -.38661e SP_LOOP -.38661e a0 0b 00 ldy #$000b LDY #fatrec.type -.386621 b7 80 lda [$80],y LDA [SD_DATA],Y -.386623 c9 0f cmp #$0f CMP #$F ; long file name -.386625 d0 04 bne $38662b BNE SP_NOT_VFAT -.386627 5c 45 66 38 jmp $386645 JML SP_SKIP -.38662b SP_NOT_VFAT -.38662b 89 02 bit #$02 BIT #2 ; hidden -.38662d f0 02 beq $386631 BEQ SP_NOT_HIDDEN -.38662f 80 14 bra $386645 BRA SP_SKIP -.386631 SP_NOT_HIDDEN -.386631 89 08 bit #$08 BIT #8 ; volume name -.386633 f0 04 beq $386639 BEQ SP_NOT_VOLUME -.386635 5c 45 66 38 jmp $386645 JML SP_SKIP -.386639 SP_NOT_VOLUME -.386639 89 10 bit #$10 BIT #$10 ; directory -.38663b f0 05 beq $386642 BEQ SP_NOT_DIRECTORY -.38663d 20 7f 65 jsr $38657f JSR STORE_FILE_LIST -.386640 80 03 bra $386645 BRA SP_SKIP -.386642 SP_NOT_DIRECTORY -.386642 20 7f 65 jsr $38657f JSR STORE_FILE_LIST -.386645 SP_SKIP -.386645 c2 20 rep #$20 REP #$20 ; set A long -.386647 a5 80 lda $80 LDA SD_DATA -.386649 29 e0 01 and #$01e0 AND #$1E0 ; each record in FAT is $20 bytes long -.38664c c9 e0 01 cmp #$01e0 CMP #$1E0 -.38664f d0 0f bne $386660 BNE SP_SKIP_NEXT -.386651 ad 20 5f lda $5f20 LDA SD_DIR_OFFSET -.386654 1a inc a INC A -.386655 cd 1c 5f cmp $5f1c CMP SD_ROOT_ENTRIES -.386658 b0 14 bcs $38666e BCS SP_DONE -.38665a 8d 20 5f sta $5f20 STA SD_DIR_OFFSET ; next sector -.38665d 4c d0 65 jmp $3865d0 JMP SP_NEXT_SECTOR -.386660 SP_SKIP_NEXT -.386660 a5 80 lda $80 LDA SD_DATA -.386662 18 clc CLC -.386663 69 20 00 adc #$0020 ADC #$20 -.386666 85 80 sta $80 STA SD_DATA -.386668 e2 20 sep #$20 SEP #$20 ; set A short -.38666a 5c 12 66 38 jmp $386612 JML SP_DIR_ENTRY -.38666e SP_DONE -.38666e 6b rtl RTL -.38666f ISDOS_READ_FAT_SECTOR -.38666f 48 pha PHA -.386670 a5 3f lda $3f LDA SDCARD_PRSNT_MNT -.386672 29 ff 00 and #$00ff AND #$FF -.386675 d0 02 bne $386679 BNE RF_CARD_PRESENT -.386677 68 pla PLA -.386678 6b rtl RTL -.386679 RF_CARD_PRESENT -.386679 68 pla PLA -.38667a 85 88 sta $88 STA SD_MULT_AREA -.38667c a9 00 00 lda #$0000 LDA #0 -.38667f 85 8a sta $8a STA SD_MULT_AREA + 2 -.386681 20 d6 62 jsr $3862d6 JSR CALC_OFFSET_BYTES -.386684 a5 88 lda $88 LDA SD_MULT_AREA -.386686 8d 20 01 sta $0120 STA ADDER_A -.386689 a5 8a lda $8a LDA SD_MULT_AREA + 2 -.38668b 8d 22 01 sta $0122 STA ADDER_A + 2 -.38668e ad 04 5f lda $5f04 LDA SD_FAT_OFFSET -.386691 8d 24 01 sta $0124 STA ADDER_B -.386694 ad 06 5f lda $5f06 LDA SD_FAT_OFFSET+2 -.386697 8d 26 01 sta $0126 STA ADDER_B + 2 -.38669a ad 28 01 lda $0128 LDA ADDER_R -.38669d 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG -.3866a1 ad 2a 01 lda $012a LDA ADDER_R + 2 -.3866a4 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG -.3866a8 e2 20 sep #$20 SEP #$20 ; set A short -.3866aa 22 d6 63 38 jsl $3863d6 JSL ISDOS_READ_BLOCK -.3866ae af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG -.3866b2 f0 08 beq $3866bc BEQ SD_CONTINUE_FAT -.3866b4 a2 16 69 ldx #$6916 LDX #<>SD_FAT_ERROR_MSG -.3866b7 20 aa 61 jsr $3861aa JSR DISPLAY_MSG -.3866ba 80 00 bra $3866bc BRA SD_CONTINUE_FAT -.3866bc SD_CONTINUE_FAT -.3866bc c2 20 rep #$20 REP #$20 ; set A long -.3866be 6b rtl RTL -.3866bf ISDOS_READ_DATA_CLUSTER -.3866bf 48 pha PHA -.3866c0 a5 3f lda $3f LDA SDCARD_PRSNT_MNT -.3866c2 29 ff 00 and #$00ff AND #$FF -.3866c5 d0 02 bne $3866c9 BNE SDR_CARD_PRESENT -.3866c7 68 pla PLA -.3866c8 6b rtl RTL -.3866c9 SDR_CARD_PRESENT -.3866c9 68 pla PLA -.3866ca 38 sec SEC -.3866cb e9 02 00 sbc #$0002 SBC #2 -.3866ce 8d 00 01 sta $0100 STA UNSIGNED_MULT_A -.3866d1 ad 24 5f lda $5f24 LDA SD_SECTORS_PER_CLUSTER -.3866d4 8d 02 01 sta $0102 STA UNSIGNED_MULT_B -.3866d7 ad 04 01 lda $0104 LDA UNSIGNED_MULT_RESULT -.3866da 48 pha PHA -.3866db a2 00 00 ldx #$0000 LDX #0 -.3866de SDR_NEXT_SECTOR -.3866de 85 88 sta $88 STA SD_MULT_AREA -.3866e0 a9 00 00 lda #$0000 LDA #0 -.3866e3 85 8a sta $8a STA SD_MULT_AREA + 2 -.3866e5 20 d6 62 jsr $3862d6 JSR CALC_OFFSET_BYTES -.3866e8 a5 88 lda $88 LDA SD_MULT_AREA -.3866ea 8d 20 01 sta $0120 STA ADDER_A -.3866ed a5 8a lda $8a LDA SD_MULT_AREA + 2 -.3866ef 8d 22 01 sta $0122 STA ADDER_A + 2 -.3866f2 ad 0c 5f lda $5f0c LDA SD_DATA_OFFSET -.3866f5 8d 24 01 sta $0124 STA ADDER_B -.3866f8 ad 0e 5f lda $5f0e LDA SD_DATA_OFFSET+2 -.3866fb 8d 26 01 sta $0126 STA ADDER_B + 2 -.3866fe ad 28 01 lda $0128 LDA ADDER_R -.386701 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG -.386705 ad 2a 01 lda $012a LDA ADDER_R + 2 -.386708 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG -.38670c e2 20 sep #$20 SEP #$20 ; set A short -.38670e 22 d6 63 38 jsl $3863d6 JSL ISDOS_READ_BLOCK -.386712 af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG -.386716 f0 0a beq $386722 BEQ SD_CONTINUE_DATA -.386718 a9 ff lda #$ff LDA #$FF -.38671a 8d 27 5f sta $5f27 STA CLUSTER_PTR -.38671d 8d 28 5f sta $5f28 STA CLUSTER_PTR + 1 -.386720 80 17 bra $386739 BRA SD_CONTINUE_DATA_DONE -.386722 SD_CONTINUE_DATA -.386722 c2 20 rep #$20 REP #$20 ; set A long -.386724 a5 80 lda $80 LDA SD_DATA -.386726 18 clc CLC -.386727 69 00 02 adc #$0200 ADC #$200 -.38672a 85 80 sta $80 STA SD_DATA -.38672c 90 02 bcc $386730 BCC SD_CONT_NO_CARRY -.38672e e6 82 inc $82 INC SD_DATA + 2 -.386730 SD_CONT_NO_CARRY -.386730 68 pla PLA -.386731 1a inc a INC A -.386732 48 pha PHA -.386733 e8 inx INX -.386734 ec 24 5f cpx $5f24 CPX SD_SECTORS_PER_CLUSTER -.386737 d0 a5 bne $3866de BNE SDR_NEXT_SECTOR -.386739 SD_CONTINUE_DATA_DONE -.386739 c2 20 rep #$20 REP #$20 ; set A long -.38673b 68 pla PLA -.38673c 6b rtl RTL -.38673d ISDOS_READ_FILE -.38673d 48 pha PHA -.38673e a5 3f lda $3f LDA SDCARD_PRSNT_MNT -.386740 29 ff 00 and #$00ff AND #$FF -.386743 d0 02 bne $386747 BNE SD_CARD_PRESENT -.386745 68 pla PLA -.386746 6b rtl RTL -.386747 SD_CARD_PRESENT -.386747 68 pla PLA -.386748 8d 27 5f sta $5f27 STA CLUSTER_PTR -.38674b SD_CLUSTER_LOOP -.38674b 22 bf 66 38 jsl $3866bf JSL ISDOS_READ_DATA_CLUSTER -.38674f ad 26 5f lda $5f26 LDA SD_FAT16 -.386752 29 01 00 and #$0001 AND #$1 -.386755 0a asl a ASL -.386756 aa tax TAX -.386757 fc 5d 67 jsr ($38675d,x) JSR (READ_FAT_TABLE,X) -.38675a d0 ef bne $38674b BNE SD_CLUSTER_LOOP -.38675c 6b rtl RTL ->38675d 61 67 READ_FAT_TABLE .word <>FAT12_GET_NEXT_CLUSTER ->38675f 86 67 .word <>FAT16_GET_NEXT_CLUSTER -.386761 FAT12_GET_NEXT_CLUSTER -.386761 ad 27 5f lda $5f27 LDA CLUSTER_PTR ; a FAT12 page contains about 340 entries -.386764 4a lsr a LSR A ; this may result in a carry, if the cluster to read is odd -.386765 90 0e bcc $386775 BCC F12_NC_NO_CARRY -.386767 18 clc CLC -.386768 6d 27 5f adc $5f27 ADC CLUSTER_PTR -.38676b a8 tay TAY -.38676c b9 00 66 lda $6600,y LDA FAT_DATA,Y -.38676f 4a lsr a LSR A -.386770 4a lsr a LSR A -.386771 4a lsr a LSR A -.386772 4a lsr a LSR A ; divide by 16 -.386773 80 0a bra $38677f BRA F12_NC_CONTINUE -.386775 F12_NC_NO_CARRY -.386775 6d 27 5f adc $5f27 ADC CLUSTER_PTR -.386778 a8 tay TAY -.386779 b9 00 66 lda $6600,y LDA FAT_DATA,Y -.38677c 29 ff 0f and #$0fff AND #$FFF -.38677f F12_NC_CONTINUE -.38677f 8d 27 5f sta $5f27 STA CLUSTER_PTR -.386782 c9 ff 0f cmp #$0fff CMP #$FFF -.386785 60 rts RTS -.386786 FAT16_GET_NEXT_CLUSTER -.386786 ad 27 5f lda $5f27 LDA CLUSTER_PTR -.386789 eb xba XBA -.38678a 29 ff 00 and #$00ff AND #$FF -.38678d c5 86 cmp $86 CMP SD_DATA_FAT_PAGE -.38678f f0 22 beq $3867b3 BEQ SKIP_FAT_LOADING -.386791 48 pha PHA -.386792 a5 80 lda $80 LDA SD_DATA -.386794 85 83 sta $83 STA SD_TMP_DATA -.386796 a5 82 lda $82 LDA SD_DATA + 2 -.386798 85 85 sta $85 STA SD_TMP_DATA + 2 -.38679a a9 00 66 lda #$6600 LDA #FAT_DATA -.38679d 85 80 sta $80 STA SD_DATA -.38679f a9 00 00 lda #$0000 LDA #0 -.3867a2 85 82 sta $82 STA SD_DATA + 2 -.3867a4 68 pla PLA -.3867a5 85 86 sta $86 STA SD_DATA_FAT_PAGE -.3867a7 22 6f 66 38 jsl $38666f JSL ISDOS_READ_FAT_SECTOR -.3867ab a5 83 lda $83 LDA SD_TMP_DATA -.3867ad 85 80 sta $80 STA SD_DATA -.3867af a5 85 lda $85 LDA SD_TMP_DATA + 2 -.3867b1 85 82 sta $82 STA SD_DATA + 2 -.3867b3 SKIP_FAT_LOADING -.3867b3 ad 27 5f lda $5f27 LDA CLUSTER_PTR -.3867b6 29 ff 00 and #$00ff AND #$FF -.3867b9 0a asl a ASL A ; multiply by 2 -.3867ba a8 tay TAY -.3867bb b9 00 66 lda $6600,y LDA FAT_DATA,Y -.3867be 8d 27 5f sta $5f27 STA CLUSTER_PTR -.3867c1 c9 ff ff cmp #$ffff CMP #$FFFF -.3867c4 60 rts RTS -.3867c5 COMPUTE_FAT_ROOT_DATA_OFFSETS -.3867c5 ad 10 5f lda $5f10 LDA SD_RESERVED_SECTORS ; 16 bit value -.3867c8 85 88 sta $88 STA SD_MULT_AREA -.3867ca a9 00 00 lda #$0000 LDA #0 -.3867cd 85 8a sta $8a STA SD_MULT_AREA + 2 -.3867cf 20 d6 62 jsr $3862d6 JSR CALC_OFFSET_BYTES ; compute the byte offset -.3867d2 a5 88 lda $88 LDA SD_MULT_AREA -.3867d4 8d 20 01 sta $0120 STA ADDER_A -.3867d7 a5 8a lda $8a LDA SD_MULT_AREA + 2 -.3867d9 8d 22 01 sta $0122 STA ADDER_A+2 -.3867dc ad 00 5f lda $5f00 LDA SD_FIRST_SECTOR ; 32 bit value -.3867df 8d 24 01 sta $0124 STA ADDER_B -.3867e2 ad 02 5f lda $5f02 LDA SD_FIRST_SECTOR + 2 -.3867e5 8d 26 01 sta $0126 STA ADDER_B + 2 -.3867e8 ad 28 01 lda $0128 LDA ADDER_R -.3867eb 8d 04 5f sta $5f04 STA SD_FAT_OFFSET -.3867ee ad 2a 01 lda $012a LDA ADDER_R + 2 -.3867f1 8d 06 5f sta $5f06 STA SD_FAT_OFFSET + 2 -.3867f4 ad 16 5f lda $5f16 LDA SD_FAT_COUNT -.3867f7 8d 00 01 sta $0100 STA UNSIGNED_MULT_A -.3867fa ad 12 5f lda $5f12 LDA SD_SECTORS_PER_FAT -.3867fd 8d 02 01 sta $0102 STA UNSIGNED_MULT_B -.386800 ad 04 01 lda $0104 LDA UNSIGNED_MULT_RESULT -.386803 85 88 sta $88 STA SD_MULT_AREA -.386805 ad 06 01 lda $0106 LDA UNSIGNED_MULT_RESULT + 2 -.386808 85 8a sta $8a STA SD_MULT_AREA + 2 -.38680a 20 d6 62 jsr $3862d6 JSR CALC_OFFSET_BYTES ; compute the byte offset -.38680d a5 88 lda $88 LDA SD_MULT_AREA -.38680f 8d 20 01 sta $0120 STA ADDER_A -.386812 a5 8a lda $8a LDA SD_MULT_AREA + 2 -.386814 8d 22 01 sta $0122 STA ADDER_A + 2 -.386817 ad 04 5f lda $5f04 LDA SD_FAT_OFFSET -.38681a 8d 24 01 sta $0124 STA ADDER_B -.38681d ad 06 5f lda $5f06 LDA SD_FAT_OFFSET + 2 -.386820 8d 26 01 sta $0126 STA ADDER_B +2 -.386823 ad 28 01 lda $0128 LDA ADDER_R -.386826 8d 08 5f sta $5f08 STA SD_ROOT_OFFSET -.386829 ad 2a 01 lda $012a LDA ADDER_R +2 -.38682c 8d 0a 5f sta $5f0a STA SD_ROOT_OFFSET + 2 -.38682f ad 08 5f lda $5f08 LDA SD_ROOT_OFFSET -.386832 8d 20 01 sta $0120 STA ADDER_A -.386835 ad 0a 5f lda $5f0a LDA SD_ROOT_OFFSET + 2 -.386838 8d 22 01 sta $0122 STA ADDER_A + 2 -.38683b a9 20 00 lda #$0020 LDA #32 ; the root contains 512 entries at 32 bytes each -.38683e 85 88 sta $88 STA SD_MULT_AREA -.386840 a9 00 00 lda #$0000 LDA #0 -.386843 85 8a sta $8a STA SD_MULT_AREA + 2 -.386845 20 d6 62 jsr $3862d6 JSR CALC_OFFSET_BYTES -.386848 a5 88 lda $88 LDA SD_MULT_AREA -.38684a 8d 24 01 sta $0124 STA ADDER_B -.38684d a5 8a lda $8a LDA SD_MULT_AREA + 2 -.38684f 8d 26 01 sta $0126 STA ADDER_B + 2 -.386852 ad 28 01 lda $0128 LDA ADDER_R -.386855 8d 0c 5f sta $5f0c STA SD_DATA_OFFSET -.386858 ad 2a 01 lda $012a LDA ADDER_R + 2 -.38685b 8d 0e 5f sta $5f0e STA SD_DATA_OFFSET + 2 -.38685e 60 rts RTS ->38685f 30 30 20 2d 20 57 65 6c sd_card_tester .text "00 - Welcome to the SDCard Tester", $d, 0 ->386867 63 6f 6d 65 20 74 6f 20 74 68 65 20 53 44 43 61 ->386877 72 64 20 54 65 73 74 65 72 0d 00 ->386882 30 31 20 2d 20 43 61 72 sd_card_present_msg .text "01 - Card Present", $d, 0 ->38688a 64 20 50 72 65 73 65 6e 74 0d 00 ->386895 30 31 20 2d 20 4e 4f 20 sd_no_card_msg .text "01 - NO SDCARD PRESENT", $0D, $00 ->38689d 53 44 43 41 52 44 20 50 52 45 53 45 4e 54 0d 00 ->3868ad 30 32 20 2d 20 43 61 6e sd_cant_read_mbr_msg .text "02 - Can't read MBR - No Card present", $D, $0 ->3868b5 27 74 20 72 65 61 64 20 4d 42 52 20 2d 20 4e 6f ->3868c5 20 43 61 72 64 20 70 72 65 73 65 6e 74 0d 00 ->3868d4 30 33 20 2d 20 45 72 72 sd_read_failure .text "03 - Error during read operation", $d, $0 ->3868dc 6f 72 20 64 75 72 69 6e 67 20 72 65 61 64 20 6f ->3868ec 70 65 72 61 74 69 6f 6e 0d 00 ->3868f6 30 34 20 2d 20 45 72 72 SD_BOOT_SECTOR_MSG .text "04 - Error reading Boot sector", $d, $0 ->3868fe 6f 72 20 72 65 61 64 69 6e 67 20 42 6f 6f 74 20 ->38690e 73 65 63 74 6f 72 0d 00 ->386916 30 35 20 2d 20 45 72 72 SD_FAT_ERROR_MSG .text "05 - Error reading FAT sector", $d, $0 ->38691e 6f 72 20 72 65 61 64 69 6e 67 20 46 41 54 20 73 ->38692e 65 63 74 6f 72 0d 00 ->386935 30 35 20 2d 20 45 72 72 SD_ROOT_ERROR_MSG .text "05 - Error reading Root sector", $d, $0 ->38693d 6f 72 20 72 65 61 64 69 6e 67 20 52 6f 6f 74 20 ->38694d 73 65 63 74 6f 72 0d 00 ->386955 30 35 20 2d 20 45 72 72 SD_DATA_ERROR_MSG .text "05 - Error reading Data sector", $d, $0 ->38695d 6f 72 20 72 65 61 64 69 6e 67 20 44 61 74 61 20 ->38696d 73 65 63 74 6f 72 0d 00 ->386975 49 6e 76 61 6c 69 64 20 INVALID_SIG_MSG .text 'Invalid MBR Signature',$D,0 ->38697d 4d 42 52 20 53 69 67 6e 61 74 75 72 65 0d 00 ->38698c 56 6f 6c 75 6d 65 20 4e sd_volume_name .text "Volume Name: ", $0 ->386994 61 6d 65 3a 20 00 ->38699a 56 46 41 54 20 4e 61 6d sd_vfat_name .text "VFAT Name : ", $0 ->3869a2 65 20 20 3a 20 00 ->3869a8 44 69 72 65 63 74 6f 72 sd_dir_name .text "Directory : ", $0 ->3869b0 79 20 20 3a 20 00 ->3869b6 46 69 6c 65 6e 61 6d 65 sd_filename .text "Filename : ", $0 ->3869be 20 20 20 3a 20 00 ->3869c4 2c 20 43 6c 75 73 74 65 sd_cluster_str .text ", Cluster:", $0 ->3869cc 72 3a 00 ->3869cf 2c 20 53 69 7a 65 3a 00 sd_filesize_str .text ", Size:", $0 +.385c82 ISDOS_INIT +.385c82 af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL +.385c86 29 fd and #$fd AND #~GABE_CTRL_SDC_LED +.385c88 09 02 ora #$02 ORA #GABE_CTRL_SDC_LED +.385c8a 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL +.385c8e c2 20 rep #$20 REP #$20 ; set A long +.385c90 a9 00 00 lda #$0000 LDA #0 +.385c93 8d 08 5f sta $5f08 STA SD_ROOT_OFFSET +.385c96 8d 22 5f sta $5f22 STA SD_NEXT_CLUSTER +.385c99 e2 20 sep #$20 SEP #$20 ; set A short +.385c9b 85 3f sta $3f STA SDCARD_PRSNT_MNT +.385c9d a9 01 lda #$01 LDA #SDC_TRANS_INIT_SD +.385c9f 8f 02 ea af sta $afea02 STA SDC_TRANS_TYPE_REG +.385ca3 a9 01 lda #$01 LDA #SDC_TRANS_START +.385ca5 8f 03 ea af sta $afea03 STA SDC_TRANS_CONTROL_REG +.385ca9 af 04 ea af lda $afea04 SD_WAIT LDA SDC_TRANS_STATUS_REG +.385cad 29 01 and #$01 AND #SDC_TRANS_BUSY +.385caf c9 01 cmp #$01 CMP #SDC_TRANS_BUSY +.385cb1 f0 f6 beq $385ca9 BEQ SD_WAIT +.385cb3 af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG +.385cb7 f0 08 beq $385cc1 BEQ SD_INIT_SUCCESS +.385cb9 a2 91 62 ldx #$6291 LDX #<>sd_no_card_msg +.385cbc 20 aa 5b jsr $385baa JSR DISPLAY_MSG +.385cbf 80 06 bra $385cc7 BRA SD_INIT_DONE +.385cc1 SD_INIT_SUCCESS +.385cc1 a9 01 lda #$01 LDA #1 +.385cc3 85 3f sta $3f STA SDCARD_PRSNT_MNT +.385cc5 80 00 bra $385cc7 BRA SD_INIT_DONE +.385cc7 SD_INIT_DONE +.385cc7 af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL +.385ccb 29 fd and #$fd AND #~GABE_CTRL_SDC_LED +.385ccd 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL +.385cd1 6b rtl RTL +.385cd2 CALC_OFFSET_BYTES +.385cd2 a5 8a lda $8a LDA SD_MULT_AREA + 2 ; high 16-bits +.385cd4 0a asl a ASL A +.385cd5 85 8b sta $8b STA SD_MULT_AREA + 3 +.385cd7 18 clc CLC +.385cd8 a5 88 lda $88 LDA SD_MULT_AREA +.385cda 0a asl a ASL A +.385cdb 85 89 sta $89 STA SD_MULT_AREA + 1 +.385cdd 90 02 bcc $385ce1 BCC CALC_DONE +.385cdf e6 8b inc $8b INC SD_MULT_AREA + 3 +.385ce1 CALC_DONE +.385ce1 e2 20 sep #$20 SEP #$20 ; set A short +.385ce3 64 88 stz $88 stz SD_MULT_AREA +.385ce5 c2 20 rep #$20 REP #$20 ; set A long +.385ce7 60 rts RTS +.385ce8 ISDOS_READ_MBR_BOOT +.385ce8 a5 3f lda $3f LDA SDCARD_PRSNT_MNT ; this must be non-zero +.385cea d0 01 bne $385ced BNE RMBR_CARD_PRESENT +.385cec 6b rtl RTL +.385ced RMBR_CARD_PRESENT +.385ced c2 20 rep #$20 REP #$20 ; set A long +.385cef a9 00 60 lda #$6000 LDA #SD_BLK_BEGIN +.385cf2 85 80 sta $80 STA SD_DATA +.385cf4 a9 00 00 lda #$0000 LDA #0 +.385cf7 85 82 sta $82 STA SD_DATA + 2 +.385cf9 a9 00 00 lda #$0000 LDA #0 +.385cfc 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG +.385d00 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG +.385d04 e2 20 sep #$20 SEP #$20 ; set A short +.385d06 22 d2 5d 38 jsl $385dd2 JSL ISDOS_READ_BLOCK +.385d0a af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG +.385d0e f0 01 beq $385d11 BEQ SD_CONTINUE_1 +.385d10 6b rtl RTL +.385d11 SD_CONTINUE_1 +.385d11 c2 20 rep #$20 REP #$20 ; set A long +.385d13 ad fe 61 lda $61fe LDA SD_BLK_BEGIN + 510 +.385d16 c9 55 aa cmp #$aa55 CMP #$AA55 +.385d19 f0 01 beq $385d1c BEQ VALID_SIG +.385d1b 6b rtl RTL +.385d1c VALID_SIG +.385d1c c2 20 rep #$20 REP #$20 ; set A long +.385d1e a2 be 01 ldx #$01be LDX #446 ; offset to first partition +.385d21 bd 08 60 lda $6008,x LDA SD_BLK_BEGIN,X + 8 +.385d24 85 88 sta $88 STA SD_MULT_AREA +.385d26 bd 0a 60 lda $600a,x LDA SD_BLK_BEGIN,X + 10 +.385d29 85 8a sta $8a STA SD_MULT_AREA + 2 +.385d2b 20 d2 5c jsr $385cd2 JSR CALC_OFFSET_BYTES +.385d2e a5 88 lda $88 LDA SD_MULT_AREA +.385d30 8d 00 5f sta $5f00 STA SD_FIRST_SECTOR +.385d33 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG +.385d37 a5 8a lda $8a LDA SD_MULT_AREA + 2 +.385d39 8d 02 5f sta $5f02 STA SD_FIRST_SECTOR + 2 +.385d3c 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG +.385d40 a9 00 62 lda #$6200 LDA #SD_BTSCT_BEGIN +.385d43 85 80 sta $80 STA SD_DATA +.385d45 a9 00 00 lda #$0000 LDA #0 +.385d48 85 82 sta $82 STA SD_DATA + 2 +.385d4a e2 20 sep #$20 SEP #$20 ; set A short +.385d4c 22 d2 5d 38 jsl $385dd2 JSL ISDOS_READ_BLOCK +.385d50 af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG +.385d54 f0 01 beq $385d57 BEQ SD_CONTINUE_2 +.385d56 6b rtl RTL +.385d57 SD_CONTINUE_2 +.385d57 c2 20 rep #$20 REP #$20 ; set A long +.385d59 a2 00 00 ldx #$0000 LDX #0 +.385d5c bd 0b 62 lda $620b,x LDA SD_BTSCT_BEGIN,X + $B +.385d5f 8d 14 5f sta $5f14 STA SD_BYTES_PER_SECTOR +.385d62 e2 20 sep #$20 SEP #$20 ; set A short +.385d64 bd 0d 62 lda $620d,x LDA SD_BTSCT_BEGIN,X + $D +.385d67 8d 24 5f sta $5f24 STA SD_SECTORS_PER_CLUSTER +.385d6a a9 00 lda #$00 LDA #0 +.385d6c 8d 25 5f sta $5f25 STA SD_SECTORS_PER_CLUSTER + 1 +.385d6f c2 20 rep #$20 REP #$20 ; set A long +.385d71 bd 10 62 lda $6210,x LDA SD_BTSCT_BEGIN,X + $10 +.385d74 29 ff 00 and #$00ff AND #$FF +.385d77 8d 16 5f sta $5f16 STA SD_FAT_COUNT +.385d7a bd 11 62 lda $6211,x LDA SD_BTSCT_BEGIN,X + $11 +.385d7d 8d 1c 5f sta $5f1c STA SD_ROOT_ENTRIES +.385d80 bd 13 62 lda $6213,x LDA SD_BTSCT_BEGIN,X + $13 +.385d83 f0 28 beq $385dad BEQ SD_LARGE_SECTORS +.385d85 8d 18 5f sta $5f18 STA SD_SECTORS +.385d88 a9 00 00 lda #$0000 LDA #0 +.385d8b 8d 1a 5f sta $5f1a STA SD_SECTORS + 2 +.385d8e ad 18 5f lda $5f18 LDA SD_SECTORS +.385d91 8d 12 01 sta $0112 STA D0_OPERAND_B +.385d94 ad 24 5f lda $5f24 LDA SD_SECTORS_PER_CLUSTER +.385d97 8d 10 01 sta $0110 STA D0_OPERAND_A +.385d9a ad 14 01 lda $0114 LDA D0_RESULT +.385d9d c9 f7 0f cmp #$0ff7 CMP #$FF7 +.385da0 b0 17 bcs $385db9 BCS SD_SMALL_SECTORS ; number of sectors is more than fat12 can handle +.385da2 e2 20 sep #$20 SEP #$20 ; set A short +.385da4 a9 00 lda #$00 LDA #0 +.385da6 8d 26 5f sta $5f26 STA SD_FAT16 +.385da9 c2 20 rep #$20 REP #$20 ; set A long +.385dab 80 15 bra $385dc2 BRA SD_FAT12 +.385dad SD_LARGE_SECTORS +.385dad bd 20 62 lda $6220,x LDA SD_BTSCT_BEGIN,X + $20 +.385db0 8d 18 5f sta $5f18 STA SD_SECTORS +.385db3 bd 22 62 lda $6222,x LDA SD_BTSCT_BEGIN,X + $22 +.385db6 8d 1a 5f sta $5f1a STA SD_SECTORS + 2 +.385db9 SD_SMALL_SECTORS +.385db9 e2 20 sep #$20 SEP #$20 ; set A short +.385dbb a9 01 lda #$01 LDA #1 +.385dbd 8d 26 5f sta $5f26 STA SD_FAT16 +.385dc0 c2 20 rep #$20 REP #$20 ; set A long +.385dc2 SD_FAT12 +.385dc2 bd 0e 62 lda $620e,x LDA SD_BTSCT_BEGIN,X + $E +.385dc5 8d 10 5f sta $5f10 STA SD_RESERVED_SECTORS +.385dc8 bd 16 62 lda $6216,x LDA SD_BTSCT_BEGIN,X + $16 +.385dcb 8d 12 5f sta $5f12 STA SD_SECTORS_PER_FAT +.385dce 20 c1 61 jsr $3861c1 JSR COMPUTE_FAT_ROOT_DATA_OFFSETS +.385dd1 RMBR_DONE +.385dd1 6b rtl RTL +.385dd2 ISDOS_READ_BLOCK +.385dd2 5a phy PHY +.385dd3 af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL +.385dd7 29 fd and #$fd AND #~GABE_CTRL_SDC_LED +.385dd9 09 02 ora #$02 ORA #GABE_CTRL_SDC_LED +.385ddb 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL +.385ddf a5 3f lda $3f LDA SDCARD_PRSNT_MNT +.385de1 d0 02 bne $385de5 BNE SR_CARD_PRESENT +.385de3 80 2d bra $385e12 BRA SR_DONE +.385de5 SR_CARD_PRESENT +.385de5 a9 02 lda #$02 LDA #SDC_TRANS_READ_BLK +.385de7 8f 02 ea af sta $afea02 STA SDC_TRANS_TYPE_REG +.385deb a9 01 lda #$01 LDA #SDC_TRANS_START +.385ded 8f 03 ea af sta $afea03 STA SDC_TRANS_CONTROL_REG +.385df1 af 04 ea af lda $afea04 SR_WAIT LDA SDC_TRANS_STATUS_REG +.385df5 29 01 and #$01 AND #SDC_TRANS_BUSY +.385df7 c9 01 cmp #$01 CMP #SDC_TRANS_BUSY +.385df9 f0 f6 beq $385df1 BEQ SR_WAIT +.385dfb af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG +.385dff f0 02 beq $385e03 BEQ SD_READ_BLOCK_OK +.385e01 80 0f bra $385e12 BRA SR_DONE +.385e03 SD_READ_BLOCK_OK +.385e03 a0 00 00 ldy #$0000 LDY #0 +.385e06 SR_READ_LOOP +.385e06 af 10 ea af lda $afea10 LDA SDC_RX_FIFO_DATA_REG +.385e0a 97 80 sta [$80],y STA [SD_DATA],Y +.385e0c c8 iny INY +.385e0d c0 00 02 cpy #$0200 CPY #512 +.385e10 d0 f4 bne $385e06 BNE SR_READ_LOOP +.385e12 SR_DONE +.385e12 a9 01 lda #$01 LDA #1 +.385e14 8f 14 ea af sta $afea14 STA SDC_RX_FIFO_CTRL_REG +.385e18 af 80 e8 af lda $afe880 LDA GABE_MSTR_CTRL +.385e1c 29 fd and #$fd AND #~GABE_CTRL_SDC_LED +.385e1e 8f 80 e8 af sta $afe880 STA GABE_MSTR_CTRL +.385e22 7a ply PLY +.385e23 6b rtl RTL +.385e24 DISPLAY_FAT_NAME +.385e24 48 pha PHA ; - store the value of filetype +.385e25 a0 00 00 ldy #$0000 LDY #0 +.385e28 _RD_VOLNAME_LOOP +.385e28 b7 80 lda [$80],y LDA [SD_DATA],Y +.385e2a 22 18 10 00 jsl $001018 JSL PUTC +.385e2e c8 iny INY +.385e2f c0 08 00 cpy #$0008 CPY #8 +.385e32 f0 07 beq $385e3b BEQ _RD_DOT +.385e34 c0 0b 00 cpy #$000b CPY #11 +.385e37 d0 ef bne $385e28 BNE _RD_VOLNAME_LOOP +.385e39 80 0e bra $385e49 BRA _DFAT_NAME_DONE +.385e3b _RD_DOT +.385e3b 68 pla PLA ; - read the value of filetype +.385e3c 48 pha PHA ; - store the value of filetype +.385e3d 89 18 bit #$18 BIT #$18 +.385e3f d0 e7 bne $385e28 BNE _RD_VOLNAME_LOOP +.385e41 a9 2e lda #$2e LDA #"." +.385e43 22 18 10 00 jsl $001018 JSL PUTC +.385e47 80 df bra $385e28 BRA _RD_VOLNAME_LOOP +.385e49 _DFAT_NAME_DONE +.385e49 68 pla PLA ; - read the value of filetype +.385e4a 89 18 bit #$18 BIT #$18 +.385e4c d0 3b bne $385e89 BNE RD_DFAT_DONE +.385e4e a9 38 lda #$38 LDA #`sd_cluster_str +.385e50 8b phb PHB +.385e51 48 pha PHA +.385e52 ab plb PLB +.385e53 a2 c0 63 ldx #$63c0 LDX #<>sd_cluster_str +.385e56 22 1c 10 00 jsl $00101c JSL PUTS +.385e5a ab plb PLB +.385e5b a0 1b 00 ldy #$001b LDY #fatrec.cluster + 1 +.385e5e b7 80 lda [$80],y LDA [SD_DATA],Y +.385e60 22 80 10 00 jsl $001080 JSL PRINTAH +.385e64 a0 1a 00 ldy #$001a LDY #fatrec.cluster +.385e67 b7 80 lda [$80],y LDA [SD_DATA],Y +.385e69 22 80 10 00 jsl $001080 JSL PRINTAH +.385e6d a9 38 lda #$38 LDA #`sd_filesize_str +.385e6f 8b phb PHB +.385e70 48 pha PHA +.385e71 ab plb PLB +.385e72 a2 cb 63 ldx #$63cb LDX #<>sd_filesize_str +.385e75 22 1c 10 00 jsl $00101c JSL PUTS +.385e79 ab plb PLB +.385e7a a0 1f 00 ldy #$001f LDY #fatrec.size_h + 1 +.385e7d RD_SIZE_LOOP +.385e7d b7 80 lda [$80],y LDA [SD_DATA],Y +.385e7f 22 80 10 00 jsl $001080 JSL PRINTAH +.385e83 88 dey DEY +.385e84 c0 1b 00 cpy #$001b CPY #$1B +.385e87 d0 f4 bne $385e7d BNE RD_SIZE_LOOP +.385e89 RD_DFAT_DONE +.385e89 a9 0d lda #$0d LDA #$D +.385e8b 22 18 10 00 jsl $001018 JSL PUTC +.385e8f 60 rts RTS +.385e90 ISDOS_DISPLAY_ROOT_DIR +.385e90 a5 3f lda $3f LDA SDCARD_PRSNT_MNT ; this must be non-zero +.385e92 d0 01 bne $385e95 BNE RD_CARD_PRESENT +.385e94 6b rtl RTL +.385e95 RD_CARD_PRESENT +.385e95 c2 20 rep #$20 REP #$20 ; set A long +.385e97 a9 00 00 lda #$0000 LDA #0 ; reset the root entries offset +.385e9a 8d 20 5f sta $5f20 STA SD_DIR_OFFSET +.385e9d RD_NEXT_SECTOR +.385e9d a9 00 64 lda #$6400 LDA #SD_ROOT_BEGIN +.385ea0 85 80 sta $80 STA SD_DATA +.385ea2 a9 00 00 lda #$0000 LDA #0 +.385ea5 85 82 sta $82 STA SD_DATA + 2 +.385ea7 ad 20 5f lda $5f20 LDA SD_DIR_OFFSET ; multiply by 512 +.385eaa 0a asl a ASL A +.385eab eb xba XBA +.385eac 8d 20 01 sta $0120 STA ADDER_A +.385eaf a9 00 00 lda #$0000 LDA #0 +.385eb2 8d 22 01 sta $0122 STA ADDER_A + 2 +.385eb5 ad 08 5f lda $5f08 LDA SD_ROOT_OFFSET +.385eb8 8d 24 01 sta $0124 STA ADDER_B +.385ebb ad 0a 5f lda $5f0a LDA SD_ROOT_OFFSET+2 +.385ebe 8d 26 01 sta $0126 STA ADDER_B + 2 +.385ec1 ad 28 01 lda $0128 LDA ADDER_R +.385ec4 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG +.385ec8 ad 2a 01 lda $012a LDA ADDER_R + 2 +.385ecb 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG +.385ecf e2 20 sep #$20 SEP #$20 ; set A short +.385ed1 22 d2 5d 38 jsl $385dd2 JSL ISDOS_READ_BLOCK +.385ed5 af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG +.385ed9 f0 08 beq $385ee3 BEQ RD_DIR_ENTRY +.385edb a2 31 63 ldx #$6331 LDX #<>SD_ROOT_ERROR_MSG +.385ede 20 aa 5b jsr $385baa JSR DISPLAY_MSG +.385ee1 80 6a bra $385f4d BRA RD_DONE +.385ee3 RD_DIR_ENTRY +.385ee3 a7 80 lda [$80] LDA [SD_DATA] +.385ee5 d0 04 bne $385eeb BNE RD_CONTINUE ; if first byte is 0, entry is available and there are no following entries +.385ee7 5c 4d 5f 38 jmp $385f4d JML RD_DONE +.385eeb RD_CONTINUE +.385eeb c9 e5 cmp #$e5 CMP #$E5 +.385eed f0 35 beq $385f24 BEQ RD_SKIP +.385eef RD_LOOP +.385eef a0 0b 00 ldy #$000b LDY #fatrec.type +.385ef2 b7 80 lda [$80],y LDA [SD_DATA],Y +.385ef4 c9 0f cmp #$0f CMP #$F ; long file name +.385ef6 d0 04 bne $385efc BNE RD_NOT_VFAT +.385ef8 5c 78 5f 38 jmp $385f78 JML RD_READ_LONG_FILENAME +.385efc RD_NOT_VFAT +.385efc 89 02 bit #$02 BIT #2 ; hidden +.385efe f0 02 beq $385f02 BEQ RD_NOT_HIDDEN +.385f00 80 22 bra $385f24 BRA RD_SKIP +.385f02 RD_NOT_HIDDEN +.385f02 89 08 bit #$08 BIT #8 ; volume name +.385f04 f0 04 beq $385f0a BEQ RD_NOT_VOLUME +.385f06 5c 63 5f 38 jmp $385f63 JML RD_READ_VOLNAME +.385f0a RD_NOT_VOLUME +.385f0a 89 10 bit #$10 BIT #$10 ; directory +.385f0c f0 04 beq $385f12 BEQ RD_NOT_DIRECTORY +.385f0e 5c 4e 5f 38 jmp $385f4e JML RD_DIRNAME +.385f12 RD_NOT_DIRECTORY +.385f12 48 pha PHA ; - store the value of filetype +.385f13 a9 38 lda #$38 LDA #`sd_filename +.385f15 8b phb PHB +.385f16 48 pha PHA +.385f17 ab plb PLB +.385f18 a2 b2 63 ldx #$63b2 LDX #<>sd_filename +.385f1b 22 1c 10 00 jsl $00101c JSL PUTS +.385f1f ab plb PLB +.385f20 68 pla PLA +.385f21 20 24 5e jsr $385e24 JSR DISPLAY_FAT_NAME +.385f24 RD_SKIP +.385f24 c2 20 rep #$20 REP #$20 ; set A long +.385f26 a5 80 lda $80 LDA SD_DATA +.385f28 29 e0 01 and #$01e0 AND #$1E0 +.385f2b c9 e0 01 cmp #$01e0 CMP #$1E0 +.385f2e d0 0f bne $385f3f BNE RD_SKIP_NEXT +.385f30 ad 20 5f lda $5f20 LDA SD_DIR_OFFSET +.385f33 1a inc a INC A +.385f34 cd 1c 5f cmp $5f1c CMP SD_ROOT_ENTRIES +.385f37 b0 14 bcs $385f4d BCS RD_DONE +.385f39 8d 20 5f sta $5f20 STA SD_DIR_OFFSET ; next sector +.385f3c 4c 9d 5e jmp $385e9d JMP RD_NEXT_SECTOR +.385f3f RD_SKIP_NEXT +.385f3f a5 80 lda $80 LDA SD_DATA +.385f41 18 clc CLC +.385f42 69 20 00 adc #$0020 ADC #$20 +.385f45 85 80 sta $80 STA SD_DATA +.385f47 e2 20 sep #$20 SEP #$20 ; set A short +.385f49 5c e3 5e 38 jmp $385ee3 JML RD_DIR_ENTRY +.385f4d RD_DONE +.385f4d 6b rtl RTL +.385f4e RD_DIRNAME +.385f4e 48 pha PHA ; - store the value of filetype +.385f4f a9 38 lda #$38 LDA #`sd_dir_name +.385f51 8b phb PHB +.385f52 48 pha PHA +.385f53 ab plb PLB +.385f54 a2 a4 63 ldx #$63a4 LDX #<>sd_dir_name +.385f57 22 1c 10 00 jsl $00101c JSL PUTS +.385f5b ab plb PLB +.385f5c 68 pla PLA +.385f5d 20 24 5e jsr $385e24 JSR DISPLAY_FAT_NAME +.385f60 4c 24 5f jmp $385f24 JMP RD_SKIP +.385f63 RD_READ_VOLNAME +.385f63 48 pha PHA ; - store the value of filetype +.385f64 a9 38 lda #$38 LDA #`sd_volume_name +.385f66 8b phb PHB +.385f67 48 pha PHA +.385f68 ab plb PLB +.385f69 a2 88 63 ldx #$6388 LDX #<>sd_volume_name +.385f6c 22 1c 10 00 jsl $00101c JSL PUTS +.385f70 ab plb PLB +.385f71 68 pla PLA +.385f72 20 24 5e jsr $385e24 JSR DISPLAY_FAT_NAME +.385f75 4c 24 5f jmp $385f24 JMP RD_SKIP +.385f78 RD_READ_LONG_FILENAME +.385f78 4c 24 5f jmp $385f24 JMP RD_SKIP +.385f7b STORE_FILE_LIST +.385f7b a0 0b 00 ldy #$000b LDY #11 +.385f7e c9 10 cmp #$10 CMP #$10 +.385f80 f0 02 beq $385f84 BEQ SF_DIR +.385f82 a9 01 lda #$01 LDA #1 +.385f84 SF_DIR +.385f84 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR],Y +.385f86 a0 00 00 ldy #$0000 LDY #0 +.385f89 a2 0b 00 ldx #$000b LDX #11 +.385f8c SF_LOOP_NAME +.385f8c b7 80 lda [$80],y LDA [SD_DATA],Y +.385f8e 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR],Y +.385f90 c8 iny INY +.385f91 ca dex DEX +.385f92 d0 f8 bne $385f8c BNE SF_LOOP_NAME +.385f94 c2 20 rep #$20 REP #$20 ; set A long +.385f96 a0 1a 00 ldy #$001a LDY #fatrec.cluster +.385f99 b7 80 lda [$80],y LDA [SD_DATA],Y +.385f9b a0 10 00 ldy #$0010 LDY #16 +.385f9e 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR],Y +.385fa0 a0 1c 00 ldy #$001c LDY #fatrec.size_l +.385fa3 b7 80 lda [$80],y LDA [SD_DATA],Y +.385fa5 a0 0c 00 ldy #$000c LDY #12 +.385fa8 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR],Y +.385faa a0 1e 00 ldy #$001e LDY #fatrec.size_h +.385fad b7 80 lda [$80],y LDA [SD_DATA],Y +.385faf a0 0e 00 ldy #$000e LDY #14 +.385fb2 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR],Y +.385fb4 a5 51 lda $51 LDA SDOS_FILE_REC_PTR +.385fb6 18 clc CLC +.385fb7 69 12 00 adc #$0012 ADC #18 +.385fba 85 51 sta $51 STA SDOS_FILE_REC_PTR +.385fbc e2 20 sep #$20 SEP #$20 ; set A short +.385fbe 60 rts RTS +.385fbf ISDOS_PARSE_ROOT_DIR +.385fbf a5 3f lda $3f LDA SDCARD_PRSNT_MNT +.385fc1 d0 01 bne $385fc4 BNE SP_CARD_PRESENT +.385fc3 6b rtl RTL +.385fc4 SP_CARD_PRESENT +.385fc4 c2 20 rep #$20 REP #$20 ; set A long +.385fc6 a9 00 00 lda #$0000 LDA #0 ; reset the root entries offset +.385fc9 8d 20 5f sta $5f20 STA SD_DIR_OFFSET +.385fcc SP_NEXT_SECTOR +.385fcc a9 00 64 lda #$6400 LDA #SD_ROOT_BEGIN +.385fcf 85 80 sta $80 STA SD_DATA +.385fd1 a9 00 00 lda #$0000 LDA #0 +.385fd4 85 82 sta $82 STA SD_DATA + 2 +.385fd6 ad 20 5f lda $5f20 LDA SD_DIR_OFFSET ; multiply by 512 +.385fd9 0a asl a ASL A +.385fda eb xba XBA +.385fdb 8d 20 01 sta $0120 STA ADDER_A +.385fde a9 00 00 lda #$0000 LDA #0 +.385fe1 8d 22 01 sta $0122 STA ADDER_A + 2 +.385fe4 ad 08 5f lda $5f08 LDA SD_ROOT_OFFSET +.385fe7 8d 24 01 sta $0124 STA ADDER_B +.385fea ad 0a 5f lda $5f0a LDA SD_ROOT_OFFSET+2 +.385fed 8d 26 01 sta $0126 STA ADDER_B + 2 +.385ff0 ad 28 01 lda $0128 LDA ADDER_R +.385ff3 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG +.385ff7 ad 2a 01 lda $012a LDA ADDER_R + 2 +.385ffa 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG +.385ffe e2 20 sep #$20 SEP #$20 ; set A short +.386000 22 d2 5d 38 jsl $385dd2 JSL ISDOS_READ_BLOCK +.386004 af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG +.386008 f0 04 beq $38600e BEQ SP_DIR_ENTRY +.38600a 5c 6a 60 38 jmp $38606a JML SP_DONE +.38600e SP_DIR_ENTRY +.38600e a7 80 lda [$80] LDA [SD_DATA] +.386010 d0 04 bne $386016 BNE SP_CONTINUE ; if first byte is 0, entry is available and there are no following entries +.386012 5c 6a 60 38 jmp $38606a JML SP_DONE +.386016 SP_CONTINUE +.386016 c9 e5 cmp #$e5 CMP #$E5 +.386018 f0 27 beq $386041 BEQ SP_SKIP +.38601a SP_LOOP +.38601a a0 0b 00 ldy #$000b LDY #fatrec.type +.38601d b7 80 lda [$80],y LDA [SD_DATA],Y +.38601f c9 0f cmp #$0f CMP #$F ; long file name +.386021 d0 04 bne $386027 BNE SP_NOT_VFAT +.386023 5c 41 60 38 jmp $386041 JML SP_SKIP +.386027 SP_NOT_VFAT +.386027 89 02 bit #$02 BIT #2 ; hidden +.386029 f0 02 beq $38602d BEQ SP_NOT_HIDDEN +.38602b 80 14 bra $386041 BRA SP_SKIP +.38602d SP_NOT_HIDDEN +.38602d 89 08 bit #$08 BIT #8 ; volume name +.38602f f0 04 beq $386035 BEQ SP_NOT_VOLUME +.386031 5c 41 60 38 jmp $386041 JML SP_SKIP +.386035 SP_NOT_VOLUME +.386035 89 10 bit #$10 BIT #$10 ; directory +.386037 f0 05 beq $38603e BEQ SP_NOT_DIRECTORY +.386039 20 7b 5f jsr $385f7b JSR STORE_FILE_LIST +.38603c 80 03 bra $386041 BRA SP_SKIP +.38603e SP_NOT_DIRECTORY +.38603e 20 7b 5f jsr $385f7b JSR STORE_FILE_LIST +.386041 SP_SKIP +.386041 c2 20 rep #$20 REP #$20 ; set A long +.386043 a5 80 lda $80 LDA SD_DATA +.386045 29 e0 01 and #$01e0 AND #$1E0 ; each record in FAT is $20 bytes long +.386048 c9 e0 01 cmp #$01e0 CMP #$1E0 +.38604b d0 0f bne $38605c BNE SP_SKIP_NEXT +.38604d ad 20 5f lda $5f20 LDA SD_DIR_OFFSET +.386050 1a inc a INC A +.386051 cd 1c 5f cmp $5f1c CMP SD_ROOT_ENTRIES +.386054 b0 14 bcs $38606a BCS SP_DONE +.386056 8d 20 5f sta $5f20 STA SD_DIR_OFFSET ; next sector +.386059 4c cc 5f jmp $385fcc JMP SP_NEXT_SECTOR +.38605c SP_SKIP_NEXT +.38605c a5 80 lda $80 LDA SD_DATA +.38605e 18 clc CLC +.38605f 69 20 00 adc #$0020 ADC #$20 +.386062 85 80 sta $80 STA SD_DATA +.386064 e2 20 sep #$20 SEP #$20 ; set A short +.386066 5c 0e 60 38 jmp $38600e JML SP_DIR_ENTRY +.38606a SP_DONE +.38606a 6b rtl RTL +.38606b ISDOS_READ_FAT_SECTOR +.38606b 48 pha PHA +.38606c a5 3f lda $3f LDA SDCARD_PRSNT_MNT +.38606e 29 ff 00 and #$00ff AND #$FF +.386071 d0 02 bne $386075 BNE RF_CARD_PRESENT +.386073 68 pla PLA +.386074 6b rtl RTL +.386075 RF_CARD_PRESENT +.386075 68 pla PLA +.386076 85 88 sta $88 STA SD_MULT_AREA +.386078 a9 00 00 lda #$0000 LDA #0 +.38607b 85 8a sta $8a STA SD_MULT_AREA + 2 +.38607d 20 d2 5c jsr $385cd2 JSR CALC_OFFSET_BYTES +.386080 a5 88 lda $88 LDA SD_MULT_AREA +.386082 8d 20 01 sta $0120 STA ADDER_A +.386085 a5 8a lda $8a LDA SD_MULT_AREA + 2 +.386087 8d 22 01 sta $0122 STA ADDER_A + 2 +.38608a ad 04 5f lda $5f04 LDA SD_FAT_OFFSET +.38608d 8d 24 01 sta $0124 STA ADDER_B +.386090 ad 06 5f lda $5f06 LDA SD_FAT_OFFSET+2 +.386093 8d 26 01 sta $0126 STA ADDER_B + 2 +.386096 ad 28 01 lda $0128 LDA ADDER_R +.386099 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG +.38609d ad 2a 01 lda $012a LDA ADDER_R + 2 +.3860a0 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG +.3860a4 e2 20 sep #$20 SEP #$20 ; set A short +.3860a6 22 d2 5d 38 jsl $385dd2 JSL ISDOS_READ_BLOCK +.3860aa af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG +.3860ae f0 08 beq $3860b8 BEQ SD_CONTINUE_FAT +.3860b0 a2 12 63 ldx #$6312 LDX #<>SD_FAT_ERROR_MSG +.3860b3 20 aa 5b jsr $385baa JSR DISPLAY_MSG +.3860b6 80 00 bra $3860b8 BRA SD_CONTINUE_FAT +.3860b8 SD_CONTINUE_FAT +.3860b8 c2 20 rep #$20 REP #$20 ; set A long +.3860ba 6b rtl RTL +.3860bb ISDOS_READ_DATA_CLUSTER +.3860bb 48 pha PHA +.3860bc a5 3f lda $3f LDA SDCARD_PRSNT_MNT +.3860be 29 ff 00 and #$00ff AND #$FF +.3860c1 d0 02 bne $3860c5 BNE SDR_CARD_PRESENT +.3860c3 68 pla PLA +.3860c4 6b rtl RTL +.3860c5 SDR_CARD_PRESENT +.3860c5 68 pla PLA +.3860c6 38 sec SEC +.3860c7 e9 02 00 sbc #$0002 SBC #2 +.3860ca 8d 00 01 sta $0100 STA UNSIGNED_MULT_A +.3860cd ad 24 5f lda $5f24 LDA SD_SECTORS_PER_CLUSTER +.3860d0 8d 02 01 sta $0102 STA UNSIGNED_MULT_B +.3860d3 ad 04 01 lda $0104 LDA UNSIGNED_MULT_RESULT +.3860d6 48 pha PHA +.3860d7 a2 00 00 ldx #$0000 LDX #0 +.3860da SDR_NEXT_SECTOR +.3860da 85 88 sta $88 STA SD_MULT_AREA +.3860dc a9 00 00 lda #$0000 LDA #0 +.3860df 85 8a sta $8a STA SD_MULT_AREA + 2 +.3860e1 20 d2 5c jsr $385cd2 JSR CALC_OFFSET_BYTES +.3860e4 a5 88 lda $88 LDA SD_MULT_AREA +.3860e6 8d 20 01 sta $0120 STA ADDER_A +.3860e9 a5 8a lda $8a LDA SD_MULT_AREA + 2 +.3860eb 8d 22 01 sta $0122 STA ADDER_A + 2 +.3860ee ad 0c 5f lda $5f0c LDA SD_DATA_OFFSET +.3860f1 8d 24 01 sta $0124 STA ADDER_B +.3860f4 ad 0e 5f lda $5f0e LDA SD_DATA_OFFSET+2 +.3860f7 8d 26 01 sta $0126 STA ADDER_B + 2 +.3860fa ad 28 01 lda $0128 LDA ADDER_R +.3860fd 8f 07 ea af sta $afea07 STA SDC_SD_ADDR_7_0_REG +.386101 ad 2a 01 lda $012a LDA ADDER_R + 2 +.386104 8f 09 ea af sta $afea09 STA SDC_SD_ADDR_23_16_REG +.386108 e2 20 sep #$20 SEP #$20 ; set A short +.38610a 22 d2 5d 38 jsl $385dd2 JSL ISDOS_READ_BLOCK +.38610e af 05 ea af lda $afea05 LDA SDC_TRANS_ERROR_REG +.386112 f0 0a beq $38611e BEQ SD_CONTINUE_DATA +.386114 a9 ff lda #$ff LDA #$FF +.386116 8d 27 5f sta $5f27 STA CLUSTER_PTR +.386119 8d 28 5f sta $5f28 STA CLUSTER_PTR + 1 +.38611c 80 17 bra $386135 BRA SD_CONTINUE_DATA_DONE +.38611e SD_CONTINUE_DATA +.38611e c2 20 rep #$20 REP #$20 ; set A long +.386120 a5 80 lda $80 LDA SD_DATA +.386122 18 clc CLC +.386123 69 00 02 adc #$0200 ADC #$200 +.386126 85 80 sta $80 STA SD_DATA +.386128 90 02 bcc $38612c BCC SD_CONT_NO_CARRY +.38612a e6 82 inc $82 INC SD_DATA + 2 +.38612c SD_CONT_NO_CARRY +.38612c 68 pla PLA +.38612d 1a inc a INC A +.38612e 48 pha PHA +.38612f e8 inx INX +.386130 ec 24 5f cpx $5f24 CPX SD_SECTORS_PER_CLUSTER +.386133 d0 a5 bne $3860da BNE SDR_NEXT_SECTOR +.386135 SD_CONTINUE_DATA_DONE +.386135 c2 20 rep #$20 REP #$20 ; set A long +.386137 68 pla PLA +.386138 6b rtl RTL +.386139 ISDOS_READ_FILE +.386139 48 pha PHA +.38613a a5 3f lda $3f LDA SDCARD_PRSNT_MNT +.38613c 29 ff 00 and #$00ff AND #$FF +.38613f d0 02 bne $386143 BNE SD_CARD_PRESENT +.386141 68 pla PLA +.386142 6b rtl RTL +.386143 SD_CARD_PRESENT +.386143 68 pla PLA +.386144 8d 27 5f sta $5f27 STA CLUSTER_PTR +.386147 SD_CLUSTER_LOOP +.386147 22 bb 60 38 jsl $3860bb JSL ISDOS_READ_DATA_CLUSTER +.38614b ad 26 5f lda $5f26 LDA SD_FAT16 +.38614e 29 01 00 and #$0001 AND #$1 +.386151 0a asl a ASL +.386152 aa tax TAX +.386153 fc 59 61 jsr ($386159,x) JSR (READ_FAT_TABLE,X) +.386156 d0 ef bne $386147 BNE SD_CLUSTER_LOOP +.386158 6b rtl RTL +>386159 5d 61 READ_FAT_TABLE .word <>FAT12_GET_NEXT_CLUSTER +>38615b 82 61 .word <>FAT16_GET_NEXT_CLUSTER +.38615d FAT12_GET_NEXT_CLUSTER +.38615d ad 27 5f lda $5f27 LDA CLUSTER_PTR ; a FAT12 page contains about 340 entries +.386160 4a lsr a LSR A ; this may result in a carry, if the cluster to read is odd +.386161 90 0e bcc $386171 BCC F12_NC_NO_CARRY +.386163 18 clc CLC +.386164 6d 27 5f adc $5f27 ADC CLUSTER_PTR +.386167 a8 tay TAY +.386168 b9 00 66 lda $6600,y LDA FAT_DATA,Y +.38616b 4a lsr a LSR A +.38616c 4a lsr a LSR A +.38616d 4a lsr a LSR A +.38616e 4a lsr a LSR A ; divide by 16 +.38616f 80 0a bra $38617b BRA F12_NC_CONTINUE +.386171 F12_NC_NO_CARRY +.386171 6d 27 5f adc $5f27 ADC CLUSTER_PTR +.386174 a8 tay TAY +.386175 b9 00 66 lda $6600,y LDA FAT_DATA,Y +.386178 29 ff 0f and #$0fff AND #$FFF +.38617b F12_NC_CONTINUE +.38617b 8d 27 5f sta $5f27 STA CLUSTER_PTR +.38617e c9 ff 0f cmp #$0fff CMP #$FFF +.386181 60 rts RTS +.386182 FAT16_GET_NEXT_CLUSTER +.386182 ad 27 5f lda $5f27 LDA CLUSTER_PTR +.386185 eb xba XBA +.386186 29 ff 00 and #$00ff AND #$FF +.386189 c5 86 cmp $86 CMP SD_DATA_FAT_PAGE +.38618b f0 22 beq $3861af BEQ SKIP_FAT_LOADING +.38618d 48 pha PHA +.38618e a5 80 lda $80 LDA SD_DATA +.386190 85 83 sta $83 STA SD_TMP_DATA +.386192 a5 82 lda $82 LDA SD_DATA + 2 +.386194 85 85 sta $85 STA SD_TMP_DATA + 2 +.386196 a9 00 66 lda #$6600 LDA #FAT_DATA +.386199 85 80 sta $80 STA SD_DATA +.38619b a9 00 00 lda #$0000 LDA #0 +.38619e 85 82 sta $82 STA SD_DATA + 2 +.3861a0 68 pla PLA +.3861a1 85 86 sta $86 STA SD_DATA_FAT_PAGE +.3861a3 22 6b 60 38 jsl $38606b JSL ISDOS_READ_FAT_SECTOR +.3861a7 a5 83 lda $83 LDA SD_TMP_DATA +.3861a9 85 80 sta $80 STA SD_DATA +.3861ab a5 85 lda $85 LDA SD_TMP_DATA + 2 +.3861ad 85 82 sta $82 STA SD_DATA + 2 +.3861af SKIP_FAT_LOADING +.3861af ad 27 5f lda $5f27 LDA CLUSTER_PTR +.3861b2 29 ff 00 and #$00ff AND #$FF +.3861b5 0a asl a ASL A ; multiply by 2 +.3861b6 a8 tay TAY +.3861b7 b9 00 66 lda $6600,y LDA FAT_DATA,Y +.3861ba 8d 27 5f sta $5f27 STA CLUSTER_PTR +.3861bd c9 ff ff cmp #$ffff CMP #$FFFF +.3861c0 60 rts RTS +.3861c1 COMPUTE_FAT_ROOT_DATA_OFFSETS +.3861c1 ad 10 5f lda $5f10 LDA SD_RESERVED_SECTORS ; 16 bit value +.3861c4 85 88 sta $88 STA SD_MULT_AREA +.3861c6 a9 00 00 lda #$0000 LDA #0 +.3861c9 85 8a sta $8a STA SD_MULT_AREA + 2 +.3861cb 20 d2 5c jsr $385cd2 JSR CALC_OFFSET_BYTES ; compute the byte offset +.3861ce a5 88 lda $88 LDA SD_MULT_AREA +.3861d0 8d 20 01 sta $0120 STA ADDER_A +.3861d3 a5 8a lda $8a LDA SD_MULT_AREA + 2 +.3861d5 8d 22 01 sta $0122 STA ADDER_A+2 +.3861d8 ad 00 5f lda $5f00 LDA SD_FIRST_SECTOR ; 32 bit value +.3861db 8d 24 01 sta $0124 STA ADDER_B +.3861de ad 02 5f lda $5f02 LDA SD_FIRST_SECTOR + 2 +.3861e1 8d 26 01 sta $0126 STA ADDER_B + 2 +.3861e4 ad 28 01 lda $0128 LDA ADDER_R +.3861e7 8d 04 5f sta $5f04 STA SD_FAT_OFFSET +.3861ea ad 2a 01 lda $012a LDA ADDER_R + 2 +.3861ed 8d 06 5f sta $5f06 STA SD_FAT_OFFSET + 2 +.3861f0 ad 16 5f lda $5f16 LDA SD_FAT_COUNT +.3861f3 8d 00 01 sta $0100 STA UNSIGNED_MULT_A +.3861f6 ad 12 5f lda $5f12 LDA SD_SECTORS_PER_FAT +.3861f9 8d 02 01 sta $0102 STA UNSIGNED_MULT_B +.3861fc ad 04 01 lda $0104 LDA UNSIGNED_MULT_RESULT +.3861ff 85 88 sta $88 STA SD_MULT_AREA +.386201 ad 06 01 lda $0106 LDA UNSIGNED_MULT_RESULT + 2 +.386204 85 8a sta $8a STA SD_MULT_AREA + 2 +.386206 20 d2 5c jsr $385cd2 JSR CALC_OFFSET_BYTES ; compute the byte offset +.386209 a5 88 lda $88 LDA SD_MULT_AREA +.38620b 8d 20 01 sta $0120 STA ADDER_A +.38620e a5 8a lda $8a LDA SD_MULT_AREA + 2 +.386210 8d 22 01 sta $0122 STA ADDER_A + 2 +.386213 ad 04 5f lda $5f04 LDA SD_FAT_OFFSET +.386216 8d 24 01 sta $0124 STA ADDER_B +.386219 ad 06 5f lda $5f06 LDA SD_FAT_OFFSET + 2 +.38621c 8d 26 01 sta $0126 STA ADDER_B +2 +.38621f ad 28 01 lda $0128 LDA ADDER_R +.386222 8d 08 5f sta $5f08 STA SD_ROOT_OFFSET +.386225 ad 2a 01 lda $012a LDA ADDER_R +2 +.386228 8d 0a 5f sta $5f0a STA SD_ROOT_OFFSET + 2 +.38622b ad 08 5f lda $5f08 LDA SD_ROOT_OFFSET +.38622e 8d 20 01 sta $0120 STA ADDER_A +.386231 ad 0a 5f lda $5f0a LDA SD_ROOT_OFFSET + 2 +.386234 8d 22 01 sta $0122 STA ADDER_A + 2 +.386237 a9 20 00 lda #$0020 LDA #32 ; the root contains 512 entries at 32 bytes each +.38623a 85 88 sta $88 STA SD_MULT_AREA +.38623c a9 00 00 lda #$0000 LDA #0 +.38623f 85 8a sta $8a STA SD_MULT_AREA + 2 +.386241 20 d2 5c jsr $385cd2 JSR CALC_OFFSET_BYTES +.386244 a5 88 lda $88 LDA SD_MULT_AREA +.386246 8d 24 01 sta $0124 STA ADDER_B +.386249 a5 8a lda $8a LDA SD_MULT_AREA + 2 +.38624b 8d 26 01 sta $0126 STA ADDER_B + 2 +.38624e ad 28 01 lda $0128 LDA ADDER_R +.386251 8d 0c 5f sta $5f0c STA SD_DATA_OFFSET +.386254 ad 2a 01 lda $012a LDA ADDER_R + 2 +.386257 8d 0e 5f sta $5f0e STA SD_DATA_OFFSET + 2 +.38625a 60 rts RTS +>38625b 30 30 20 2d 20 57 65 6c sd_card_tester .text "00 - Welcome to the SDCard Tester", $d, 0 +>386263 63 6f 6d 65 20 74 6f 20 74 68 65 20 53 44 43 61 +>386273 72 64 20 54 65 73 74 65 72 0d 00 +>38627e 30 31 20 2d 20 43 61 72 sd_card_present_msg .text "01 - Card Present", $d, 0 +>386286 64 20 50 72 65 73 65 6e 74 0d 00 +>386291 30 31 20 2d 20 4e 4f 20 sd_no_card_msg .text "01 - NO SDCARD PRESENT", $0D, $00 +>386299 53 44 43 41 52 44 20 50 52 45 53 45 4e 54 0d 00 +>3862a9 30 32 20 2d 20 43 61 6e sd_cant_read_mbr_msg .text "02 - Can't read MBR - No Card present", $D, $0 +>3862b1 27 74 20 72 65 61 64 20 4d 42 52 20 2d 20 4e 6f +>3862c1 20 43 61 72 64 20 70 72 65 73 65 6e 74 0d 00 +>3862d0 30 33 20 2d 20 45 72 72 sd_read_failure .text "03 - Error during read operation", $d, $0 +>3862d8 6f 72 20 64 75 72 69 6e 67 20 72 65 61 64 20 6f +>3862e8 70 65 72 61 74 69 6f 6e 0d 00 +>3862f2 30 34 20 2d 20 45 72 72 SD_BOOT_SECTOR_MSG .text "04 - Error reading Boot sector", $d, $0 +>3862fa 6f 72 20 72 65 61 64 69 6e 67 20 42 6f 6f 74 20 +>38630a 73 65 63 74 6f 72 0d 00 +>386312 30 35 20 2d 20 45 72 72 SD_FAT_ERROR_MSG .text "05 - Error reading FAT sector", $d, $0 +>38631a 6f 72 20 72 65 61 64 69 6e 67 20 46 41 54 20 73 +>38632a 65 63 74 6f 72 0d 00 +>386331 30 35 20 2d 20 45 72 72 SD_ROOT_ERROR_MSG .text "05 - Error reading Root sector", $d, $0 +>386339 6f 72 20 72 65 61 64 69 6e 67 20 52 6f 6f 74 20 +>386349 73 65 63 74 6f 72 0d 00 +>386351 30 35 20 2d 20 45 72 72 SD_DATA_ERROR_MSG .text "05 - Error reading Data sector", $d, $0 +>386359 6f 72 20 72 65 61 64 69 6e 67 20 44 61 74 61 20 +>386369 73 65 63 74 6f 72 0d 00 +>386371 49 6e 76 61 6c 69 64 20 INVALID_SIG_MSG .text 'Invalid MBR Signature',$D,0 +>386379 4d 42 52 20 53 69 67 6e 61 74 75 72 65 0d 00 +>386388 56 6f 6c 75 6d 65 20 4e sd_volume_name .text "Volume Name: ", $0 +>386390 61 6d 65 3a 20 00 +>386396 56 46 41 54 20 4e 61 6d sd_vfat_name .text "VFAT Name : ", $0 +>38639e 65 20 20 3a 20 00 +>3863a4 44 69 72 65 63 74 6f 72 sd_dir_name .text "Directory : ", $0 +>3863ac 79 20 20 3a 20 00 +>3863b2 46 69 6c 65 6e 61 6d 65 sd_filename .text "Filename : ", $0 +>3863ba 20 20 20 3a 20 00 +>3863c0 2c 20 43 6c 75 73 74 65 sd_cluster_str .text ", Cluster:", $0 +>3863c8 72 3a 00 +>3863cb 2c 20 53 69 7a 65 3a 00 sd_filesize_str .text ", Size:", $0 ;****** Return to file: tracker.asm -.3869d7 TRACKER -.3869d7 a9 ff lda #$ff LDA #$FF -.3869d9 8f 48 01 00 sta $000148 STA @lINT_EDGE_REG0 -.3869dd 8f 49 01 00 sta $000149 STA @lINT_EDGE_REG1 -.3869e1 8f 4a 01 00 sta $00014a STA @lINT_EDGE_REG2 -.3869e5 a9 ff lda #$ff LDA #$FF -.3869e7 8f 4c 01 00 sta $00014c STA @lINT_MASK_REG0 -.3869eb 8f 4d 01 00 sta $00014d STA @lINT_MASK_REG1 -.3869ef 8f 4e 01 00 sta $00014e STA @lINT_MASK_REG2 -.3869f3 20 db 5c jsr $385cdb JSR DRAW_DISPLAY -.3869f6 20 30 6d jsr $386d30 JSR INIT_KEYBOARD -.3869f9 20 c7 6d jsr $386dc7 JSR INIT_MOUSEPOINTER -.3869fc 20 3b 6a jsr $386a3b JSR INIT_CURSOR -.3869ff 20 7d 6a jsr $386a7d JSR RESET_STATE_MACHINE -.386a02 a9 38 lda #$38 LDA #`INSTRUMENT_ACCORDN -.386a04 85 69 sta $69 STA INSTR_ADDR+2 -.386a06 a9 42 lda #$42 LDA #$42 -.386a08 8f 6a 00 00 sta $00006a STA @lINSTR_NUMBER -.386a0c a2 00 00 ldx #$0000 LDX #0 ; setup channels -.386a0f NEXT_INSTR -.386a0f a9 00 lda #$00 LDA #0 -.386a11 eb xba XBA -.386a12 da phx PHX -.386a13 bf 18 10 38 lda $381018,x LDA registerOffsets_operator0,X -.386a17 aa tax TAX -.386a18 20 52 6b jsr $386b52 JSR LOAD_INSTRUMENT -.386a1b fa plx PLX -.386a1c e8 inx INX -.386a1d e0 09 00 cpx #$0009 CPX #9 -.386a20 d0 ed bne $386a0f BNE NEXT_INSTR -.386a22 22 79 30 38 jsl $383079 JSL IOPL2_TONE_TEST -.386a26 20 5c 6a jsr $386a5c JSR ENABLE_IRQS -.386a29 22 b1 30 38 jsl $3830b1 JSL OPL2_INIT -.386a2d 58 cli CLI -.386a2e 20 ae 5b jsr $385bae JSR INIT_MIDI -.386a31 20 2b 61 jsr $38612b JSR DISPLAY_ORDERS -.386a34 20 61 5e jsr $385e61 JSR DISPLAY_PATTERN -.386a37 ea nop ALWAYS NOP -.386a38 ea nop NOP -.386a39 80 fc bra $386a37 BRA ALWAYS -.386a3b 48 pha INIT_CURSOR PHA -.386a3c a9 e9 lda #$e9 LDA #$E9 ;The Cursor Character will be a Fully Filled Block -.386a3e 8f 12 00 af sta $af0012 STA VKY_TXT_CURSOR_CHAR_REG -.386a42 a9 00 lda #$00 LDA #$0 ;Set Cursor Disabled -.386a44 8f 10 00 af sta $af0010 STA VKY_TXT_CURSOR_CTRL_REG ; -.386a48 c2 30 rep #$30 REP #$30 ; set A&X long -.386a4a a9 00 00 lda #$0000 LDA #$0000; -.386a4d 8f 14 00 af sta $af0014 STA VKY_TXT_CURSOR_X_REG_L; // Set the X to Position 1 -.386a51 a9 00 00 lda #$0000 LDA #$0000; -.386a54 8f 16 00 af sta $af0016 STA VKY_TXT_CURSOR_Y_REG_L; // Set the Y to Position 1 (Below) -.386a58 e2 20 sep #$20 SEP #$20 ; set A short -.386a5a 68 pla PLA -.386a5b 60 rts RTS -.386a5c ENABLE_IRQS -.386a5c af 40 01 00 lda $000140 LDA @lINT_PENDING_REG0 -.386a60 29 84 and #$84 AND #FNX0_INT07_MOUSE | FNX0_INT02_TMR0 ;AND #FNX0_INT00_SOF -.386a62 8f 40 01 00 sta $000140 STA @lINT_PENDING_REG0 ; Writing it back will clear the Active Bit -.386a66 af 41 01 00 lda $000141 LDA @lINT_PENDING_REG1 -.386a6a 29 a1 and #$a1 AND #FNX1_INT00_KBD | FNX1_INT05_MPU401 | FNX1_INT07_SDCARD -.386a6c 8f 41 01 00 sta $000141 STA @lINT_PENDING_REG1 ; Writing it back will clear the Active Bit -.386a70 a9 7b lda #$7b LDA #~(FNX0_INT07_MOUSE | FNX0_INT02_TMR0) ;LDA #~(FNX0_INT00_SOF | FNX0_INT00_SOF ) -.386a72 8f 4c 01 00 sta $00014c STA @lINT_MASK_REG0 -.386a76 a9 5e lda #$5e LDA #~(FNX1_INT00_KBD | FNX1_INT05_MPU401 | FNX1_INT07_SDCARD) -.386a78 8f 4d 01 00 sta $00014d STA @lINT_MASK_REG1 -.386a7c 60 rts RTS -.386a7d RESET_STATE_MACHINE -.386a7d a9 00 lda #$00 LDA #0 -.386a7f 8f 15 0f 38 sta $380f15 STA STATE_MACHINE -.386a83 85 48 sta $48 STA RAD_ORDER_NUM -.386a85 64 6c stz $6c STZ LINE_NUM_HEX -.386a87 64 49 stz $49 STZ RAD_ORDER_NUM + 1 -.386a89 a9 01 lda #$01 LDA #1 -.386a8b 8f 19 0f 38 sta $380f19 STA LINE_NUM_DEC -.386a8f a6 48 ldx $48 LDX RAD_ORDER_NUM -.386a91 bf 24 fc 39 lda $39fc24,x LDA @lORDERS,X ; load the first pattern in the order list -.386a95 1a inc a INC A -.386a96 PATTN_OK -.386a96 8f 18 0f 38 sta $380f18 STA PATTERN_NUM -.386a9a 20 af 60 jsr $3860af JSR DISPLAY_SPEED -.386a9d 60 rts RTS -.386a9e INCREMENT_ORDER -.386a9e 48 pha PHA -.386a9f a9 00 lda #$00 LDA #0 -.386aa1 eb xba XBA -.386aa2 af 48 00 00 lda $000048 LDA @lRAD_ORDER_NUM -.386aa6 1a inc a INC A -.386aa7 cf 68 70 38 cmp $387068 CMP @lTuneInfo.songLength -.386aab d0 02 bne $386aaf BNE LOAD_ORDER -.386aad a9 00 lda #$00 LDA #0 -.386aaf LOAD_ORDER -.386aaf 8f 48 00 00 sta $000048 STA @lRAD_ORDER_NUM -.386ab3 aa tax TAX -.386ab4 a0 80 02 ldy #$0280 LDY #128 * 5 -.386ab7 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386aba bf 24 fc 39 lda $39fc24,x LDA @lORDERS,X ; load the pattern from the order list -.386abe 1a inc a INC A -.386abf 8f 18 0f 38 sta $380f18 STA PATTERN_NUM -.386ac3 68 pla PLA -.386ac4 60 rts RTS -.386ac5 INIT_TIMER0_BPM -.386ac5 8b phb PHB -.386ac6 a9 00 lda #$00 LDA #0 -.386ac8 48 pha PHA -.386ac9 ab plb PLB ; set databank to 0 -.386aca a9 03 lda #$03 LDA #3 ; each timer counter is 24 bits - 3 bytes -.386acc 8d 00 01 sta $0100 STA UNSIGNED_MULT_A -.386acf 9c 01 01 stz $0101 STZ UNSIGNED_MULT_A + 1 -.386ad2 9c 03 01 stz $0103 STZ UNSIGNED_MULT_B + 1 -.386ad5 38 sec SEC -.386ad6 af 17 0f 38 lda $380f17 LDA BPM ; multiply by the BPM, the 4 offset is the lowest BPM -.386ada e9 04 sbc #$04 SBC #4 -.386adc 8d 02 01 sta $0102 STA UNSIGNED_MULT_B -.386adf c2 20 rep #$20 REP #$20 ; set A long -.386ae1 ad 04 01 lda $0104 LDA UNSIGNED_MULT_RESULT -.386ae4 aa tax TAX -.386ae5 e2 20 sep #$20 SEP #$20 ; set A short -.386ae7 a9 00 lda #$00 LDA #0 ; set timer0 charge to 0 -.386ae9 8d 61 01 sta $0161 STA TIMER0_CHARGE_L -.386aec 8d 62 01 sta $0162 STA TIMER0_CHARGE_M -.386aef 8d 63 01 sta $0163 STA TIMER0_CHARGE_H -.386af2 bf 00 00 3a lda $3a0000,x LDA @lSPM_004,X -.386af6 8d 65 01 sta $0165 STA TIMER0_CMP_L -.386af9 bf 01 00 3a lda $3a0001,x LDA @lSPM_004+1,X -.386afd 8d 66 01 sta $0166 STA TIMER0_CMP_M -.386b00 bf 02 00 3a lda $3a0002,x LDA @lSPM_004+2,X -.386b04 8d 67 01 sta $0167 STA TIMER0_CMP_H -.386b07 a9 01 lda #$01 LDA #TMR0_CMP_RECLR ; count up from "CHARGE" value to TIMER_CMP -.386b09 8d 64 01 sta $0164 STA TIMER0_CMP_REG -.386b0c a9 0b lda #$0b LDA #(TMR0_EN | TMR0_UPDWN | TMR0_SCLR) -.386b0e 8d 60 01 sta $0160 STA TIMER0_CTRL_REG -.386b11 ab plb PLB -.386b12 60 rts RTS -.386b13 INIT_TIMER0 -.386b13 8b phb PHB -.386b14 a9 00 lda #$00 LDA #0 -.386b16 48 pha PHA -.386b17 ab plb PLB ; set databank to 0 -.386b18 e2 20 sep #$20 SEP #$20 ; set A short -.386b1a a9 00 lda #$00 LDA #0 ; set timer0 charge to 0 -.386b1c 8d 61 01 sta $0161 STA TIMER0_CHARGE_L -.386b1f 8d 62 01 sta $0162 STA TIMER0_CHARGE_M -.386b22 8d 63 01 sta $0163 STA TIMER0_CHARGE_H -.386b25 a9 01 lda #$01 LDA #TMR0_CMP_RECLR ; count up from "CHARGE" value to TIMER_CMP -.386b27 8d 64 01 sta $0164 STA TIMER0_CMP_REG -.386b2a a9 0b lda #$0b LDA #(TMR0_EN | TMR0_UPDWN | TMR0_SCLR) -.386b2c 8d 60 01 sta $0160 STA TIMER0_CTRL_REG -.386b2f ab plb PLB -.386b30 60 rts RTS -.386b31 INIT_OPL2_TMRS -.386b31 a9 80 lda #$80 LDA #$80 ; Reset OPL2 Interrupts -.386b33 8f 04 e6 af sta $afe604 STA OPL3_L_IRQ ; byte 4 of OPL2 -.386b37 20 4b 6b jsr $386b4b JSR WAIT_80 -.386b3a a9 10 lda #$10 LDA #$10 -.386b3c 8f 02 e6 af sta $afe602 STA OPL3_L_TIMER1 ; byte 2 of OPL2 -.386b40 8f 03 e6 af sta $afe603 STA OPL3_L_TIMER2 ; byte 2 of OPL2 -.386b44 a9 03 lda #$03 LDA #$3 ; enable timers 1 and 2 -.386b46 8f 04 e6 af sta $afe604 STA OPL3_L_IRQ ; byte 4 of OPL2 -.386b4a 60 rts RTS -.386b4b WAIT_80 -.386b4b a2 30 02 ldx #$0230 LDX #560 -.386b4e WAIT_LP -.386b4e ca dex DEX -.386b4f d0 fd bne $386b4e BNE WAIT_LP -.386b51 60 rts RTS -.386b52 LOAD_INSTRUMENT -.386b52 af 6a 00 00 lda $00006a LDA @lINSTR_NUMBER -.386b56 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A -.386b5a a9 00 lda #$00 LDA #0 -.386b5c 8f 01 01 00 sta $000101 STA @lUNSIGNED_MULT_A + 1 -.386b60 8f 03 01 00 sta $000103 STA @lUNSIGNED_MULT_B + 1 -.386b64 a9 16 lda #$16 LDA #INSTR_REC_LEN -.386b66 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B -.386b6a c2 20 rep #$20 REP #$20 ; set A long -.386b6c af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT -.386b70 18 clc CLC -.386b71 69 3b 10 adc #$103b ADC #<>INSTRUMENT_ACCORDN -.386b74 85 67 sta $67 STA INSTR_ADDR -.386b76 e2 20 sep #$20 SEP #$20 ; set A short -.386b78 af 6a 00 00 lda $00006a LDA @lINSTR_NUMBER -.386b7c a0 93 02 ldy #$0293 LDY #5 * 128 + 19 -.386b7f 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386b82 a7 67 lda [$67] LDA [INSTR_ADDR] -.386b84 d0 4b bne $386bd1 BNE DRUM_SET -.386b86 e6 67 inc $67 INC INSTR_ADDR -.386b88 d0 02 bne $386b8c BNE LD_INST_1 -.386b8a e6 68 inc $68 INC INSTR_ADDR+1 -.386b8c LD_INST_1 -.386b8c 20 d2 6b jsr $386bd2 JSR LOAD_AM_VIB_MULT -.386b8f e6 67 inc $67 INC INSTR_ADDR -.386b91 d0 02 bne $386b95 BNE LD_INST_2 -.386b93 e6 68 inc $68 INC INSTR_ADDR+1 -.386b95 LD_INST_2 -.386b95 20 42 6c jsr $386c42 JSR LOAD_KEY_OP_LVL -.386b98 e6 67 inc $67 INC INSTR_ADDR -.386b9a d0 02 bne $386b9e BNE LD_INST_3 -.386b9c e6 68 inc $68 INC INSTR_ADDR+1 -.386b9e LD_INST_3 -.386b9e 20 7c 6c jsr $386c7c JSR LOAD_ATT_DEC_RATE -.386ba1 e6 67 inc $67 INC INSTR_ADDR -.386ba3 d0 02 bne $386ba7 BNE LD_INST_4 -.386ba5 e6 68 inc $68 INC INSTR_ADDR+1 -.386ba7 LD_INST_4 -.386ba7 20 b8 6c jsr $386cb8 JSR LOAD_SUSTAIN_RELEASE_RATE -.386baa e6 67 inc $67 INC INSTR_ADDR -.386bac d0 02 bne $386bb0 BNE LD_INST_5 -.386bae e6 68 inc $68 INC INSTR_ADDR+1 -.386bb0 LD_INST_5 -.386bb0 da phx PHX -.386bb1 a6 27 ldx $27 LDX OPL2_CHANNEL -.386bb3 20 f4 6c jsr $386cf4 JSR LOAD_FEEDBACK_ALGO -.386bb6 fa plx PLX -.386bb7 e6 67 inc $67 INC INSTR_ADDR -.386bb9 d0 02 bne $386bbd BNE LD_INST_6 -.386bbb e6 68 inc $68 INC INSTR_ADDR+1 -.386bbd LD_INST_6 -.386bbd 20 10 6d jsr $386d10 JSR LOAD_WAVE -.386bc0 c2 20 rep #$20 REP #$20 ; set A long -.386bc2 a5 67 lda $67 LDA INSTR_ADDR -.386bc4 69 06 00 adc #$0006 ADC #6 -.386bc7 85 67 sta $67 STA INSTR_ADDR -.386bc9 e2 20 sep #$20 SEP #$20 ; set A short -.386bcb a0 98 02 ldy #$0298 LDY #5 * 128 + 24 -.386bce 20 3d 5e jsr $385e3d JSR WRITE_INSTRUMENT_NAME -.386bd1 DRUM_SET -.386bd1 60 rts RTS -.386bd2 LOAD_AM_VIB_MULT -.386bd2 a7 67 lda [$67] LDA [INSTR_ADDR] -.386bd4 48 pha PHA -.386bd5 48 pha PHA -.386bd6 48 pha PHA -.386bd7 48 pha PHA -.386bd8 9f 20 e7 af sta $afe720,x STA @lOPL3_R_AM_VID_EG_KSR_MULT,X -.386bdc 29 80 and #$80 AND #TREMOLO -.386bde a0 8d 03 ldy #$038d LDY #7 * 128 + 13 -.386be1 20 ee 5d jsr $385dee JSR WRITE_OFF_ON -.386be4 68 pla PLA -.386be5 29 40 and #$40 AND #VIBRATO -.386be7 a0 0d 04 ldy #$040d LDY #8 * 128 + 13 -.386bea 20 ee 5d jsr $385dee JSR WRITE_OFF_ON -.386bed 68 pla PLA -.386bee 29 20 and #$20 AND #SUSTAINING -.386bf0 a0 8d 04 ldy #$048d LDY #9 * 128 + 13 -.386bf3 20 ee 5d jsr $385dee JSR WRITE_OFF_ON -.386bf6 68 pla PLA -.386bf7 29 10 and #$10 AND #KSR -.386bf9 a0 0d 05 ldy #$050d LDY #10 * 128 + 13 -.386bfc 20 ee 5d jsr $385dee JSR WRITE_OFF_ON -.386bff 68 pla PLA -.386c00 29 0f and #$0f AND #MULTIPLIER -.386c02 a0 8e 05 ldy #$058e LDY #11 * 128 + 14 -.386c05 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386c08 a0 06 00 ldy #$0006 LDY #6 -.386c0b b7 67 lda [$67],y LDA [INSTR_ADDR], Y -.386c0d 48 pha PHA -.386c0e 48 pha PHA -.386c0f 48 pha PHA -.386c10 48 pha PHA -.386c11 9f 23 e7 af sta $afe723,x STA @lOPL3_R_AM_VID_EG_KSR_MULT + 3,X -.386c15 29 80 and #$80 AND #TREMOLO -.386c17 a0 a7 03 ldy #$03a7 LDY #7 * 128 + 39 -.386c1a 20 ee 5d jsr $385dee JSR WRITE_OFF_ON -.386c1d 68 pla PLA -.386c1e 29 40 and #$40 AND #VIBRATO -.386c20 a0 27 04 ldy #$0427 LDY #8 * 128 + 39 -.386c23 20 ee 5d jsr $385dee JSR WRITE_OFF_ON -.386c26 68 pla PLA -.386c27 29 20 and #$20 AND #SUSTAINING -.386c29 a0 a7 04 ldy #$04a7 LDY #9 * 128 + 39 -.386c2c 20 ee 5d jsr $385dee JSR WRITE_OFF_ON -.386c2f 68 pla PLA -.386c30 29 10 and #$10 AND #KSR -.386c32 a0 27 05 ldy #$0527 LDY #10 * 128 + 39 -.386c35 20 ee 5d jsr $385dee JSR WRITE_OFF_ON -.386c38 68 pla PLA -.386c39 29 0f and #$0f AND #MULTIPLIER -.386c3b a0 a8 05 ldy #$05a8 LDY #11 * 128 + 40 -.386c3e 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386c41 60 rts RTS -.386c42 LOAD_KEY_OP_LVL -.386c42 a7 67 lda [$67] LDA [INSTR_ADDR] -.386c44 48 pha PHA -.386c45 9f 40 e7 af sta $afe740,x STA @lOPL3_R_KSL_TL,X -.386c49 29 c0 and #$c0 AND #KEY_SCALE -.386c4b 2a rol a ROL A -.386c4c 2a rol a ROL A -.386c4d 2a rol a ROL A -.386c4e a0 0e 06 ldy #$060e LDY #12 * 128 + 14 -.386c51 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386c54 68 pla PLA -.386c55 29 3f and #$3f AND #OP_LEVEL -.386c57 a0 8e 06 ldy #$068e LDY #13 * 128 + 14 -.386c5a 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386c5d a0 06 00 ldy #$0006 LDY #6 -.386c60 b7 67 lda [$67],y LDA [INSTR_ADDR],Y -.386c62 48 pha PHA -.386c63 9f 43 e7 af sta $afe743,x STA @lOPL3_R_KSL_TL + 3,X -.386c67 29 c0 and #$c0 AND #KEY_SCALE -.386c69 2a rol a ROL A -.386c6a 2a rol a ROL A -.386c6b 2a rol a ROL A -.386c6c a0 28 06 ldy #$0628 LDY #12 * 128 + 40 -.386c6f 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386c72 68 pla PLA -.386c73 29 3f and #$3f AND #OP_LEVEL -.386c75 a0 a8 06 ldy #$06a8 LDY #13 * 128 + 40 -.386c78 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386c7b 60 rts RTS -.386c7c LOAD_ATT_DEC_RATE -.386c7c a7 67 lda [$67] LDA [INSTR_ADDR] -.386c7e 48 pha PHA -.386c7f 9f 60 e7 af sta $afe760,x STA @lOPL3_R_AR_DR,X -.386c83 29 f0 and #$f0 AND #ATTACK_RT -.386c85 4a lsr a LSR A -.386c86 4a lsr a LSR A -.386c87 4a lsr a LSR A -.386c88 4a lsr a LSR A -.386c89 a0 0e 07 ldy #$070e LDY #14 * 128 + 14 -.386c8c 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386c8f 68 pla PLA -.386c90 29 0f and #$0f AND #DECAY_RT -.386c92 a0 8e 07 ldy #$078e LDY #15 * 128 + 14 -.386c95 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386c98 a0 06 00 ldy #$0006 LDY #6 -.386c9b b7 67 lda [$67],y LDA [INSTR_ADDR],Y -.386c9d 48 pha PHA -.386c9e 9f 63 e7 af sta $afe763,x STA @lOPL3_R_AR_DR + 3,X -.386ca2 29 f0 and #$f0 AND #ATTACK_RT -.386ca4 4a lsr a LSR A -.386ca5 4a lsr a LSR A -.386ca6 4a lsr a LSR A -.386ca7 4a lsr a LSR A -.386ca8 a0 28 07 ldy #$0728 LDY #14 * 128 + 40 -.386cab 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386cae 68 pla PLA -.386caf 29 0f and #$0f AND #DECAY_RT -.386cb1 a0 a8 07 ldy #$07a8 LDY #15 * 128 + 40 -.386cb4 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386cb7 60 rts RTS -.386cb8 LOAD_SUSTAIN_RELEASE_RATE -.386cb8 a7 67 lda [$67] LDA [INSTR_ADDR] -.386cba 48 pha PHA -.386cbb 9f 80 e7 af sta $afe780,x STA @lOPL3_R_SL_RR,X -.386cbf 29 f0 and #$f0 AND #ATTACK_RT -.386cc1 4a lsr a LSR A -.386cc2 4a lsr a LSR A -.386cc3 4a lsr a LSR A -.386cc4 4a lsr a LSR A -.386cc5 a0 0e 08 ldy #$080e LDY #16 * 128 + 14 -.386cc8 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386ccb 68 pla PLA -.386ccc 29 0f and #$0f AND #DECAY_RT -.386cce a0 8e 08 ldy #$088e LDY #17 * 128 + 14 -.386cd1 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386cd4 a0 06 00 ldy #$0006 LDY #6 -.386cd7 b7 67 lda [$67],y LDA [INSTR_ADDR],Y -.386cd9 48 pha PHA -.386cda 9f 83 e7 af sta $afe783,x STA @lOPL3_R_SL_RR + 3,X -.386cde 29 f0 and #$f0 AND #ATTACK_RT -.386ce0 4a lsr a LSR A -.386ce1 4a lsr a LSR A -.386ce2 4a lsr a LSR A -.386ce3 4a lsr a LSR A -.386ce4 a0 28 08 ldy #$0828 LDY #16 * 128 + 40 -.386ce7 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386cea 68 pla PLA -.386ceb 29 0f and #$0f AND #DECAY_RT -.386ced a0 a8 08 ldy #$08a8 LDY #17 * 128 + 40 -.386cf0 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386cf3 60 rts RTS -.386cf4 LOAD_FEEDBACK_ALGO -.386cf4 a7 67 lda [$67] LDA [INSTR_ADDR] -.386cf6 48 pha PHA -.386cf7 09 f0 ora #$f0 ORA #$F0 ; Channel B -.386cf9 9f c0 e7 af sta $afe7c0,x STA @lOPL3_R_FEEDBACK,X -.386cfd 29 0e and #$0e AND #FEEDBACK -.386cff 4a lsr a LSR A -.386d00 a0 28 0a ldy #$0a28 LDY #20 * 128 + 40 -.386d03 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386d06 68 pla PLA -.386d07 29 01 and #$01 AND #ALGORITHM -.386d09 a0 a8 0a ldy #$0aa8 LDY #21 * 128 + 40 -.386d0c 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386d0f 60 rts RTS -.386d10 LOAD_WAVE -.386d10 a7 67 lda [$67] LDA [INSTR_ADDR] -.386d12 9f e0 e7 af sta $afe7e0,x STA @lOPL3_R_WAVE_SELECT,X -.386d16 29 07 and #$07 AND #$7 -.386d18 a0 0e 09 ldy #$090e LDY #18 * 128 + 14 -.386d1b 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386d1e a0 05 00 ldy #$0005 LDY #5 -.386d21 b7 67 lda [$67],y LDA [INSTR_ADDR],Y -.386d23 9f e3 e7 af sta $afe7e3,x STA @lOPL3_R_WAVE_SELECT+3,X -.386d27 29 07 and #$07 AND #$7 -.386d29 a0 28 09 ldy #$0928 LDY #18 * 128 + 40 -.386d2c 20 b1 5d jsr $385db1 JSR WRITE_HEX -.386d2f 60 rts RTS -.386d30 INIT_KEYBOARD -.386d30 0b phd PHD -.386d31 48 pha PHA -.386d32 da phx PHX -.386d33 08 php PHP -.386d34 18 clc CLC -.386d35 e2 20 sep #$20 SEP #$20 ; set A short -.386d37 a9 00 lda #$00 LDA #$00 -.386d39 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG ; Clear the Keyboard Flag -.386d3c 20 de 6d jsr $386dde JSR Poll_Inbuf -.386d3f a9 aa lda #$aa LDA #$AA ;Send self test command -.386d41 8f 64 10 af sta $af1064 STA KBD_CMD_BUF -.386d45 20 e9 6d jsr $386de9 JSR Poll_Outbuf ; -.386d48 af 60 10 af lda $af1060 LDA KBD_OUT_BUF ;Check self test result -.386d4c c9 55 cmp #$55 CMP #$55 -.386d4e f0 03 beq $386d53 BEQ passAAtest -.386d50 82 6f 00 brl $386dc2 BRL initkb_loop_out -.386d53 passAAtest -.386d53 a9 ab lda #$ab LDA #$AB ;Send test Interface command -.386d55 8f 64 10 af sta $af1064 STA KBD_CMD_BUF -.386d59 20 e9 6d jsr $386de9 JSR Poll_Outbuf ; -.386d5c af 60 10 af lda $af1060 LDA KBD_OUT_BUF ;Display Interface test results -.386d60 c9 00 cmp #$00 CMP #$00 ;Should be 00 -.386d62 f0 03 beq $386d67 BEQ passABtest -.386d64 82 5b 00 brl $386dc2 BRL initkb_loop_out -.386d67 passABtest -.386d67 a9 60 lda #$60 LDA #$60 ; Send Command 0x60 so to Enable Interrupt -.386d69 8f 64 10 af sta $af1064 STA KBD_CMD_BUF -.386d6d 20 de 6d jsr $386dde JSR Poll_Inbuf ; -.386d70 a9 69 lda #$69 LDA #%01101001 ; Enable Interrupt -.386d72 8f 60 10 af sta $af1060 STA KBD_DATA_BUF -.386d76 20 de 6d jsr $386dde JSR Poll_Inbuf ; -.386d79 a9 ff lda #$ff LDA #$FF ; Send Keyboard Reset command -.386d7b 8f 60 10 af sta $af1060 STA KBD_DATA_BUF -.386d7f a2 ff ff ldx #$ffff LDX #$FFFF -.386d82 ca dex DLY_LOOP1 DEX -.386d83 ea nop NOP -.386d84 ea nop NOP -.386d85 ea nop NOP -.386d86 ea nop NOP -.386d87 ea nop NOP -.386d88 ea nop NOP -.386d89 ea nop NOP -.386d8a ea nop NOP -.386d8b e0 00 00 cpx #$0000 CPX #$0000 -.386d8e d0 f2 bne $386d82 BNE DLY_LOOP1 -.386d90 20 e9 6d jsr $386de9 JSR Poll_Outbuf ; -.386d93 af 60 10 af lda $af1060 LDA KBD_OUT_BUF ; Read Output Buffer -.386d97 DO_CMD_F4_AGAIN -.386d97 20 de 6d jsr $386dde JSR Poll_Inbuf ; -.386d9a a9 f4 lda #$f4 LDA #$F4 ; Enable the Keyboard -.386d9c 8f 60 10 af sta $af1060 STA KBD_DATA_BUF -.386da0 20 e9 6d jsr $386de9 JSR Poll_Outbuf ; -.386da3 af 60 10 af lda $af1060 LDA KBD_OUT_BUF ; Clear the Output buffer -.386da7 c9 fa cmp #$fa CMP #$FA -.386da9 d0 ec bne $386d97 BNE DO_CMD_F4_AGAIN -.386dab 20 f4 6d jsr $386df4 JSR INIT_MOUSE -.386dae af 40 01 00 lda $000140 LDA @lINT_PENDING_REG0 ; Read the Pending Register & -.386db2 29 80 and #$80 AND #FNX0_INT07_MOUSE -.386db4 8f 40 01 00 sta $000140 STA @lINT_PENDING_REG0 ; Writing it back will clear the Active Bit -.386db8 af 41 01 00 lda $000141 LDA @lINT_PENDING_REG1 ; Read the Pending Register & -.386dbc 29 01 and #$01 AND #FNX1_INT00_KBD -.386dbe 8f 41 01 00 sta $000141 STA @lINT_PENDING_REG1 ; Writing it back will clear the Active Bit -.386dc2 initkb_loop_out -.386dc2 InitSuccess -.386dc2 28 plp PLP -.386dc3 fa plx PLX -.386dc4 68 pla PLA -.386dc5 2b pld PLD -.386dc6 60 rts RTS -.386dc7 INIT_MOUSEPOINTER -.386dc7 c2 30 rep #$30 REP #$30 ; set A&X long -.386dc9 a2 80 53 ldx #$5380 LDX #<>MOUSE_POINTER_PTR -.386dcc a9 00 01 lda #$0100 LDA #$100 -.386dcf a0 00 05 ldy #$0500 LDY #$0500 -.386dd2 54 af 38 mvn $38,$af MVN #`MOUSE_POINTER_PTR,#$AF -.386dd5 e2 20 sep #$20 SEP #$20 ; set A short -.386dd7 a9 01 lda #$01 LDA #$01 -.386dd9 8f 00 07 af sta $af0700 STA @lMOUSE_PTR_CTRL_REG_L ; Enable Mouse, Mouse Pointer Graphic Bank 0 -.386ddd 60 rts RTS -.386dde Poll_Inbuf -.386dde af 64 10 af lda $af1064 LDA STATUS_PORT ; Load Status Byte -.386de2 29 02 and #$02 AND #386eb6 01 01 01 01 01 01 01 01 CHANNELS .byte 1,1,1,1,1,1,1,1,1 ->386ebe 01 -.386ebf TOGGLE_CHANNEL -.386ebf aa tax TAX -.386ec0 ca dex DEX -.386ec1 bf b6 6e 38 lda $386eb6,x LDA CHANNELS,X -.386ec5 49 01 eor #$01 EOR #1 -.386ec7 9f b6 6e 38 sta $386eb6,x STA CHANNELS,X -.386ecb 60 rts RTS ->386ecc 80 80 80 31 33 80 36 38 SCAN_TO_NOTE .text $80, $80, $80, $31, $33, $80, $36, $38, $3A, $80, $41, $80, $80, $80, $80, $80 ->386ed4 3a 80 41 80 80 80 80 80 ->386edc 2c 32 34 35 37 39 3b 3c .text $2C, $32, $34, $35, $37, $39, $3B, $3C, $42, $80, $80, $80, $80, $80, $80, $21 ->386ee4 42 80 80 80 80 80 80 21 ->386eec 23 80 26 28 2a 80 80 80 .text $23, $80, $26, $28, $2A, $80, $80, $80, $80, $80, $80, $80, $1C, $22, $24, $25 ->386ef4 80 80 80 80 1c 22 24 25 ->386efc 27 29 2b 80 80 80 80 80 .text $27, $29, $2B, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80 ->386f04 80 80 80 80 80 80 80 80 ->386f0c 80 80 80 80 80 80 80 80 .text $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80 ->386f14 80 80 80 80 80 80 80 80 ->386f1c 80 80 80 80 80 80 80 80 .text $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80 ->386f24 80 80 80 80 80 80 80 80 -.386f2c MIDI_COMMAND_TABLE ->386f2c 02 5c 02 5c .word <>NOTE_OFF, <>NOTE_ON ->386f30 82 5c 82 5c .word <>POLY_PRESSURE, <>CONTROL_CHANGE ->386f34 ab 5c ab 5c .word <>PROGRAM_CHANGE, <>CHANNEL_PRESSURE ; these two command expect 1 datat byte only - no running status ->386f38 82 5c c2 5c .word <>PITCH_BEND, <>SYSTEM_COMMAND ->386f3c da 5c .word <>INVALID_COMMAND +.3863d3 TRACKER +.3863d3 a9 ff lda #$ff LDA #$FF +.3863d5 8f 48 01 00 sta $000148 STA @lINT_EDGE_REG0 +.3863d9 8f 49 01 00 sta $000149 STA @lINT_EDGE_REG1 +.3863dd 8f 4a 01 00 sta $00014a STA @lINT_EDGE_REG2 +.3863e1 a9 ff lda #$ff LDA #$FF +.3863e3 8f 4c 01 00 sta $00014c STA @lINT_MASK_REG0 +.3863e7 8f 4d 01 00 sta $00014d STA @lINT_MASK_REG1 +.3863eb 8f 4e 01 00 sta $00014e STA @lINT_MASK_REG2 +.3863ef 20 db 56 jsr $3856db JSR DRAW_DISPLAY +.3863f2 20 2c 67 jsr $38672c JSR INIT_KEYBOARD +.3863f5 20 c3 67 jsr $3867c3 JSR INIT_MOUSEPOINTER +.3863f8 20 37 64 jsr $386437 JSR INIT_CURSOR +.3863fb 20 79 64 jsr $386479 JSR RESET_STATE_MACHINE +.3863fe a9 38 lda #$38 LDA #`INSTRUMENT_ACCORDN +.386400 85 69 sta $69 STA INSTR_ADDR+2 +.386402 a9 42 lda #$42 LDA #$42 +.386404 8f 6a 00 00 sta $00006a STA @lINSTR_NUMBER +.386408 a2 00 00 ldx #$0000 LDX #0 ; setup channels +.38640b NEXT_INSTR +.38640b a9 00 lda #$00 LDA #0 +.38640d eb xba XBA +.38640e da phx PHX +.38640f bf 18 10 38 lda $381018,x LDA registerOffsets_operator0,X +.386413 aa tax TAX +.386414 20 4e 65 jsr $38654e JSR LOAD_INSTRUMENT +.386417 fa plx PLX +.386418 e8 inx INX +.386419 e0 09 00 cpx #$0009 CPX #9 +.38641c d0 ed bne $38640b BNE NEXT_INSTR +.38641e 22 79 30 38 jsl $383079 JSL IOPL2_TONE_TEST +.386422 20 58 64 jsr $386458 JSR ENABLE_IRQS +.386425 22 b1 30 38 jsl $3830b1 JSL OPL2_INIT +.386429 58 cli CLI +.38642a 20 ae 55 jsr $3855ae JSR INIT_MIDI +.38642d 20 2b 5b jsr $385b2b JSR DISPLAY_ORDERS +.386430 20 61 58 jsr $385861 JSR DISPLAY_PATTERN +.386433 ea nop ALWAYS NOP +.386434 ea nop NOP +.386435 80 fc bra $386433 BRA ALWAYS +.386437 48 pha INIT_CURSOR PHA +.386438 a9 e9 lda #$e9 LDA #$E9 ;The Cursor Character will be a Fully Filled Block +.38643a 8f 12 00 af sta $af0012 STA VKY_TXT_CURSOR_CHAR_REG +.38643e a9 00 lda #$00 LDA #$0 ;Set Cursor Disabled +.386440 8f 10 00 af sta $af0010 STA VKY_TXT_CURSOR_CTRL_REG ; +.386444 c2 30 rep #$30 REP #$30 ; set A&X long +.386446 a9 00 00 lda #$0000 LDA #$0000; +.386449 8f 14 00 af sta $af0014 STA VKY_TXT_CURSOR_X_REG_L; // Set the X to Position 1 +.38644d a9 00 00 lda #$0000 LDA #$0000; +.386450 8f 16 00 af sta $af0016 STA VKY_TXT_CURSOR_Y_REG_L; // Set the Y to Position 1 (Below) +.386454 e2 20 sep #$20 SEP #$20 ; set A short +.386456 68 pla PLA +.386457 60 rts RTS +.386458 ENABLE_IRQS +.386458 af 40 01 00 lda $000140 LDA @lINT_PENDING_REG0 +.38645c 29 84 and #$84 AND #FNX0_INT07_MOUSE | FNX0_INT02_TMR0 ;AND #FNX0_INT00_SOF +.38645e 8f 40 01 00 sta $000140 STA @lINT_PENDING_REG0 ; Writing it back will clear the Active Bit +.386462 af 41 01 00 lda $000141 LDA @lINT_PENDING_REG1 +.386466 29 a1 and #$a1 AND #FNX1_INT00_KBD | FNX1_INT05_MPU401 | FNX1_INT07_SDCARD +.386468 8f 41 01 00 sta $000141 STA @lINT_PENDING_REG1 ; Writing it back will clear the Active Bit +.38646c a9 7b lda #$7b LDA #~(FNX0_INT07_MOUSE | FNX0_INT02_TMR0) ;LDA #~(FNX0_INT00_SOF | FNX0_INT00_SOF ) +.38646e 8f 4c 01 00 sta $00014c STA @lINT_MASK_REG0 +.386472 a9 5e lda #$5e LDA #~(FNX1_INT00_KBD | FNX1_INT05_MPU401 | FNX1_INT07_SDCARD) +.386474 8f 4d 01 00 sta $00014d STA @lINT_MASK_REG1 +.386478 60 rts RTS +.386479 RESET_STATE_MACHINE +.386479 a9 00 lda #$00 LDA #0 +.38647b 8f 15 0f 38 sta $380f15 STA STATE_MACHINE +.38647f 85 48 sta $48 STA RAD_ORDER_NUM +.386481 64 6c stz $6c STZ LINE_NUM_HEX +.386483 64 49 stz $49 STZ RAD_ORDER_NUM + 1 +.386485 a9 01 lda #$01 LDA #1 +.386487 8f 19 0f 38 sta $380f19 STA LINE_NUM_DEC +.38648b a6 48 ldx $48 LDX RAD_ORDER_NUM +.38648d bf 24 fc 39 lda $39fc24,x LDA @lORDERS,X ; load the first pattern in the order list +.386491 1a inc a INC A +.386492 PATTN_OK +.386492 8f 18 0f 38 sta $380f18 STA PATTERN_NUM +.386496 20 af 5a jsr $385aaf JSR DISPLAY_SPEED +.386499 60 rts RTS +.38649a INCREMENT_ORDER +.38649a 48 pha PHA +.38649b a9 00 lda #$00 LDA #0 +.38649d eb xba XBA +.38649e af 48 00 00 lda $000048 LDA @lRAD_ORDER_NUM +.3864a2 1a inc a INC A +.3864a3 cf 68 6a 38 cmp $386a68 CMP @lTuneInfo.songLength +.3864a7 d0 02 bne $3864ab BNE LOAD_ORDER +.3864a9 a9 00 lda #$00 LDA #0 +.3864ab LOAD_ORDER +.3864ab 8f 48 00 00 sta $000048 STA @lRAD_ORDER_NUM +.3864af aa tax TAX +.3864b0 a0 90 01 ldy #$0190 LDY #SCREEN_WIDTH * 5 +.3864b3 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3864b6 bf 24 fc 39 lda $39fc24,x LDA @lORDERS,X ; load the pattern from the order list +.3864ba 1a inc a INC A +.3864bb 8f 18 0f 38 sta $380f18 STA PATTERN_NUM +.3864bf 68 pla PLA +.3864c0 60 rts RTS +.3864c1 INIT_TIMER0_BPM +.3864c1 8b phb PHB +.3864c2 a9 00 lda #$00 LDA #0 +.3864c4 48 pha PHA +.3864c5 ab plb PLB ; set databank to 0 +.3864c6 a9 03 lda #$03 LDA #3 ; each timer counter is 24 bits - 3 bytes +.3864c8 8d 00 01 sta $0100 STA UNSIGNED_MULT_A +.3864cb 9c 01 01 stz $0101 STZ UNSIGNED_MULT_A + 1 +.3864ce 9c 03 01 stz $0103 STZ UNSIGNED_MULT_B + 1 +.3864d1 38 sec SEC +.3864d2 af 17 0f 38 lda $380f17 LDA BPM ; multiply by the BPM, the 4 offset is the lowest BPM +.3864d6 e9 04 sbc #$04 SBC #4 +.3864d8 8d 02 01 sta $0102 STA UNSIGNED_MULT_B +.3864db c2 20 rep #$20 REP #$20 ; set A long +.3864dd ad 04 01 lda $0104 LDA UNSIGNED_MULT_RESULT +.3864e0 aa tax TAX +.3864e1 e2 20 sep #$20 SEP #$20 ; set A short +.3864e3 a9 00 lda #$00 LDA #0 ; set timer0 charge to 0 +.3864e5 8d 61 01 sta $0161 STA TIMER0_CHARGE_L +.3864e8 8d 62 01 sta $0162 STA TIMER0_CHARGE_M +.3864eb 8d 63 01 sta $0163 STA TIMER0_CHARGE_H +.3864ee bf 00 00 3a lda $3a0000,x LDA @lSPM_004,X +.3864f2 8d 65 01 sta $0165 STA TIMER0_CMP_L +.3864f5 bf 01 00 3a lda $3a0001,x LDA @lSPM_004+1,X +.3864f9 8d 66 01 sta $0166 STA TIMER0_CMP_M +.3864fc bf 02 00 3a lda $3a0002,x LDA @lSPM_004+2,X +.386500 8d 67 01 sta $0167 STA TIMER0_CMP_H +.386503 a9 01 lda #$01 LDA #TMR0_CMP_RECLR ; count up from "CHARGE" value to TIMER_CMP +.386505 8d 64 01 sta $0164 STA TIMER0_CMP_REG +.386508 a9 0b lda #$0b LDA #(TMR0_EN | TMR0_UPDWN | TMR0_SCLR) +.38650a 8d 60 01 sta $0160 STA TIMER0_CTRL_REG +.38650d ab plb PLB +.38650e 60 rts RTS +.38650f INIT_TIMER0 +.38650f 8b phb PHB +.386510 a9 00 lda #$00 LDA #0 +.386512 48 pha PHA +.386513 ab plb PLB ; set databank to 0 +.386514 e2 20 sep #$20 SEP #$20 ; set A short +.386516 a9 00 lda #$00 LDA #0 ; set timer0 charge to 0 +.386518 8d 61 01 sta $0161 STA TIMER0_CHARGE_L +.38651b 8d 62 01 sta $0162 STA TIMER0_CHARGE_M +.38651e 8d 63 01 sta $0163 STA TIMER0_CHARGE_H +.386521 a9 01 lda #$01 LDA #TMR0_CMP_RECLR ; count up from "CHARGE" value to TIMER_CMP +.386523 8d 64 01 sta $0164 STA TIMER0_CMP_REG +.386526 a9 0b lda #$0b LDA #(TMR0_EN | TMR0_UPDWN | TMR0_SCLR) +.386528 8d 60 01 sta $0160 STA TIMER0_CTRL_REG +.38652b ab plb PLB +.38652c 60 rts RTS +.38652d INIT_OPL2_TMRS +.38652d a9 80 lda #$80 LDA #$80 ; Reset OPL2 Interrupts +.38652f 8f 04 e6 af sta $afe604 STA OPL3_L_IRQ ; byte 4 of OPL2 +.386533 20 47 65 jsr $386547 JSR WAIT_80 +.386536 a9 10 lda #$10 LDA #$10 +.386538 8f 02 e6 af sta $afe602 STA OPL3_L_TIMER1 ; byte 2 of OPL2 +.38653c 8f 03 e6 af sta $afe603 STA OPL3_L_TIMER2 ; byte 2 of OPL2 +.386540 a9 03 lda #$03 LDA #$3 ; enable timers 1 and 2 +.386542 8f 04 e6 af sta $afe604 STA OPL3_L_IRQ ; byte 4 of OPL2 +.386546 60 rts RTS +.386547 WAIT_80 +.386547 a2 30 02 ldx #$0230 LDX #560 +.38654a WAIT_LP +.38654a ca dex DEX +.38654b d0 fd bne $38654a BNE WAIT_LP +.38654d 60 rts RTS +.38654e LOAD_INSTRUMENT +.38654e af 6a 00 00 lda $00006a LDA @lINSTR_NUMBER +.386552 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A +.386556 a9 00 lda #$00 LDA #0 +.386558 8f 01 01 00 sta $000101 STA @lUNSIGNED_MULT_A + 1 +.38655c 8f 03 01 00 sta $000103 STA @lUNSIGNED_MULT_B + 1 +.386560 a9 16 lda #$16 LDA #INSTR_REC_LEN +.386562 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B +.386566 c2 20 rep #$20 REP #$20 ; set A long +.386568 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT +.38656c 18 clc CLC +.38656d 69 3b 10 adc #$103b ADC #<>INSTRUMENT_ACCORDN +.386570 85 67 sta $67 STA INSTR_ADDR +.386572 e2 20 sep #$20 SEP #$20 ; set A short +.386574 af 6a 00 00 lda $00006a LDA @lINSTR_NUMBER +.386578 a0 a3 01 ldy #$01a3 LDY #5 * SCREEN_WIDTH + 19 +.38657b 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38657e a7 67 lda [$67] LDA [INSTR_ADDR] +.386580 d0 4b bne $3865cd BNE DRUM_SET +.386582 e6 67 inc $67 INC INSTR_ADDR +.386584 d0 02 bne $386588 BNE LD_INST_1 +.386586 e6 68 inc $68 INC INSTR_ADDR+1 +.386588 LD_INST_1 +.386588 20 ce 65 jsr $3865ce JSR LOAD_AM_VIB_MULT +.38658b e6 67 inc $67 INC INSTR_ADDR +.38658d d0 02 bne $386591 BNE LD_INST_2 +.38658f e6 68 inc $68 INC INSTR_ADDR+1 +.386591 LD_INST_2 +.386591 20 3e 66 jsr $38663e JSR LOAD_KEY_OP_LVL +.386594 e6 67 inc $67 INC INSTR_ADDR +.386596 d0 02 bne $38659a BNE LD_INST_3 +.386598 e6 68 inc $68 INC INSTR_ADDR+1 +.38659a LD_INST_3 +.38659a 20 78 66 jsr $386678 JSR LOAD_ATT_DEC_RATE +.38659d e6 67 inc $67 INC INSTR_ADDR +.38659f d0 02 bne $3865a3 BNE LD_INST_4 +.3865a1 e6 68 inc $68 INC INSTR_ADDR+1 +.3865a3 LD_INST_4 +.3865a3 20 b4 66 jsr $3866b4 JSR LOAD_SUSTAIN_RELEASE_RATE +.3865a6 e6 67 inc $67 INC INSTR_ADDR +.3865a8 d0 02 bne $3865ac BNE LD_INST_5 +.3865aa e6 68 inc $68 INC INSTR_ADDR+1 +.3865ac LD_INST_5 +.3865ac da phx PHX +.3865ad a6 27 ldx $27 LDX OPL2_CHANNEL +.3865af 20 f0 66 jsr $3866f0 JSR LOAD_FEEDBACK_ALGO +.3865b2 fa plx PLX +.3865b3 e6 67 inc $67 INC INSTR_ADDR +.3865b5 d0 02 bne $3865b9 BNE LD_INST_6 +.3865b7 e6 68 inc $68 INC INSTR_ADDR+1 +.3865b9 LD_INST_6 +.3865b9 20 0c 67 jsr $38670c JSR LOAD_WAVE +.3865bc c2 20 rep #$20 REP #$20 ; set A long +.3865be a5 67 lda $67 LDA INSTR_ADDR +.3865c0 69 06 00 adc #$0006 ADC #6 +.3865c3 85 67 sta $67 STA INSTR_ADDR +.3865c5 e2 20 sep #$20 SEP #$20 ; set A short +.3865c7 a0 a8 01 ldy #$01a8 LDY #5 * SCREEN_WIDTH + 24 +.3865ca 20 3d 58 jsr $38583d JSR WRITE_INSTRUMENT_NAME +.3865cd DRUM_SET +.3865cd 60 rts RTS +.3865ce LOAD_AM_VIB_MULT +.3865ce a7 67 lda [$67] LDA [INSTR_ADDR] +.3865d0 48 pha PHA +.3865d1 48 pha PHA +.3865d2 48 pha PHA +.3865d3 48 pha PHA +.3865d4 9f 20 e7 af sta $afe720,x STA @lOPL3_R_AM_VID_EG_KSR_MULT,X +.3865d8 29 80 and #$80 AND #TREMOLO +.3865da a0 3d 02 ldy #$023d LDY #7 * SCREEN_WIDTH + 13 +.3865dd 20 ee 57 jsr $3857ee JSR WRITE_OFF_ON +.3865e0 68 pla PLA +.3865e1 29 40 and #$40 AND #VIBRATO +.3865e3 a0 8d 02 ldy #$028d LDY #8 * SCREEN_WIDTH + 13 +.3865e6 20 ee 57 jsr $3857ee JSR WRITE_OFF_ON +.3865e9 68 pla PLA +.3865ea 29 20 and #$20 AND #SUSTAINING +.3865ec a0 dd 02 ldy #$02dd LDY #9 * SCREEN_WIDTH + 13 +.3865ef 20 ee 57 jsr $3857ee JSR WRITE_OFF_ON +.3865f2 68 pla PLA +.3865f3 29 10 and #$10 AND #KSR +.3865f5 a0 2d 03 ldy #$032d LDY #10 * SCREEN_WIDTH + 13 +.3865f8 20 ee 57 jsr $3857ee JSR WRITE_OFF_ON +.3865fb 68 pla PLA +.3865fc 29 0f and #$0f AND #MULTIPLIER +.3865fe a0 7e 03 ldy #$037e LDY #11 * SCREEN_WIDTH + 14 +.386601 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386604 a0 06 00 ldy #$0006 LDY #6 +.386607 b7 67 lda [$67],y LDA [INSTR_ADDR], Y +.386609 48 pha PHA +.38660a 48 pha PHA +.38660b 48 pha PHA +.38660c 48 pha PHA +.38660d 9f 23 e7 af sta $afe723,x STA @lOPL3_R_AM_VID_EG_KSR_MULT + 3,X +.386611 29 80 and #$80 AND #TREMOLO +.386613 a0 57 02 ldy #$0257 LDY #7 * SCREEN_WIDTH + 39 +.386616 20 ee 57 jsr $3857ee JSR WRITE_OFF_ON +.386619 68 pla PLA +.38661a 29 40 and #$40 AND #VIBRATO +.38661c a0 a7 02 ldy #$02a7 LDY #8 * SCREEN_WIDTH + 39 +.38661f 20 ee 57 jsr $3857ee JSR WRITE_OFF_ON +.386622 68 pla PLA +.386623 29 20 and #$20 AND #SUSTAINING +.386625 a0 f7 02 ldy #$02f7 LDY #9 * SCREEN_WIDTH + 39 +.386628 20 ee 57 jsr $3857ee JSR WRITE_OFF_ON +.38662b 68 pla PLA +.38662c 29 10 and #$10 AND #KSR +.38662e a0 47 03 ldy #$0347 LDY #10 * SCREEN_WIDTH + 39 +.386631 20 ee 57 jsr $3857ee JSR WRITE_OFF_ON +.386634 68 pla PLA +.386635 29 0f and #$0f AND #MULTIPLIER +.386637 a0 98 03 ldy #$0398 LDY #11 * SCREEN_WIDTH + 40 +.38663a 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38663d 60 rts RTS +.38663e LOAD_KEY_OP_LVL +.38663e a7 67 lda [$67] LDA [INSTR_ADDR] +.386640 48 pha PHA +.386641 9f 40 e7 af sta $afe740,x STA @lOPL3_R_KSL_TL,X +.386645 29 c0 and #$c0 AND #KEY_SCALE +.386647 2a rol a ROL A +.386648 2a rol a ROL A +.386649 2a rol a ROL A +.38664a a0 ce 03 ldy #$03ce LDY #12 * SCREEN_WIDTH + 14 +.38664d 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386650 68 pla PLA +.386651 29 3f and #$3f AND #OP_LEVEL +.386653 a0 1e 04 ldy #$041e LDY #13 * SCREEN_WIDTH + 14 +.386656 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386659 a0 06 00 ldy #$0006 LDY #6 +.38665c b7 67 lda [$67],y LDA [INSTR_ADDR],Y +.38665e 48 pha PHA +.38665f 9f 43 e7 af sta $afe743,x STA @lOPL3_R_KSL_TL + 3,X +.386663 29 c0 and #$c0 AND #KEY_SCALE +.386665 2a rol a ROL A +.386666 2a rol a ROL A +.386667 2a rol a ROL A +.386668 a0 e8 03 ldy #$03e8 LDY #12 * SCREEN_WIDTH + 40 +.38666b 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38666e 68 pla PLA +.38666f 29 3f and #$3f AND #OP_LEVEL +.386671 a0 38 04 ldy #$0438 LDY #13 * SCREEN_WIDTH + 40 +.386674 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386677 60 rts RTS +.386678 LOAD_ATT_DEC_RATE +.386678 a7 67 lda [$67] LDA [INSTR_ADDR] +.38667a 48 pha PHA +.38667b 9f 60 e7 af sta $afe760,x STA @lOPL3_R_AR_DR,X +.38667f 29 f0 and #$f0 AND #ATTACK_RT +.386681 4a lsr a LSR A +.386682 4a lsr a LSR A +.386683 4a lsr a LSR A +.386684 4a lsr a LSR A +.386685 a0 6e 04 ldy #$046e LDY #14 * SCREEN_WIDTH + 14 +.386688 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38668b 68 pla PLA +.38668c 29 0f and #$0f AND #DECAY_RT +.38668e a0 be 04 ldy #$04be LDY #15 * SCREEN_WIDTH + 14 +.386691 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386694 a0 06 00 ldy #$0006 LDY #6 +.386697 b7 67 lda [$67],y LDA [INSTR_ADDR],Y +.386699 48 pha PHA +.38669a 9f 63 e7 af sta $afe763,x STA @lOPL3_R_AR_DR + 3,X +.38669e 29 f0 and #$f0 AND #ATTACK_RT +.3866a0 4a lsr a LSR A +.3866a1 4a lsr a LSR A +.3866a2 4a lsr a LSR A +.3866a3 4a lsr a LSR A +.3866a4 a0 88 04 ldy #$0488 LDY #14 * SCREEN_WIDTH + 40 +.3866a7 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3866aa 68 pla PLA +.3866ab 29 0f and #$0f AND #DECAY_RT +.3866ad a0 d8 04 ldy #$04d8 LDY #15 * SCREEN_WIDTH + 40 +.3866b0 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3866b3 60 rts RTS +.3866b4 LOAD_SUSTAIN_RELEASE_RATE +.3866b4 a7 67 lda [$67] LDA [INSTR_ADDR] +.3866b6 48 pha PHA +.3866b7 9f 80 e7 af sta $afe780,x STA @lOPL3_R_SL_RR,X +.3866bb 29 f0 and #$f0 AND #ATTACK_RT +.3866bd 4a lsr a LSR A +.3866be 4a lsr a LSR A +.3866bf 4a lsr a LSR A +.3866c0 4a lsr a LSR A +.3866c1 a0 0e 05 ldy #$050e LDY #16 * SCREEN_WIDTH + 14 +.3866c4 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3866c7 68 pla PLA +.3866c8 29 0f and #$0f AND #DECAY_RT +.3866ca a0 5e 05 ldy #$055e LDY #17 * SCREEN_WIDTH + 14 +.3866cd 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3866d0 a0 06 00 ldy #$0006 LDY #6 +.3866d3 b7 67 lda [$67],y LDA [INSTR_ADDR],Y +.3866d5 48 pha PHA +.3866d6 9f 83 e7 af sta $afe783,x STA @lOPL3_R_SL_RR + 3,X +.3866da 29 f0 and #$f0 AND #ATTACK_RT +.3866dc 4a lsr a LSR A +.3866dd 4a lsr a LSR A +.3866de 4a lsr a LSR A +.3866df 4a lsr a LSR A +.3866e0 a0 28 05 ldy #$0528 LDY #16 * SCREEN_WIDTH + 40 +.3866e3 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3866e6 68 pla PLA +.3866e7 29 0f and #$0f AND #DECAY_RT +.3866e9 a0 78 05 ldy #$0578 LDY #17 * SCREEN_WIDTH + 40 +.3866ec 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.3866ef 60 rts RTS +.3866f0 LOAD_FEEDBACK_ALGO +.3866f0 a7 67 lda [$67] LDA [INSTR_ADDR] +.3866f2 48 pha PHA +.3866f3 09 f0 ora #$f0 ORA #$F0 ; Channel B +.3866f5 9f c0 e7 af sta $afe7c0,x STA @lOPL3_R_FEEDBACK,X +.3866f9 29 0e and #$0e AND #FEEDBACK +.3866fb 4a lsr a LSR A +.3866fc a0 68 06 ldy #$0668 LDY #20 * SCREEN_WIDTH + 40 +.3866ff 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386702 68 pla PLA +.386703 29 01 and #$01 AND #ALGORITHM +.386705 a0 b8 06 ldy #$06b8 LDY #21 * SCREEN_WIDTH + 40 +.386708 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38670b 60 rts RTS +.38670c LOAD_WAVE +.38670c a7 67 lda [$67] LDA [INSTR_ADDR] +.38670e 9f e0 e7 af sta $afe7e0,x STA @lOPL3_R_WAVE_SELECT,X +.386712 29 07 and #$07 AND #$7 +.386714 a0 ae 05 ldy #$05ae LDY #18 * SCREEN_WIDTH + 14 +.386717 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38671a a0 05 00 ldy #$0005 LDY #5 +.38671d b7 67 lda [$67],y LDA [INSTR_ADDR],Y +.38671f 9f e3 e7 af sta $afe7e3,x STA @lOPL3_R_WAVE_SELECT+3,X +.386723 29 07 and #$07 AND #$7 +.386725 a0 c8 05 ldy #$05c8 LDY #18 * SCREEN_WIDTH + 40 +.386728 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.38672b 60 rts RTS +.38672c INIT_KEYBOARD +.38672c 0b phd PHD +.38672d 48 pha PHA +.38672e da phx PHX +.38672f 08 php PHP +.386730 18 clc CLC +.386731 e2 20 sep #$20 SEP #$20 ; set A short +.386733 a9 00 lda #$00 LDA #$00 +.386735 8d 87 0f sta $0f87 STA KEYBOARD_SC_FLG ; Clear the Keyboard Flag +.386738 20 da 67 jsr $3867da JSR Poll_Inbuf +.38673b a9 aa lda #$aa LDA #$AA ;Send self test command +.38673d 8f 64 10 af sta $af1064 STA KBD_CMD_BUF +.386741 20 e5 67 jsr $3867e5 JSR Poll_Outbuf ; +.386744 af 60 10 af lda $af1060 LDA KBD_OUT_BUF ;Check self test result +.386748 c9 55 cmp #$55 CMP #$55 +.38674a f0 03 beq $38674f BEQ passAAtest +.38674c 82 6f 00 brl $3867be BRL initkb_loop_out +.38674f passAAtest +.38674f a9 ab lda #$ab LDA #$AB ;Send test Interface command +.386751 8f 64 10 af sta $af1064 STA KBD_CMD_BUF +.386755 20 e5 67 jsr $3867e5 JSR Poll_Outbuf ; +.386758 af 60 10 af lda $af1060 LDA KBD_OUT_BUF ;Display Interface test results +.38675c c9 00 cmp #$00 CMP #$00 ;Should be 00 +.38675e f0 03 beq $386763 BEQ passABtest +.386760 82 5b 00 brl $3867be BRL initkb_loop_out +.386763 passABtest +.386763 a9 60 lda #$60 LDA #$60 ; Send Command 0x60 so to Enable Interrupt +.386765 8f 64 10 af sta $af1064 STA KBD_CMD_BUF +.386769 20 da 67 jsr $3867da JSR Poll_Inbuf ; +.38676c a9 69 lda #$69 LDA #%01101001 ; Enable Interrupt +.38676e 8f 60 10 af sta $af1060 STA KBD_DATA_BUF +.386772 20 da 67 jsr $3867da JSR Poll_Inbuf ; +.386775 a9 ff lda #$ff LDA #$FF ; Send Keyboard Reset command +.386777 8f 60 10 af sta $af1060 STA KBD_DATA_BUF +.38677b a2 ff ff ldx #$ffff LDX #$FFFF +.38677e ca dex DLY_LOOP1 DEX +.38677f ea nop NOP +.386780 ea nop NOP +.386781 ea nop NOP +.386782 ea nop NOP +.386783 ea nop NOP +.386784 ea nop NOP +.386785 ea nop NOP +.386786 ea nop NOP +.386787 e0 00 00 cpx #$0000 CPX #$0000 +.38678a d0 f2 bne $38677e BNE DLY_LOOP1 +.38678c 20 e5 67 jsr $3867e5 JSR Poll_Outbuf ; +.38678f af 60 10 af lda $af1060 LDA KBD_OUT_BUF ; Read Output Buffer +.386793 DO_CMD_F4_AGAIN +.386793 20 da 67 jsr $3867da JSR Poll_Inbuf ; +.386796 a9 f4 lda #$f4 LDA #$F4 ; Enable the Keyboard +.386798 8f 60 10 af sta $af1060 STA KBD_DATA_BUF +.38679c 20 e5 67 jsr $3867e5 JSR Poll_Outbuf ; +.38679f af 60 10 af lda $af1060 LDA KBD_OUT_BUF ; Clear the Output buffer +.3867a3 c9 fa cmp #$fa CMP #$FA +.3867a5 d0 ec bne $386793 BNE DO_CMD_F4_AGAIN +.3867a7 20 f0 67 jsr $3867f0 JSR INIT_MOUSE +.3867aa af 40 01 00 lda $000140 LDA @lINT_PENDING_REG0 ; Read the Pending Register & +.3867ae 29 80 and #$80 AND #FNX0_INT07_MOUSE +.3867b0 8f 40 01 00 sta $000140 STA @lINT_PENDING_REG0 ; Writing it back will clear the Active Bit +.3867b4 af 41 01 00 lda $000141 LDA @lINT_PENDING_REG1 ; Read the Pending Register & +.3867b8 29 01 and #$01 AND #FNX1_INT00_KBD +.3867ba 8f 41 01 00 sta $000141 STA @lINT_PENDING_REG1 ; Writing it back will clear the Active Bit +.3867be initkb_loop_out +.3867be InitSuccess +.3867be 28 plp PLP +.3867bf fa plx PLX +.3867c0 68 pla PLA +.3867c1 2b pld PLD +.3867c2 60 rts RTS +.3867c3 INIT_MOUSEPOINTER +.3867c3 c2 30 rep #$30 REP #$30 ; set A&X long +.3867c5 a2 80 4d ldx #$4d80 LDX #<>MOUSE_POINTER_PTR +.3867c8 a9 00 01 lda #$0100 LDA #$100 +.3867cb a0 00 05 ldy #$0500 LDY #$0500 +.3867ce 54 af 38 mvn $38,$af MVN #`MOUSE_POINTER_PTR,#$AF +.3867d1 e2 20 sep #$20 SEP #$20 ; set A short +.3867d3 a9 01 lda #$01 LDA #$01 +.3867d5 8f 00 07 af sta $af0700 STA @lMOUSE_PTR_CTRL_REG_L ; Enable Mouse, Mouse Pointer Graphic Bank 0 +.3867d9 60 rts RTS +.3867da Poll_Inbuf +.3867da af 64 10 af lda $af1064 LDA STATUS_PORT ; Load Status Byte +.3867de 29 02 and #$02 AND #3868b2 01 01 01 01 01 01 01 01 CHANNELS .byte 1,1,1,1,1,1,1,1,1 +>3868ba 01 +.3868bb TOGGLE_CHANNEL +.3868bb aa tax TAX +.3868bc ca dex DEX +.3868bd bf b2 68 38 lda $3868b2,x LDA CHANNELS,X +.3868c1 49 01 eor #$01 EOR #1 +.3868c3 9f b2 68 38 sta $3868b2,x STA CHANNELS,X +.3868c7 60 rts RTS +>3868c8 80 80 80 31 33 80 36 38 SCAN_TO_NOTE .text $80, $80, $80, $31, $33, $80, $36, $38, $3A, $80, $41, $80, $80, $80, $80, $80 +>3868d0 3a 80 41 80 80 80 80 80 +>3868d8 2c 32 34 35 37 39 3b 3c .text $2C, $32, $34, $35, $37, $39, $3B, $3C, $42, $80, $80, $80, $80, $80, $80, $21 +>3868e0 42 80 80 80 80 80 80 21 +>3868e8 23 80 26 28 2a 80 80 80 .text $23, $80, $26, $28, $2A, $80, $80, $80, $80, $80, $80, $80, $1C, $22, $24, $25 +>3868f0 80 80 80 80 1c 22 24 25 +>3868f8 27 29 2b 80 80 80 80 80 .text $27, $29, $2B, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80 +>386900 80 80 80 80 80 80 80 80 +>386908 80 80 80 80 80 80 80 80 .text $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80 +>386910 80 80 80 80 80 80 80 80 +>386918 80 80 80 80 80 80 80 80 .text $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80 +>386920 80 80 80 80 80 80 80 80 +.386928 MIDI_COMMAND_TABLE +>386928 02 56 02 56 .word <>NOTE_OFF, <>NOTE_ON +>38692c 82 56 82 56 .word <>POLY_PRESSURE, <>CONTROL_CHANGE +>386930 ab 56 ab 56 .word <>PROGRAM_CHANGE, <>CHANNEL_PRESSURE ; these two command expect 1 datat byte only - no running status +>386934 82 56 c2 56 .word <>PITCH_BEND, <>SYSTEM_COMMAND +>386938 da 56 .word <>INVALID_COMMAND ;****** Processing file: file_load.asm -.386f3e LOAD_FILE_DISPLAY -.386f3e c2 10 rep #$10 REP #$10 ; set X long -.386f40 a9 02 lda #$02 LDA #2 -.386f42 8f 15 0f 38 sta $380f15 STA STATE_MACHINE -.386f46 22 86 62 38 jsl $386286 JSL ISDOS_INIT -.386f4a LOAD_DIRECTORY -.386f4a a9 00 lda #$00 LDA #0 -.386f4c 8d 1f 03 sta $031f STA SDOS_LINE_SELECT -.386f4f a9 34 lda #$34 LDA #`SDCARD_LIST -.386f51 85 53 sta $53 STA SDOS_FILE_REC_PTR+2 -.386f53 64 52 stz $52 STZ SDOS_FILE_REC_PTR+1 -.386f55 64 51 stz $51 STZ SDOS_FILE_REC_PTR -.386f57 20 63 6f jsr $386f63 JSR LOAD_SDCARD_DATA -.386f5a 20 8e 6f jsr $386f8e JSR SHOW_FILE_MENU -.386f5d 20 d4 6f jsr $386fd4 JSR POPULATE_FILES -.386f60 e2 10 sep #$10 SEP #$10 ; set X short -.386f62 6b rtl RTL -.386f63 LOAD_SDCARD_DATA -.386f63 a9 00 lda #$00 LDA #0 -.386f65 a0 00 04 ldy #$0400 LDY #1024 ; each struct is 18 bytes long, so this allows to load a 64 entries directory -.386f68 CLEAR_FILE_AREA -.386f68 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR], Y -.386f6a 88 dey DEY -.386f6b d0 fb bne $386f68 BNE CLEAR_FILE_AREA -.386f6d a5 3f lda $3f LDA SDCARD_PRSNT_MNT -.386f6f f0 1c beq $386f8d BEQ LOAD_SDCARD_DATA_DONE ; if SD not present, exit -.386f71 22 ec 62 38 jsl $3862ec JSL ISDOS_READ_MBR_BOOT -.386f75 22 c3 65 38 jsl $3865c3 JSL ISDOS_PARSE_ROOT_DIR -.386f79 c2 20 rep #$20 REP #$20 ; set A long -.386f7b a9 00 66 lda #$6600 LDA #FAT_DATA -.386f7e 85 80 sta $80 STA SD_DATA -.386f80 a9 00 00 lda #$0000 LDA #0 -.386f83 85 82 sta $82 STA SD_DATA + 2 -.386f85 85 86 sta $86 STA SD_DATA_FAT_PAGE -.386f87 22 6f 66 38 jsl $38666f JSL ISDOS_READ_FAT_SECTOR -.386f8b e2 20 sep #$20 SEP #$20 ; set A short -.386f8d LOAD_SDCARD_DATA_DONE -.386f8d 60 rts RTS -.386f8e SHOW_FILE_MENU -.386f8e c2 30 rep #$30 REP #$30 ; set A&X long -.386f90 a9 00 a0 lda #$a000 LDA #<>CS_TEXT_MEM_PTR ; store the initial screen buffer location -.386f93 85 0c sta $0c STA SCREENBEGIN -.386f95 a9 00 c0 lda #$c000 LDA #<>CS_COLOR_MEM_PTR ; store the initial colour buffer location -.386f98 85 17 sta $17 STA CURSORPOS -.386f9a e2 20 sep #$20 SEP #$20 ; set A short -.386f9c a9 af lda #$af LDA #`CS_TEXT_MEM_PTR -.386f9e 85 0e sta $0e STA SCREENBEGIN+2 -.386fa0 85 19 sta $19 STA CURSORPOS+2 -.386fa2 a0 1e 05 ldy #$051e LDY #128 * 10 + 30 -.386fa5 a9 28 lda #$28 LDA #40 ; lines to copy -.386fa7 85 80 sta $80 STA LINE_COPY -.386fa9 a2 9f 05 ldx #$059f LDX #128 * 11 + 31 ; initialize the cursor position for file display -.386fac 86 1a stx $1a STX CURSORX -.386fae a2 00 00 ldx #$0000 LDX #0 -.386fb1 a9 14 lda #$14 COPY_LINE LDA #20 ; columns to copy -.386fb3 85 81 sta $81 STA CHAR_COPY -.386fb5 bf 80 54 38 lda $385480,x COPY_CHAR LDA FILE_LOAD_SCREEN,X -.386fb9 97 0c sta [$0c],y STA [SCREENBEGIN],Y -.386fbb a9 50 lda #$50 LDA #$50 ; yellow -.386fbd 97 17 sta [$17],y STA [CURSORPOS],Y -.386fbf c8 iny INY -.386fc0 e8 inx INX -.386fc1 c6 81 dec $81 DEC CHAR_COPY -.386fc3 d0 f0 bne $386fb5 BNE COPY_CHAR -.386fc5 c2 20 rep #$20 REP #$20 ; set A long -.386fc7 98 tya TYA -.386fc8 18 clc CLC -.386fc9 69 6c 00 adc #$006c ADC #108 ; skip to next line -.386fcc a8 tay TAY -.386fcd e2 20 sep #$20 SEP #$20 ; set A short -.386fcf c6 80 dec $80 DEC LINE_COPY -.386fd1 d0 de bne $386fb1 BNE COPY_LINE -.386fd3 60 rts RTS -.386fd4 POPULATE_FILES -.386fd4 64 51 stz $51 STZ SDOS_FILE_REC_PTR -.386fd6 64 52 stz $52 STZ SDOS_FILE_REC_PTR+1 -.386fd8 a9 34 lda #$34 LDA #`SDCARD_LIST -.386fda 85 53 sta $53 STA SDOS_FILE_REC_PTR+2 -.386fdc a2 00 00 ldx #$0000 LDX #0 -.386fdf PF_NEXT_FILE -.386fdf a0 0b 00 ldy #$000b LDY #11 -.386fe2 b7 51 lda [$51],y LDA [SDOS_FILE_REC_PTR],Y -.386fe4 f0 20 beq $387006 BEQ PF_DONE -.386fe6 22 c7 61 38 jsl $3861c7 JSL DISPLAY_FAT_RECORD -.386fea 22 9a 61 38 jsl $38619a JSL DISPLAY_NEXT_LINE ; Print the character -.386fee c2 20 rep #$20 REP #$20 ; set A long -.386ff0 a5 51 lda $51 LDA SDOS_FILE_REC_PTR -.386ff2 69 12 00 adc #$0012 ADC #18 -.386ff5 85 51 sta $51 STA SDOS_FILE_REC_PTR -.386ff7 c9 80 04 cmp #$0480 CMP #1152 -.386ffa b0 0a bcs $387006 BCS PF_DONE -.386ffc e8 inx INX -.386ffd e0 26 00 cpx #$0026 CPX #38 -.387000 f0 04 beq $387006 BEQ PF_DONE -.387002 e2 20 sep #$20 SEP #$20 ; set A short -.387004 80 d9 bra $386fdf BRA PF_NEXT_FILE -.387006 PF_DONE -.387006 e2 20 sep #$20 SEP #$20 ; set A short -.387008 a9 05 lda #$05 LDA #5 ; Yellow Background -.38700a 22 29 62 38 jsl $386229 JSL TEXT_COLOUR_SELECTED -.38700e 60 rts RTS -.38700f READ_FILE -.38700f a9 00 lda #$00 LDA #0 -.387011 eb xba XBA -.387012 ad 1f 03 lda $031f LDA SDOS_LINE_SELECT -.387015 c2 30 rep #$30 REP #$30 ; set A&X long -.387017 8d 00 01 sta $0100 STA UNSIGNED_MULT_A -.38701a a9 12 00 lda #$0012 LDA #18 -.38701d 8d 02 01 sta $0102 STA UNSIGNED_MULT_B -.387020 ad 04 01 lda $0104 LDA UNSIGNED_MULT_RESULT -.387023 85 51 sta $51 STA SDOS_FILE_REC_PTR -.387025 a9 00 80 lda #$8000 LDA #<>RAD_FILE_TEMP -.387028 85 80 sta $80 STA SD_DATA -.38702a a9 37 00 lda #$0037 LDA #`RAD_FILE_TEMP -.38702d 85 82 sta $82 STA SD_DATA + 2 -.38702f a0 10 00 ldy #$0010 LDY #16 -.387032 b7 51 lda [$51],y LDA [SDOS_FILE_REC_PTR],Y -.387034 22 3d 67 38 jsl $38673d JSL ISDOS_READ_FILE -.387038 e2 20 sep #$20 SEP #$20 ; set A short -.38703a 22 b1 30 38 jsl $3830b1 JSL OPL2_INIT -.38703e 22 6b 70 38 jsl $38706b JSL RAD_INIT_PLAYER -.387042 22 47 70 38 jsl $387047 JSL EXIT_FILE -.387046 6b rtl RTL -.387047 EXIT_FILE -.387047 20 7d 6a jsr $386a7d JSR RESET_STATE_MACHINE -.38704a 20 db 5c jsr $385cdb JSR DRAW_DISPLAY -.38704d 20 59 5f jsr $385f59 JSR DISPLAY_FILENAME -.387050 20 61 5e jsr $385e61 JSR DISPLAY_PATTERN -.387053 20 2b 61 jsr $38612b JSR DISPLAY_ORDERS -.387056 20 af 60 jsr $3860af JSR DISPLAY_SPEED -.387059 6b rtl RTL +.38693a LOAD_FILE_DISPLAY +.38693a c2 10 rep #$10 REP #$10 ; set X long +.38693c a9 02 lda #$02 LDA #2 +.38693e 8f 15 0f 38 sta $380f15 STA STATE_MACHINE +.386942 22 82 5c 38 jsl $385c82 JSL ISDOS_INIT +.386946 LOAD_DIRECTORY +.386946 a9 00 lda #$00 LDA #0 +.386948 8d 1f 03 sta $031f STA SDOS_LINE_SELECT +.38694b a9 34 lda #$34 LDA #`SDCARD_LIST +.38694d 85 53 sta $53 STA SDOS_FILE_REC_PTR+2 +.38694f 64 52 stz $52 STZ SDOS_FILE_REC_PTR+1 +.386951 64 51 stz $51 STZ SDOS_FILE_REC_PTR +.386953 20 5f 69 jsr $38695f JSR LOAD_SDCARD_DATA +.386956 20 8a 69 jsr $38698a JSR SHOW_FILE_MENU +.386959 20 d0 69 jsr $3869d0 JSR POPULATE_FILES +.38695c e2 10 sep #$10 SEP #$10 ; set X short +.38695e 6b rtl RTL +.38695f LOAD_SDCARD_DATA +.38695f a9 00 lda #$00 LDA #0 +.386961 a0 00 04 ldy #$0400 LDY #1024 ; each struct is 18 bytes long, so this allows to load a 64 entries directory +.386964 CLEAR_FILE_AREA +.386964 97 51 sta [$51],y STA [SDOS_FILE_REC_PTR], Y +.386966 88 dey DEY +.386967 d0 fb bne $386964 BNE CLEAR_FILE_AREA +.386969 a5 3f lda $3f LDA SDCARD_PRSNT_MNT +.38696b f0 1c beq $386989 BEQ LOAD_SDCARD_DATA_DONE ; if SD not present, exit +.38696d 22 e8 5c 38 jsl $385ce8 JSL ISDOS_READ_MBR_BOOT +.386971 22 bf 5f 38 jsl $385fbf JSL ISDOS_PARSE_ROOT_DIR +.386975 c2 20 rep #$20 REP #$20 ; set A long +.386977 a9 00 66 lda #$6600 LDA #FAT_DATA +.38697a 85 80 sta $80 STA SD_DATA +.38697c a9 00 00 lda #$0000 LDA #0 +.38697f 85 82 sta $82 STA SD_DATA + 2 +.386981 85 86 sta $86 STA SD_DATA_FAT_PAGE +.386983 22 6b 60 38 jsl $38606b JSL ISDOS_READ_FAT_SECTOR +.386987 e2 20 sep #$20 SEP #$20 ; set A short +.386989 LOAD_SDCARD_DATA_DONE +.386989 60 rts RTS +.38698a SHOW_FILE_MENU +.38698a c2 30 rep #$30 REP #$30 ; set A&X long +.38698c a9 00 a0 lda #$a000 LDA #<>CS_TEXT_MEM_PTR ; store the initial screen buffer location +.38698f 85 0c sta $0c STA SCREENBEGIN +.386991 a9 00 c0 lda #$c000 LDA #<>CS_COLOR_MEM_PTR ; store the initial colour buffer location +.386994 85 17 sta $17 STA CURSORPOS +.386996 e2 20 sep #$20 SEP #$20 ; set A short +.386998 a9 af lda #$af LDA #`CS_TEXT_MEM_PTR +.38699a 85 0e sta $0e STA SCREENBEGIN+2 +.38699c 85 19 sta $19 STA CURSORPOS+2 +.38699e a0 3e 03 ldy #$033e LDY #SCREEN_WIDTH * 10 + 30 +.3869a1 a9 28 lda #$28 LDA #40 ; lines to copy +.3869a3 85 80 sta $80 STA LINE_COPY +.3869a5 a2 8f 03 ldx #$038f LDX #SCREEN_WIDTH * 11 + 31 ; initialize the cursor position for file display +.3869a8 86 1a stx $1a STX CURSORX +.3869aa a2 00 00 ldx #$0000 LDX #0 +.3869ad a9 14 lda #$14 COPY_LINE LDA #20 ; columns to copy +.3869af 85 81 sta $81 STA CHAR_COPY +.3869b1 bf 80 4e 38 lda $384e80,x COPY_CHAR LDA FILE_LOAD_SCREEN,X +.3869b5 97 0c sta [$0c],y STA [SCREENBEGIN],Y +.3869b7 a9 50 lda #$50 LDA #$50 ; yellow +.3869b9 97 17 sta [$17],y STA [CURSORPOS],Y +.3869bb c8 iny INY +.3869bc e8 inx INX +.3869bd c6 81 dec $81 DEC CHAR_COPY +.3869bf d0 f0 bne $3869b1 BNE COPY_CHAR +.3869c1 c2 20 rep #$20 REP #$20 ; set A long +.3869c3 98 tya TYA +.3869c4 18 clc CLC +.3869c5 69 3c 00 adc #$003c ADC #SCREEN_WIDTH - 20 ; skip to next line +.3869c8 a8 tay TAY +.3869c9 e2 20 sep #$20 SEP #$20 ; set A short +.3869cb c6 80 dec $80 DEC LINE_COPY +.3869cd d0 de bne $3869ad BNE COPY_LINE +.3869cf 60 rts RTS +.3869d0 POPULATE_FILES +.3869d0 64 51 stz $51 STZ SDOS_FILE_REC_PTR +.3869d2 64 52 stz $52 STZ SDOS_FILE_REC_PTR+1 +.3869d4 a9 34 lda #$34 LDA #`SDCARD_LIST +.3869d6 85 53 sta $53 STA SDOS_FILE_REC_PTR+2 +.3869d8 a2 00 00 ldx #$0000 LDX #0 +.3869db PF_NEXT_FILE +.3869db a0 0b 00 ldy #$000b LDY #11 +.3869de b7 51 lda [$51],y LDA [SDOS_FILE_REC_PTR],Y +.3869e0 f0 24 beq $386a06 BEQ PF_DONE +.3869e2 22 c3 5b 38 jsl $385bc3 JSL DISPLAY_FAT_RECORD +.3869e6 c2 20 rep #$20 REP #$20 ; set A long +.3869e8 a5 1a lda $1a LDA CURSORX +.3869ea 18 clc CLC +.3869eb 69 3e 00 adc #$003e ADC #SCREEN_WIDTH - 18 +.3869ee 85 1a sta $1a STA CURSORX +.3869f0 a5 51 lda $51 LDA SDOS_FILE_REC_PTR +.3869f2 69 12 00 adc #$0012 ADC #18 +.3869f5 85 51 sta $51 STA SDOS_FILE_REC_PTR +.3869f7 c9 80 04 cmp #$0480 CMP #1152 +.3869fa b0 0a bcs $386a06 BCS PF_DONE +.3869fc e8 inx INX +.3869fd e0 26 00 cpx #$0026 CPX #38 +.386a00 f0 04 beq $386a06 BEQ PF_DONE +.386a02 e2 20 sep #$20 SEP #$20 ; set A short +.386a04 80 d5 bra $3869db BRA PF_NEXT_FILE +.386a06 PF_DONE +.386a06 e2 20 sep #$20 SEP #$20 ; set A short +.386a08 a9 05 lda #$05 LDA #5 ; Yellow Background +.386a0a 22 25 5c 38 jsl $385c25 JSL TEXT_COLOUR_SELECTED +.386a0e 60 rts RTS +.386a0f READ_FILE +.386a0f a9 00 lda #$00 LDA #0 +.386a11 eb xba XBA +.386a12 ad 1f 03 lda $031f LDA SDOS_LINE_SELECT +.386a15 c2 30 rep #$30 REP #$30 ; set A&X long +.386a17 8d 00 01 sta $0100 STA UNSIGNED_MULT_A +.386a1a a9 12 00 lda #$0012 LDA #18 +.386a1d 8d 02 01 sta $0102 STA UNSIGNED_MULT_B +.386a20 ad 04 01 lda $0104 LDA UNSIGNED_MULT_RESULT +.386a23 85 51 sta $51 STA SDOS_FILE_REC_PTR +.386a25 a9 00 80 lda #$8000 LDA #<>RAD_FILE_TEMP +.386a28 85 80 sta $80 STA SD_DATA +.386a2a a9 37 00 lda #$0037 LDA #`RAD_FILE_TEMP +.386a2d 85 82 sta $82 STA SD_DATA + 2 +.386a2f a0 10 00 ldy #$0010 LDY #16 +.386a32 b7 51 lda [$51],y LDA [SDOS_FILE_REC_PTR],Y +.386a34 22 39 61 38 jsl $386139 JSL ISDOS_READ_FILE +.386a38 e2 20 sep #$20 SEP #$20 ; set A short +.386a3a 22 b1 30 38 jsl $3830b1 JSL OPL2_INIT +.386a3e 22 6b 6a 38 jsl $386a6b JSL RAD_INIT_PLAYER +.386a42 22 47 6a 38 jsl $386a47 JSL EXIT_FILE +.386a46 6b rtl RTL +.386a47 EXIT_FILE +.386a47 20 79 64 jsr $386479 JSR RESET_STATE_MACHINE +.386a4a 20 db 56 jsr $3856db JSR DRAW_DISPLAY +.386a4d 20 59 59 jsr $385959 JSR DISPLAY_FILENAME +.386a50 20 61 58 jsr $385861 JSR DISPLAY_PATTERN +.386a53 20 2b 5b jsr $385b2b JSR DISPLAY_ORDERS +.386a56 20 af 5a jsr $385aaf JSR DISPLAY_SPEED +.386a59 6b rtl RTL ;****** Return to file: tracker.asm @@ -7350,783 +7247,783 @@ >0001 00 songLength .byte $00 >0002 06 InitialSpeed .byte $06 >0003 00 hasSlowTimer .byte $00 ;BOOL $00 = False, $01 = True ->38705a 43 90 44 91 45 46 92 47 note_array .byte $43, $90, $44, $91, $45, $46, $92, $47, $93, $41, $94, $42, $43 ->387062 93 41 94 42 43 -.387067 TuneInfo ->387067 00 version .byte $00 ; bit 1 is RAD 1, bit 2 is RAD 2 ->387068 00 songLength .byte $00 ->387069 06 InitialSpeed .byte $06 ->38706a 00 hasSlowTimer .byte $00 ;BOOL $00 = False, $01 = True -.38706b RAD_INIT_PLAYER -.38706b 22 b1 30 38 jsl $3830b1 JSL OPL2_INIT ; Init OPL2 -.38706f 20 97 72 jsr $387297 JSR RAD_ALL_NOTES_OFF -.387072 a2 00 00 ldx #$0000 LDX #0 -.387075 a9 00 lda #$00 LDA #0 -.387077 RI_RESET -.387077 9f 00 00 39 sta $390000,x STA PATTERNS,X -.38707b e8 inx INX -.38707c d0 f9 bne $387077 BNE RI_RESET -.38707e c2 30 rep #$30 REP #$30 ; set A&X long -.387080 a9 00 80 lda #$8000 LDA #<>RAD_FILE_TEMP ; Set the Pointer where the File Begins -.387083 85 08 sta $08 STA OPL2_ADDY_PTR_LO; -.387085 a9 37 00 lda #$0037 LDA #<`RAD_FILE_TEMP -.387088 85 0a sta $0a STA OPL2_ADDY_PTR_HI; -.38708a e2 20 sep #$20 SEP #$20 ; set A short -.38708c a0 10 00 ldy #$0010 LDY #$0010 -.38708f b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.387091 c9 10 cmp #$10 CMP #$10 ; BCD version 1.0 or 2.1 -.387093 d0 05 bne $38709a BNE RI_LOAD_VERSION_21 -.387095 22 f7 70 38 jsl $3870f7 JSL READ_VERSION_10 -.387099 6b rtl RTL ; End of RAD_INIT_PLAYER -.38709a RI_LOAD_VERSION_21 -.38709a c9 21 cmp #$21 CMP #$21 -.38709c d0 04 bne $3870a2 BNE RI_INVALID -.38709e 22 a3 70 38 jsl $3870a3 JSL READ_VERSION_21 -.3870a2 RI_INVALID -.3870a2 6b rtl RTL ; End of RAD_INIT_PLAYER -.3870a3 READ_VERSION_21 -.3870a3 a9 02 lda #$02 LDA #2 -.3870a5 8f 67 70 38 sta $387067 STA @lTuneInfo.version -.3870a9 20 b0 70 jsr $3870b0 JSR READ_TIMER -.3870ac 20 82 71 jsr $387182 JSR PARSER_RAD_FILE_INSTRUMENT_21; Parse the Instrument -.3870af 6b rtl RTL ; End of READ_VERSION_21 -.3870b0 READ_TIMER -.3870b0 a0 11 00 ldy #$0011 LDY #$11 -.3870b3 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.3870b5 89 40 bit #$40 BIT #$40 -.3870b7 f0 17 beq $3870d0 BEQ RT_NOT_SLOW -.3870b9 a9 01 lda #$01 LDA #1 -.3870bb 8f 6a 70 38 sta $38706a STA @lTuneInfo.hasSlowTimer -.3870bf a9 0f lda #$0f LDA #SLOW_TIMER -.3870c6 8d 66 01 sta $0166 STA TIMER0_CMP_M -.3870c9 a9 0c lda #$0c LDA #<`SLOW_TIMER -.3870cb 8d 67 01 sta $0167 STA TIMER0_CMP_H -.3870ce 80 23 bra $3870f3 BRA SET_TIMER -.3870d0 RT_NOT_SLOW -.3870d0 89 20 bit #$20 BIT #$20 -.3870d2 f0 0a beq $3870de BEQ RT_NOT_BPM -.3870d4 c8 iny INY -.3870d5 c2 20 rep #$20 REP #$20 ; set A long -.3870d7 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.3870d9 e2 20 sep #$20 SEP #$20 ; set A short -.3870db c8 iny INY -.3870dc 80 15 bra $3870f3 BRA SET_TIMER -.3870de RT_NOT_BPM -.3870de a9 00 lda #$00 LDA #0 -.3870e0 8f 6a 70 38 sta $38706a STA @lTuneInfo.hasSlowTimer -.3870e4 a9 98 lda #$98 LDA #FIFTY_HZ_COUNT -.3870eb 8d 66 01 sta $0166 STA TIMER0_CMP_M -.3870ee a9 04 lda #$04 LDA #<`FIFTY_HZ_COUNT -.3870f0 8d 67 01 sta $0167 STA TIMER0_CMP_H -.3870f3 SET_TIMER -.3870f3 20 13 6b jsr $386b13 JSR INIT_TIMER0 -.3870f6 60 rts RTS -.3870f7 READ_VERSION_10 -.3870f7 a9 01 lda #$01 LDA #1 -.3870f9 8f 67 70 38 sta $387067 STA @lTuneInfo.version -.3870fd 20 15 71 jsr $387115 JSR PARSER_RAD_FILE_INSTRUMENT_10; Parse the Instrument -.387100 20 95 71 jsr $387195 JSR PROCESS_ORDER_LIST_10 ; Parse the Order List -.387103 20 ba 71 jsr $3871ba JSR READ_PATTERNS_10 -.387106 20 b0 70 jsr $3870b0 JSR READ_TIMER -.387109 6b rtl RTL ; End of READ_VERSION_10 ->38710a 07 01 08 02 09 03 0a 04 ADLIB_OFFSETS .byte 7,1,8,2,9,3,10,4,5,11,6 ->387112 05 0b 06 -.387115 PARSER_RAD_FILE_INSTRUMENT_10 -.387115 c8 iny INY ; $11 bit 7: description, bit6: slow timer, bits4..0: speed -.387116 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.387118 29 1f and #$1f AND #$1F -.38711a 8f 69 70 38 sta $387069 STA @lTuneInfo.InitialSpeed -.38711e b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.387120 29 80 and #$80 AND #$80 -.387122 f0 07 beq $38712b BEQ READ_INSTR_DATA -.387124 Not_Done_With_Description -.387124 c8 iny INY ; Move the Pointer Forward -.387125 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.387127 c9 00 cmp #$00 CMP #$00 ; Check for the End of Text -.387129 d0 f9 bne $387124 BNE Not_Done_With_Description -.38712b READ_INSTR_DATA -.38712b c8 iny INY ; This points after either After Description or next to Offset 0x11 -.38712c a9 38 lda #$38 LDA #<`INSTRUMENT_ACCORDN -.38712e 85 f2 sta $f2 STA RAD_ADDR + 2 -.387130 ProcessNextInstruments_10 -.387130 e2 20 sep #$20 SEP #$20 ; set A short -.387132 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; Read Instrument Number -.387134 f0 4a beq $387180 BEQ DoneProcessingInstrument_10 -.387136 c2 20 rep #$20 REP #$20 ; set A long -.387138 3a dec a DEC A -.387139 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A -.38713d a9 16 00 lda #$0016 LDA #INSTR_REC_LEN -.387140 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B -.387144 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT ; not sure why this one requires a long address - bank is still 0 -.387148 18 clc CLC -.387149 69 3b 10 adc #$103b ADC #<>INSTRUMENT_ACCORDN -.38714c 85 f0 sta $f0 STA RAD_ADDR -.38714e a9 00 00 lda #$0000 LDA #0 -.387151 e2 20 sep #$20 SEP #$20 ; set A short -.387153 c8 iny INY -.387154 64 4e stz $4e STZ RAD_TEMP -.387156 87 f0 sta [$f0] STA [RAD_ADDR] ; Not a drum instrument -.387158 Transfer_Instrument_Info -.387158 a6 4e ldx $4e LDX RAD_TEMP -.38715a bf 0a 71 38 lda $38710a,x LDA ADLIB_OFFSETS,X ; RAD uses a different order for registers -.38715e aa tax TAX -.38715f b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; Read Register -.387161 5a phy PHY -.387162 9b txy TXY -.387163 97 f0 sta [$f0],y STA [RAD_ADDR],Y ; Write to the instrument table -.387165 7a ply PLY -.387166 c8 iny INY -.387167 e6 4e inc $4e INC RAD_TEMP -.387169 a5 4e lda $4e LDA RAD_TEMP -.38716b c9 0b cmp #$0b CMP #11 -.38716d 90 e9 bcc $387158 BCC Transfer_Instrument_Info -.38716f 5a phy PHY ; store the position in the file on the stack -.387170 a0 0c 00 ldy #$000c LDY #12 ; beginning of text -.387173 a9 20 lda #$20 LDA #$20 -.387175 BLANK_INSTR_DESCR -.387175 97 f0 sta [$f0],y STA [RAD_ADDR],Y -.387177 c8 iny INY -.387178 c0 16 00 cpy #$0016 CPY #22 -.38717b d0 f8 bne $387175 BNE BLANK_INSTR_DESCR -.38717d 7a ply PLY -.38717e 80 b0 bra $387130 BRA ProcessNextInstruments_10 -.387180 DoneProcessingInstrument_10 -.387180 c8 iny INY -.387181 60 rts RTS -.387182 PARSER_RAD_FILE_INSTRUMENT_21 -.387182 PR_LOOP -.387182 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.387184 c8 iny INY -.387185 c9 00 cmp #$00 CMP #0 -.387187 d0 f9 bne $387182 BNE PR_LOOP -.387189 a9 38 lda #$38 LDA #<`INSTRUMENT_ACCORDN -.38718b 85 f2 sta $f2 STA RAD_ADDR + 2 -.38718d ProcessNextInstruments_21 -.38718d e2 20 sep #$20 SEP #$20 ; set A short -.38718f b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; Read Instrument Number -.387191 f0 00 beq $387193 BEQ DoneProcessingInstrument_21 -.387193 DoneProcessingInstrument_21 -.387193 c8 iny INY -.387194 60 rts RTS -.387195 PROCESS_ORDER_LIST_10 -.387195 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; Read Song Length -.387197 8f 68 70 38 sta $387068 STA @lTuneInfo.songLength -.38719b aa tax TAX -.38719c c8 iny INY -.38719d c2 20 rep #$20 REP #$20 ; set A long -.38719f a9 24 fc lda #$fc24 LDA #<>ORDERS -.3871a2 85 f0 sta $f0 STA RAD_ADDR -.3871a4 a9 39 00 lda #$0039 LDA #<`ORDERS -.3871a7 85 f2 sta $f2 STA RAD_ADDR + 2 -.3871a9 e2 20 sep #$20 SEP #$20 ; set A short -.3871ab READ_ORDER -.3871ab b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.3871ad c8 iny INY -.3871ae 87 f0 sta [$f0] STA [RAD_ADDR] -.3871b0 e6 f0 inc $f0 INC RAD_ADDR -.3871b2 b0 02 bcs $3871b6 BCS ORDER_CONTINUE -.3871b4 e6 f1 inc $f1 INC RAD_ADDR + 1 -.3871b6 ORDER_CONTINUE -.3871b6 ca dex DEX -.3871b7 d0 f2 bne $3871ab BNE READ_ORDER -.3871b9 60 rts RTS -.3871ba READ_PATTERNS_10 -.3871ba 64 f3 stz $f3 STZ RAD_PATTRN -.3871bc a9 39 lda #$39 LDA #<`PATTERNS -.3871be 85 f6 sta $f6 STA RAD_PTN_DEST + 2 -.3871c0 NEXT_PATTERN -.3871c0 c2 20 rep #$20 REP #$20 ; set A long -.3871c2 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.3871c4 f0 1f beq $3871e5 BEQ SKIP_PATTERN -.3871c6 5a phy PHY -.3871c7 a8 tay TAY -.3871c8 a5 f3 lda $f3 LDA RAD_PATTRN -.3871ca 29 ff 00 and #$00ff AND #$00FF -.3871cd 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A -.3871d1 a9 01 07 lda #$0701 LDA #PATTERN_BYTES -.3871d4 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B -.3871d8 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT -.3871dc 1a inc a INC A ; skip the pattern byte -.3871dd 85 f4 sta $f4 STA RAD_PTN_DEST -.3871df e2 20 sep #$20 SEP #$20 ; set A short -.3871e1 20 f2 71 jsr $3871f2 JSR READ_PATTERN_10 -.3871e4 7a ply PLY -.3871e5 SKIP_PATTERN -.3871e5 c8 iny INY -.3871e6 c8 iny INY -.3871e7 e2 20 sep #$20 SEP #$20 ; set A short -.3871e9 e6 f3 inc $f3 INC RAD_PATTRN -.3871eb a5 f3 lda $f3 LDA RAD_PATTRN -.3871ed c9 20 cmp #$20 CMP #32 -.3871ef d0 cf bne $3871c0 BNE NEXT_PATTERN -.3871f1 60 rts RTS -.3871f2 READ_PATTERN_10 -.3871f2 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; read the line number - bit 7 indicates the last line -.3871f4 8f 42 00 00 sta $000042 STA @lRAD_LINE -.3871f8 c8 iny INY -.3871f9 c2 20 rep #$20 REP #$20 ; set A long -.3871fb 29 7f 00 and #$007f AND #$7F -.3871fe 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A -.387202 a9 1c 00 lda #$001c LDA #LINE_BYTES -.387205 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B -.387209 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT -.38720d 1a inc a INC A ; skip the line number -.38720e 8f fa 00 00 sta $0000fa STA @lRAD_LINE_PTR -.387212 e2 20 sep #$20 SEP #$20 ; set A short -.387214 READ_NOTE -.387214 a6 fa ldx $fa LDX RAD_LINE_PTR ; X contains the offset in the destination memory -.387216 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; channel - bit 7 indicates the last note -.387218 c8 iny INY -.387219 8f f9 00 00 sta $0000f9 STA @lRAD_LAST_NOTE -.38721d 29 0f and #$0f AND #$F -.38721f 8f f7 00 00 sta $0000f7 STA @lRAD_CHANNEL -.387223 c2 20 rep #$20 REP #$20 ; set A long -.387225 8a txa TXA -.387226 18 clc CLC -.387227 65 f7 adc $f7 ADC RAD_CHANNEL ; multiply channel by 3 -.387229 65 f7 adc $f7 ADC RAD_CHANNEL -.38722b 65 f7 adc $f7 ADC RAD_CHANNEL -.38722d aa tax TAX -.38722e e2 20 sep #$20 SEP #$20 ; set A short -.387230 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; note / octave -.387232 5a phy PHY -.387233 9b txy TXY -.387234 97 f4 sta [$f4],y STA [RAD_PTN_DEST],Y -.387236 7a ply PLY -.387237 c8 iny INY -.387238 e8 inx INX -.387239 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; instrument/effect -.38723b 5a phy PHY -.38723c 9b txy TXY -.38723d 97 f4 sta [$f4],y STA [RAD_PTN_DEST],Y -.38723f 7a ply PLY -.387240 c8 iny INY -.387241 e8 inx INX -.387242 29 0f and #$0f AND #$F -.387244 f0 09 beq $38724f BEQ CHECK_LASTNOTE -.387246 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; effect parameter -.387248 5a phy PHY -.387249 9b txy TXY -.38724a 97 f4 sta [$f4],y STA [RAD_PTN_DEST],Y -.38724c 7a ply PLY -.38724d c8 iny INY -.38724e e8 inx INX -.38724f CHECK_LASTNOTE -.38724f af f9 00 00 lda $0000f9 LDA @lRAD_LAST_NOTE -.387253 10 bf bpl $387214 BPL READ_NOTE -.387255 af 42 00 00 lda $000042 LDA @lRAD_LINE -.387259 10 97 bpl $3871f2 BPL READ_PATTERN_10 -.38725b 60 rts RTS -.38725c DRAW_BLANKS -.38725c 5a phy PHY -.38725d da phx PHX -.38725e a2 12 00 ldx #$0012 LDX #18 -.387261 a0 00 00 ldy #$0000 LDY #0 -.387264 a9 2d lda #$2d LDA #'-' -.387266 BL_NEXT -.387266 97 0c sta [$0c],y STA [SCREENBEGIN], Y -.387268 c8 iny INY -.387269 ca dex DEX -.38726a d0 fa bne $387266 BNE BL_NEXT -.38726c fa plx PLX -.38726d 7a ply PLY -.38726e 60 rts RTS -.38726f DISPLAY_RAD_PTN_DEST -.38726f 5a phy PHY -.387270 a5 f6 lda $f6 LDA RAD_PTN_DEST+2 -.387272 20 b1 5d jsr $385db1 JSR WRITE_HEX -.387275 c8 iny INY -.387276 c8 iny INY -.387277 a5 f5 lda $f5 LDA RAD_PTN_DEST+1 -.387279 20 b1 5d jsr $385db1 JSR WRITE_HEX -.38727c c8 iny INY -.38727d c8 iny INY -.38727e a5 f4 lda $f4 LDA RAD_PTN_DEST -.387280 20 b1 5d jsr $385db1 JSR WRITE_HEX -.387283 7a ply PLY -.387284 60 rts RTS -.387285 WRITE_A_LNG -.387285 48 pha PHA -.387286 48 pha PHA -.387287 e2 20 sep #$20 SEP #$20 ; set A short -.387289 68 pla PLA -.38728a 20 b1 5d jsr $385db1 JSR WRITE_HEX -.38728d 88 dey DEY -.38728e 88 dey DEY -.38728f 68 pla PLA -.387290 20 b1 5d jsr $385db1 JSR WRITE_HEX -.387293 c2 20 rep #$20 REP #$20 ; set A long -.387295 68 pla PLA -.387296 60 rts RTS -.387297 RAD_ALL_NOTES_OFF -.387297 5a phy PHY -.387298 c2 20 rep #$20 REP #$20 ; set A long -.38729a a9 00 e7 lda #$e700 LDA #<>OPL3_R_BASE -.38729d 85 2c sta $2c STA OPL2_IND_ADDY_LL -.38729f a9 af 00 lda #$00af LDA #`OPL3_R_BASE -.3872a2 85 2e sta $2e STA OPL2_IND_ADDY_LL + 2 -.3872a4 e2 20 sep #$20 SEP #$20 ; set A short -.3872a6 a0 a0 00 ldy #$00a0 LDY #$A0 -.3872a9 a9 00 lda #$00 LDA #0 -.3872ab NEXT_NOTE_OFF -.3872ab 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y -.3872ad c8 iny INY -.3872ae c0 b9 00 cpy #$00b9 CPY #$B9 -.3872b1 d0 f8 bne $3872ab BNE NEXT_NOTE_OFF -.3872b3 7a ply PLY -.3872b4 60 rts RTS -.3872b5 RAD_PLAYNOTES -.3872b5 5a phy PHY -.3872b6 20 5c 72 jsr $38725c JSR DRAW_BLANKS -.3872b9 c2 20 rep #$20 REP #$20 ; set A long -.3872bb af 18 0f 38 lda $380f18 LDA PATTERN_NUM -.3872bf 29 ff 00 and #$00ff AND #$FF -.3872c2 3a dec a DEC A ; start at 0 -.3872c3 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A -.3872c7 a9 01 07 lda #$0701 LDA #PATTERN_BYTES -.3872ca 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B -.3872ce af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT -.3872d2 1a inc a INC A ; skip the pattern number byte -.3872d3 85 f4 sta $f4 STA RAD_PTN_DEST -.3872d5 e2 20 sep #$20 SEP #$20 ; set A short -.3872d7 a9 39 lda #$39 LDA #<`PATTERNS -.3872d9 85 f6 sta $f6 STA RAD_PTN_DEST + 2 -.3872db a0 00 01 ldy #$0100 LDY #128 * 2 -.3872de 20 6f 72 jsr $38726f JSR DISPLAY_RAD_PTN_DEST ; display the address of the pattern -.3872e1 c2 20 rep #$20 REP #$20 ; set A long -.3872e3 a5 6c lda $6c LDA LINE_NUM_HEX -.3872e5 29 7f 00 and #$007f AND #$7F -.3872e8 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A -.3872ec a9 1c 00 lda #$001c LDA #LINE_BYTES -.3872ef 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B -.3872f3 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT -.3872f7 1a inc a INC A ; skip the line number byte -.3872f8 a0 82 00 ldy #$0082 LDY #128 + 2 -.3872fb 20 85 72 jsr $387285 JSR WRITE_A_LNG ; display the line offset from the pattern address -.3872fe a8 tay TAY ; Y contains the line offset -.3872ff a9 00 00 lda #$0000 LDA #0 -.387302 e2 20 sep #$20 SEP #$20 ; set A short -.387304 64 28 stz $28 STZ OPL2_REG_REGION -.387306 PN_NEXT_NOTE -.387306 8f 27 00 00 sta $000027 STA @lOPL2_CHANNEL -.38730a aa tax TAX -.38730b bf b6 6e 38 lda $386eb6,x LDA CHANNELS,X -.38730f d0 05 bne $387316 BNE PN_PLAY_NOTE -.387311 c8 iny INY ; skip the channel data -.387312 c8 iny INY -.387313 c8 iny INY -.387314 80 58 bra $38736e BRA PN_CONTINUE -.387316 PN_PLAY_NOTE -.387316 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; octave/note -.387318 29 7f and #$7f AND #$7F -.38731a 20 d5 74 jsr $3874d5 JSR RAD_WRITE_OCT_NOTE -.38731d b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; bit 7 is bit 4 of the instrument number -.38731f 29 80 and #$80 AND #$80 -.387321 4a lsr a LSR A -.387322 4a lsr a LSR A -.387323 4a lsr a LSR A -.387324 85 4e sta $4e STA RAD_TEMP -.387326 c8 iny INY -.387327 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; instrument/effect -.387329 29 f0 and #$f0 AND #$F0 -.38732b 4a lsr a LSR A -.38732c 4a lsr a LSR A -.38732d 4a lsr a LSR A -.38732e 4a lsr a LSR A -.38732f 65 4e adc $4e ADC RAD_TEMP -.387331 f0 14 beq $387347 BEQ SKIP_INSTRUMENT -.387333 3a dec a DEC A ; instruments are starting at 0 -.387334 8f 6a 00 00 sta $00006a STA @lINSTR_NUMBER -.387338 5a phy PHY -.387339 a6 27 ldx $27 LDX OPL2_CHANNEL -.38733b a9 00 lda #$00 LDA #0 -.38733d eb xba XBA -.38733e bf 18 10 38 lda $381018,x LDA @lregisterOffsets_operator0,X -.387342 aa tax TAX -.387343 20 52 6b jsr $386b52 JSR LOAD_INSTRUMENT -.387346 7a ply PLY -.387347 SKIP_INSTRUMENT -.387347 af 30 00 00 lda $000030 LDA @lOPL2_NOTE -.38734b f0 11 beq $38735e BEQ SKIP_NOTE ; if the note is 0, don't play anything. -.38734d c9 0f cmp #$0f CMP #$0F ; NOTE OFF -.38734f f0 2b beq $38737c BEQ RAD_NOTE_OFF -.387351 c2 20 rep #$20 REP #$20 ; set A long -.387353 5a phy PHY -.387354 20 f5 37 jsr $3837f5 JSR OPL2_GET_REG_OFFSET -.387357 22 01 32 38 jsl $383201 JSL OPL2_PLAYNOTE -.38735b 7a ply PLY -.38735c e2 20 sep #$20 SEP #$20 ; set A short -.38735e SKIP_NOTE -.38735e a9 00 lda #$00 LDA #0 -.387360 eb xba XBA -.387361 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; instrument/effect -.387363 c8 iny INY -.387364 29 0f and #$0f AND #$F -.387366 f0 05 beq $38736d BEQ SKIP_EFFECT -.387368 0a asl a ASL A ; double bytes -.387369 aa tax TAX -.38736a fc 8d 73 jsr ($38738d,x) JSR (RAD_EFFECT_TABLE,X) -.38736d SKIP_EFFECT -.38736d c8 iny INY -.38736e PN_CONTINUE -.38736e a9 00 lda #$00 LDA #0 ; clear B -.387370 eb xba XBA -.387371 af 27 00 00 lda $000027 LDA @lOPL2_CHANNEL -.387375 1a inc a INC A -.387376 c9 09 cmp #$09 CMP #9 -.387378 d0 8c bne $387306 BNE PN_NEXT_NOTE -.38737a 7a ply PLY -.38737b 60 rts RTS -.38737c RAD_NOTE_OFF -.38737c af 27 00 00 lda $000027 LDA @lOPL2_CHANNEL -.387380 18 clc CLC -.387381 69 b0 adc #$b0 ADC #$B0 -.387383 85 2c sta $2c STA OPL2_IND_ADDY_LL -.387385 a9 00 lda #$00 LDA #0 -.387387 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.387389 c8 iny INY -.38738a c8 iny INY -.38738b 80 e1 bra $38736e BRA PN_CONTINUE -.38738d RAD_EFFECT_TABLE ->38738d ad 73 .word <>RAD_EFFECT_NONE ; 00 ->38738f 20 74 .word <>RAD_EFFECT_NOTE_SLIDE_UP ; 01 ->387391 20 74 .word <>RAD_EFFECT_NOTE_SLIDE_DOWN ; 02 ->387393 ad 73 .word <>RAD_EFFECT_NOTE_SLIDE_TO ; 03 ->387395 ad 73 .word <>RAD_NOOP ->387397 ad 73 .word <>RAD_EFFECT_NOTE_SLIDE_VOLUME ; 05 ->387399 ad 73 .word <>RAD_NOOP ->38739b ad 73 .word <>RAD_NOOP ->38739d ad 73 .word <>RAD_NOOP ->38739f ad 73 .word <>RAD_NOOP ->3873a1 ae 73 .word <>RAD_EFFECT_VOLUME_SLIDE ; 0A ->3873a3 ad 73 .word <>RAD_NOOP ->3873a5 96 74 .word <>RAD_EFFECT_SET_VOLUME ; 0C ->3873a7 05 74 .word <>RAD_EFFECT_PATTERN_BREAK ; 0D ->3873a9 ad 73 .word <>RAD_NOOP ->3873ab 16 74 .word <>RAD_EFFECT_SET_SPEED ; 0F -.3873ad RAD_NOOP -.3873ad RAD_EFFECT_NONE -.3873ad RAD_EFFECT_NOTE_SLIDE_TO -.3873ad RAD_EFFECT_NOTE_SLIDE_VOLUME -.3873ad 60 rts RTS -.3873ae RAD_EFFECT_VOLUME_SLIDE -.3873ae 5a phy PHY -.3873af b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; store value of the effect in RAD_CHANNE_EFFCT -.3873b1 85 4c sta $4c STA RAD_CHANNE_EFFCT -.3873b3 c2 20 rep #$20 REP #$20 ; set A long -.3873b5 a9 00 e7 lda #$e700 LDA #<>OPL3_R_BASE -.3873b8 85 2c sta $2c STA OPL2_IND_ADDY_LL -.3873ba a9 af 00 lda #$00af LDA #`OPL3_R_BASE -.3873bd 85 2e sta $2e STA OPL2_IND_ADDY_LL + 2 -.3873bf e2 30 sep #$30 SEP #$30 ; set A&X short -.3873c1 a5 27 lda $27 LDA OPL2_CHANNEL -.3873c3 aa tax TAX -.3873c4 bf 18 10 38 lda $381018,x LDA @lregisterOffsets_operator0,X -.3873c8 18 clc CLC -.3873c9 69 40 adc #$40 ADC #$40 -.3873cb a8 tay TAY -.3873cc b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y ; volume -.3873ce 48 pha PHA -.3873cf 29 3f and #$3f AND #$3F -.3873d1 18 clc CLC -.3873d2 65 4c adc $4c ADC RAD_CHANNE_EFFCT ; check for values greater than 50 -.3873d4 c9 40 cmp #$40 CMP #$40 ; if there's an overflow, use #$3F (low volume) -.3873d6 90 02 bcc $3873da BCC NO_OVERFLOW_0 -.3873d8 a9 3f lda #$3f LDA #$3F -.3873da NO_OVERFLOW_0 -.3873da 29 3f and #$3f AND #$3F -.3873dc 85 4e sta $4e STA RAD_TEMP -.3873de 68 pla PLA -.3873df 29 c0 and #$c0 AND #$C0 -.3873e1 05 4e ora $4e ORA RAD_TEMP -.3873e3 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y -.3873e5 c8 iny INY -.3873e6 c8 iny INY -.3873e7 c8 iny INY -.3873e8 b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y ; volume -.3873ea 48 pha PHA -.3873eb 29 3f and #$3f AND #$3F -.3873ed 18 clc CLC -.3873ee 65 4c adc $4c ADC RAD_CHANNE_EFFCT -.3873f0 c9 40 cmp #$40 CMP #$40 ; if there's an overflow, use #$3F (low volume) -.3873f2 90 02 bcc $3873f6 BCC NO_OVERFLOW_1 -.3873f4 a9 3f lda #$3f LDA #$3F -.3873f6 NO_OVERFLOW_1 -.3873f6 29 3f and #$3f AND #$3F -.3873f8 85 4e sta $4e STA RAD_TEMP -.3873fa 68 pla PLA -.3873fb 29 c0 and #$c0 AND #$C0 -.3873fd 05 4e ora $4e ORA RAD_TEMP -.3873ff 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y -.387401 c2 10 rep #$10 REP #$10 ; set X long -.387403 7a ply PLY -.387404 60 rts RTS -.387405 RAD_EFFECT_PATTERN_BREAK -.387405 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; effect parameter -.387407 3a dec a DEC A ; DECREMENT by 1, because the next timer interrupt will increment at the beginning -.387408 85 6c sta $6c STA LINE_NUM_HEX -.38740a a9 00 lda #$00 LDA #0 ; convert the effect to a decimal line number -.38740c 8f 19 0f 38 sta $380f19 STA @lLINE_NUM_DEC -.387410 20 9e 6a jsr $386a9e JSR INCREMENT_ORDER -.387413 7a ply PLY ; don't return to the calling method, return to the parent -.387414 7a ply PLY -.387415 60 rts RTS -.387416 RAD_EFFECT_SET_SPEED -.387416 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; effect parameter -.387418 8f 69 70 38 sta $387069 STA @lTuneInfo.InitialSpeed -.38741c 20 af 60 jsr $3860af JSR DISPLAY_SPEED -.38741f 60 rts RTS -.387420 RAD_EFFECT_NOTE_SLIDE_UP -.387420 RAD_EFFECT_NOTE_SLIDE_DOWN -.387420 5a phy PHY -.387421 4a lsr a LSR -.387422 85 50 sta $50 STA RAD_EFFECT ; 1 slide down, 2 slide up -.387424 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; store value of the effect in RAD_CHANNE_EFFCT -.387426 85 4c sta $4c STA RAD_CHANNE_EFFCT -.387428 c2 20 rep #$20 REP #$20 ; set A long -.38742a a9 00 e7 lda #$e700 LDA #<>OPL3_R_BASE -.38742d 85 2c sta $2c STA OPL2_IND_ADDY_LL -.38742f a9 af 00 lda #$00af LDA #`OPL3_R_BASE -.387432 85 2e sta $2e STA OPL2_IND_ADDY_LL + 2 -.387434 e2 30 sep #$30 SEP #$30 ; set A&X short -.387436 a5 27 lda $27 LDA OPL2_CHANNEL -.387438 18 clc CLC -.387439 69 a0 adc #$a0 ADC #$A0 -.38743b a8 tay TAY -.38743c b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y ; read low fnumber byte -.38743e c2 10 rep #$10 REP #$10 ; set X long -.387440 bb tyx TYX -.387441 a0 8a 00 ldy #$008a LDY #128 + 10 -.387444 20 b1 5d jsr $385db1 JSR WRITE_HEX -.387447 9b txy TXY -.387448 e2 10 sep #$10 SEP #$10 ; set X short -.38744a 48 pha PHA ; store A on the stack -.38744b 98 tya TYA -.38744c 18 clc CLC -.38744d 69 10 adc #$10 ADC #$10 -.38744f a8 tay TAY -.387450 b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y ; read bits 0,1 of high fnumber -.387452 85 4e sta $4e STA RAD_TEMP ; store the entire value of $B0 -.387454 c2 10 rep #$10 REP #$10 ; set X long -.387456 bb tyx TYX -.387457 a0 08 01 ldy #$0108 LDY #256 + 8 -.38745a 20 b1 5d jsr $385db1 JSR WRITE_HEX -.38745d 29 03 and #$03 AND #3 -.38745f a0 88 00 ldy #$0088 LDY #128 + 8 -.387462 20 b1 5d jsr $385db1 JSR WRITE_HEX -.387465 9b txy TXY -.387466 eb xba XBA -.387467 68 pla PLA ; A is now the FNUMBER -.387468 aa tax TAX ; X is now the FNUMBER -.387469 a5 50 lda $50 LDA RAD_EFFECT -.38746b 89 02 bit #$02 BIT #2 -.38746d f0 0a beq $387479 BEQ SLIDE_UP -.38746f c2 20 rep #$20 REP #$20 ; set A long -.387471 8a txa TXA -.387472 38 sec SEC -.387473 e5 4c sbc $4c SBC RAD_CHANNE_EFFCT ; substract the effect parameter -.387475 e2 20 sep #$20 SEP #$20 ; set A short -.387477 80 08 bra $387481 BRA FINISH_SLIDE -.387479 SLIDE_UP -.387479 c2 20 rep #$20 REP #$20 ; set A long -.38747b 8a txa TXA -.38747c 18 clc CLC -.38747d 65 4c adc $4c ADC RAD_CHANNE_EFFCT ; substract the effect parameter -.38747f e2 20 sep #$20 SEP #$20 ; set A short -.387481 FINISH_SLIDE -.387481 e2 10 sep #$10 SEP #$10 ; set X short -.387483 eb xba XBA -.387484 29 03 and #$03 AND #3 -.387486 05 4e ora $4e ORA RAD_TEMP -.387488 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y -.38748a 98 tya TYA -.38748b 38 sec SEC -.38748c e9 10 sbc #$10 SBC #$10 -.38748e a8 tay TAY -.38748f eb xba XBA -.387490 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y -.387492 c2 10 rep #$10 REP #$10 ; set X long -.387494 7a ply PLY -.387495 60 rts RTS -.387496 RAD_EFFECT_SET_VOLUME -.387496 5a phy PHY -.387497 c2 20 rep #$20 REP #$20 ; set A long -.387499 a9 00 e7 lda #$e700 LDA #<>OPL3_R_BASE -.38749c 85 2c sta $2c STA OPL2_IND_ADDY_LL -.38749e a9 af 00 lda #$00af LDA #`OPL3_R_BASE -.3874a1 85 2e sta $2e STA OPL2_IND_ADDY_LL + 2 -.3874a3 e2 20 sep #$20 SEP #$20 ; set A short -.3874a5 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; effect parameter -.3874a7 29 7f and #$7f AND #$7F -.3874a9 f0 01 beq $3874ac BEQ HANDLE_ZERO -.3874ab 3a dec a DEC A -.3874ac HANDLE_ZERO -.3874ac 49 3f eor #$3f EOR #$3F ; complement -.3874ae 85 4e sta $4e STA RAD_TEMP -.3874b0 e2 10 sep #$10 SEP #$10 ; set X short -.3874b2 a6 27 ldx $27 LDX OPL2_CHANNEL -.3874b4 bf 18 10 38 lda $381018,x LDA @lregisterOffsets_operator0,X -.3874b8 18 clc CLC -.3874b9 69 40 adc #$40 ADC #$40 -.3874bb a8 tay TAY -.3874bc b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y -.3874be 29 c0 and #$c0 AND #$C0 ; -.3874c0 18 clc CLC -.3874c1 65 4e adc $4e ADC RAD_TEMP -.3874c3 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y -.3874c5 c8 iny INY -.3874c6 c8 iny INY -.3874c7 c8 iny INY -.3874c8 b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y -.3874ca 29 c0 and #$c0 AND #$C0 ; -.3874cc 18 clc CLC -.3874cd 65 4e adc $4e ADC RAD_TEMP -.3874cf 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y -.3874d1 c2 10 rep #$10 REP #$10 ; set X long -.3874d3 7a ply PLY -.3874d4 60 rts RTS -.3874d5 RAD_WRITE_OCT_NOTE -.3874d5 5a phy PHY -.3874d6 48 pha PHA -.3874d7 48 pha PHA -.3874d8 af 27 00 00 lda $000027 LDA @lOPL2_CHANNEL -.3874dc 0a asl a ASL A ; multiply the channel by 2 for the screen position -.3874dd a8 tay TAY -.3874de 68 pla PLA -.3874df f0 03 beq $3874e4 BEQ DONT_DISPLAY_00 -.3874e1 20 b1 5d jsr $385db1 JSR WRITE_HEX -.3874e4 DONT_DISPLAY_00 -.3874e4 29 70 and #$70 AND #$70 ; octave -.3874e6 4a lsr a LSR -.3874e7 4a lsr a LSR -.3874e8 4a lsr a LSR -.3874e9 4a lsr a LSR -.3874ea 8f 31 00 00 sta $000031 STA @lOPL2_OCTAVE -.3874ee 68 pla PLA -.3874ef 29 0f and #$0f AND #$0F ; note -.3874f1 8f 30 00 00 sta $000030 STA @lOPL2_NOTE -.3874f5 7a ply PLY -.3874f6 60 rts RTS -.3874f7 RAD_SETINSTRUMENT -.3874f7 5a phy PHY -.3874f8 e2 20 sep #$20 SEP #$20 ; set A short -.3874fa a9 01 lda #$01 LDA #$01 -.3874fc 85 26 sta $26 STA OPL2_OPERATOR -.3874fe c2 20 rep #$20 REP #$20 ; set A long -.387500 a9 38 00 lda #$0038 LDA #<`INSTRUMENT_ACCORDN -.387503 85 0a sta $0a STA OPL2_ADDY_PTR_HI -.387505 a5 32 lda $32 LDA OPL2_PARAMETER0 -.387507 29 ff 00 and #$00ff AND #$00FF -.38750a 3a dec a DEC A -.38750b 0a asl a ASL A -.38750c 0a asl a ASL A -.38750d 0a asl a ASL A -.38750e 0a asl a ASL A -.38750f 18 clc CLC -.387510 69 3b 10 adc #$103b ADC #<>INSTRUMENT_ACCORDN -.387513 85 08 sta $08 STA OPL2_ADDY_PTR_LO -.387515 c2 20 rep #$20 REP #$20 ; set A long -.387517 a9 20 00 lda #$0020 LDA #$0020 -.38751a 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET -.38751e e2 20 sep #$20 SEP #$20 ; set A short -.387520 a0 00 00 ldy #$0000 LDY #$0000 -.387523 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.387525 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.387527 c2 20 rep #$20 REP #$20 ; set A long -.387529 a9 40 00 lda #$0040 LDA #$0040 -.38752c 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET -.387530 e2 20 sep #$20 SEP #$20 ; set A short -.387532 a0 02 00 ldy #$0002 LDY #$0002 -.387535 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.387537 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.387539 c2 20 rep #$20 REP #$20 ; set A long -.38753b a9 60 00 lda #$0060 LDA #$0060 -.38753e 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET -.387542 e2 20 sep #$20 SEP #$20 ; set A short -.387544 a0 04 00 ldy #$0004 LDY #$0004 -.387547 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.387549 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.38754b c2 20 rep #$20 REP #$20 ; set A long -.38754d a9 80 00 lda #$0080 LDA #$0080 -.387550 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET -.387554 e2 20 sep #$20 SEP #$20 ; set A short -.387556 a0 06 00 ldy #$0006 LDY #$0006 -.387559 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.38755b 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.38755d c2 20 rep #$20 REP #$20 ; set A long -.38755f a9 e0 00 lda #$00e0 LDA #$00E0 -.387562 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET -.387566 e2 20 sep #$20 SEP #$20 ; set A short -.387568 a0 09 00 ldy #$0009 LDY #$0009 -.38756b b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.38756d 29 0f and #$0f AND #$0F -.38756f 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.387571 a9 00 lda #$00 LDA #$00 -.387573 85 26 sta $26 STA OPL2_OPERATOR -.387575 c2 20 rep #$20 REP #$20 ; set A long -.387577 a9 20 00 lda #$0020 LDA #$0020 -.38757a 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET -.38757e e2 20 sep #$20 SEP #$20 ; set A short -.387580 a0 01 00 ldy #$0001 LDY #$0001 -.387583 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.387585 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.387587 c2 20 rep #$20 REP #$20 ; set A long -.387589 a9 40 00 lda #$0040 LDA #$0040 -.38758c 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET -.387590 e2 20 sep #$20 SEP #$20 ; set A short -.387592 a0 03 00 ldy #$0003 LDY #$0003 -.387595 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.387597 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.387599 c2 20 rep #$20 REP #$20 ; set A long -.38759b a9 60 00 lda #$0060 LDA #$0060 -.38759e 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET -.3875a2 e2 20 sep #$20 SEP #$20 ; set A short -.3875a4 a0 05 00 ldy #$0005 LDY #$0005 -.3875a7 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.3875a9 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.3875ab c2 20 rep #$20 REP #$20 ; set A long -.3875ad a9 80 00 lda #$0080 LDA #$0080 -.3875b0 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET -.3875b4 e2 20 sep #$20 SEP #$20 ; set A short -.3875b6 a0 71 00 ldy #$0071 LDY #$00071 -.3875b9 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.3875bb 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.3875bd c2 20 rep #$20 REP #$20 ; set A long -.3875bf a9 e0 00 lda #$00e0 LDA #$00E0 -.3875c2 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET -.3875c6 e2 20 sep #$20 SEP #$20 ; set A short -.3875c8 a0 09 00 ldy #$0009 LDY #$0009 -.3875cb b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.3875cd 29 f0 and #$f0 AND #$F0 -.3875cf 4a lsr a LSR A -.3875d0 4a lsr a LSR A -.3875d1 4a lsr a LSR A -.3875d2 4a lsr a LSR A -.3875d3 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.3875d5 a5 27 lda $27 LDA OPL2_CHANNEL -.3875d7 18 clc CLC -.3875d8 29 0f and #$0f AND #$0F ; This is just precaution, it should be between 0 to 8 -.3875da 69 c0 adc #$c0 ADC #$C0 -.3875dc 85 2a sta $2a STA OPL2_REG_OFFSET -.3875de a9 00 lda #$00 LDA #$00 -.3875e0 85 2b sta $2b STA OPL2_REG_OFFSET+1; -.3875e2 c2 30 rep #$30 REP #$30 ; set A&X long -.3875e4 18 clc CLC -.3875e5 a9 00 e7 lda #$e700 LDA #<>OPL3_R_BASE -.3875e8 65 2a adc $2a ADC OPL2_REG_OFFSET -.3875ea 85 2c sta $2c STA OPL2_IND_ADDY_LL -.3875ec a9 af 00 lda #$00af LDA #`OPL3_R_BASE -.3875ef 85 2e sta $2e STA OPL2_IND_ADDY_HL -.3875f1 e2 20 sep #$20 SEP #$20 ; set A short -.3875f3 a0 08 00 ldy #$0008 LDY #$0008 -.3875f6 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y -.3875f8 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] -.3875fa 7a ply PLY -.3875fb 60 rts RTS +>386a5a 43 90 44 91 45 46 92 47 note_array .byte $43, $90, $44, $91, $45, $46, $92, $47, $93, $41, $94, $42, $43 +>386a62 93 41 94 42 43 +.386a67 TuneInfo +>386a67 00 version .byte $00 ; bit 1 is RAD 1, bit 2 is RAD 2 +>386a68 00 songLength .byte $00 +>386a69 06 InitialSpeed .byte $06 +>386a6a 00 hasSlowTimer .byte $00 ;BOOL $00 = False, $01 = True +.386a6b RAD_INIT_PLAYER +.386a6b 22 b1 30 38 jsl $3830b1 JSL OPL2_INIT ; Init OPL2 +.386a6f 20 97 6c jsr $386c97 JSR RAD_ALL_NOTES_OFF +.386a72 a2 00 00 ldx #$0000 LDX #0 +.386a75 a9 00 lda #$00 LDA #0 +.386a77 RI_RESET +.386a77 9f 00 00 39 sta $390000,x STA PATTERNS,X +.386a7b e8 inx INX +.386a7c d0 f9 bne $386a77 BNE RI_RESET +.386a7e c2 30 rep #$30 REP #$30 ; set A&X long +.386a80 a9 00 80 lda #$8000 LDA #<>RAD_FILE_TEMP ; Set the Pointer where the File Begins +.386a83 85 08 sta $08 STA OPL2_ADDY_PTR_LO; +.386a85 a9 37 00 lda #$0037 LDA #<`RAD_FILE_TEMP +.386a88 85 0a sta $0a STA OPL2_ADDY_PTR_HI; +.386a8a e2 20 sep #$20 SEP #$20 ; set A short +.386a8c a0 10 00 ldy #$0010 LDY #$0010 +.386a8f b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386a91 c9 10 cmp #$10 CMP #$10 ; BCD version 1.0 or 2.1 +.386a93 d0 05 bne $386a9a BNE RI_LOAD_VERSION_21 +.386a95 22 f7 6a 38 jsl $386af7 JSL READ_VERSION_10 +.386a99 6b rtl RTL ; End of RAD_INIT_PLAYER +.386a9a RI_LOAD_VERSION_21 +.386a9a c9 21 cmp #$21 CMP #$21 +.386a9c d0 04 bne $386aa2 BNE RI_INVALID +.386a9e 22 a3 6a 38 jsl $386aa3 JSL READ_VERSION_21 +.386aa2 RI_INVALID +.386aa2 6b rtl RTL ; End of RAD_INIT_PLAYER +.386aa3 READ_VERSION_21 +.386aa3 a9 02 lda #$02 LDA #2 +.386aa5 8f 67 6a 38 sta $386a67 STA @lTuneInfo.version +.386aa9 20 b0 6a jsr $386ab0 JSR READ_TIMER +.386aac 20 82 6b jsr $386b82 JSR PARSER_RAD_FILE_INSTRUMENT_21; Parse the Instrument +.386aaf 6b rtl RTL ; End of READ_VERSION_21 +.386ab0 READ_TIMER +.386ab0 a0 11 00 ldy #$0011 LDY #$11 +.386ab3 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386ab5 89 40 bit #$40 BIT #$40 +.386ab7 f0 17 beq $386ad0 BEQ RT_NOT_SLOW +.386ab9 a9 01 lda #$01 LDA #1 +.386abb 8f 6a 6a 38 sta $386a6a STA @lTuneInfo.hasSlowTimer +.386abf a9 0f lda #$0f LDA #SLOW_TIMER +.386ac6 8d 66 01 sta $0166 STA TIMER0_CMP_M +.386ac9 a9 0c lda #$0c LDA #<`SLOW_TIMER +.386acb 8d 67 01 sta $0167 STA TIMER0_CMP_H +.386ace 80 23 bra $386af3 BRA SET_TIMER +.386ad0 RT_NOT_SLOW +.386ad0 89 20 bit #$20 BIT #$20 +.386ad2 f0 0a beq $386ade BEQ RT_NOT_BPM +.386ad4 c8 iny INY +.386ad5 c2 20 rep #$20 REP #$20 ; set A long +.386ad7 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386ad9 e2 20 sep #$20 SEP #$20 ; set A short +.386adb c8 iny INY +.386adc 80 15 bra $386af3 BRA SET_TIMER +.386ade RT_NOT_BPM +.386ade a9 00 lda #$00 LDA #0 +.386ae0 8f 6a 6a 38 sta $386a6a STA @lTuneInfo.hasSlowTimer +.386ae4 a9 98 lda #$98 LDA #FIFTY_HZ_COUNT +.386aeb 8d 66 01 sta $0166 STA TIMER0_CMP_M +.386aee a9 04 lda #$04 LDA #<`FIFTY_HZ_COUNT +.386af0 8d 67 01 sta $0167 STA TIMER0_CMP_H +.386af3 SET_TIMER +.386af3 20 0f 65 jsr $38650f JSR INIT_TIMER0 +.386af6 60 rts RTS +.386af7 READ_VERSION_10 +.386af7 a9 01 lda #$01 LDA #1 +.386af9 8f 67 6a 38 sta $386a67 STA @lTuneInfo.version +.386afd 20 15 6b jsr $386b15 JSR PARSER_RAD_FILE_INSTRUMENT_10; Parse the Instrument +.386b00 20 95 6b jsr $386b95 JSR PROCESS_ORDER_LIST_10 ; Parse the Order List +.386b03 20 ba 6b jsr $386bba JSR READ_PATTERNS_10 +.386b06 20 b0 6a jsr $386ab0 JSR READ_TIMER +.386b09 6b rtl RTL ; End of READ_VERSION_10 +>386b0a 07 01 08 02 09 03 0a 04 ADLIB_OFFSETS .byte 7,1,8,2,9,3,10,4,5,11,6 +>386b12 05 0b 06 +.386b15 PARSER_RAD_FILE_INSTRUMENT_10 +.386b15 c8 iny INY ; $11 bit 7: description, bit6: slow timer, bits4..0: speed +.386b16 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386b18 29 1f and #$1f AND #$1F +.386b1a 8f 69 6a 38 sta $386a69 STA @lTuneInfo.InitialSpeed +.386b1e b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386b20 29 80 and #$80 AND #$80 +.386b22 f0 07 beq $386b2b BEQ READ_INSTR_DATA +.386b24 Not_Done_With_Description +.386b24 c8 iny INY ; Move the Pointer Forward +.386b25 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386b27 c9 00 cmp #$00 CMP #$00 ; Check for the End of Text +.386b29 d0 f9 bne $386b24 BNE Not_Done_With_Description +.386b2b READ_INSTR_DATA +.386b2b c8 iny INY ; This points after either After Description or next to Offset 0x11 +.386b2c a9 38 lda #$38 LDA #<`INSTRUMENT_ACCORDN +.386b2e 85 f2 sta $f2 STA RAD_ADDR + 2 +.386b30 ProcessNextInstruments_10 +.386b30 e2 20 sep #$20 SEP #$20 ; set A short +.386b32 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; Read Instrument Number +.386b34 f0 4a beq $386b80 BEQ DoneProcessingInstrument_10 +.386b36 c2 20 rep #$20 REP #$20 ; set A long +.386b38 3a dec a DEC A +.386b39 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A +.386b3d a9 16 00 lda #$0016 LDA #INSTR_REC_LEN +.386b40 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B +.386b44 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT ; not sure why this one requires a long address - bank is still 0 +.386b48 18 clc CLC +.386b49 69 3b 10 adc #$103b ADC #<>INSTRUMENT_ACCORDN +.386b4c 85 f0 sta $f0 STA RAD_ADDR +.386b4e a9 00 00 lda #$0000 LDA #0 +.386b51 e2 20 sep #$20 SEP #$20 ; set A short +.386b53 c8 iny INY +.386b54 64 4e stz $4e STZ RAD_TEMP +.386b56 87 f0 sta [$f0] STA [RAD_ADDR] ; Not a drum instrument +.386b58 Transfer_Instrument_Info +.386b58 a6 4e ldx $4e LDX RAD_TEMP +.386b5a bf 0a 6b 38 lda $386b0a,x LDA ADLIB_OFFSETS,X ; RAD uses a different order for registers +.386b5e aa tax TAX +.386b5f b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; Read Register +.386b61 5a phy PHY +.386b62 9b txy TXY +.386b63 97 f0 sta [$f0],y STA [RAD_ADDR],Y ; Write to the instrument table +.386b65 7a ply PLY +.386b66 c8 iny INY +.386b67 e6 4e inc $4e INC RAD_TEMP +.386b69 a5 4e lda $4e LDA RAD_TEMP +.386b6b c9 0b cmp #$0b CMP #11 +.386b6d 90 e9 bcc $386b58 BCC Transfer_Instrument_Info +.386b6f 5a phy PHY ; store the position in the file on the stack +.386b70 a0 0c 00 ldy #$000c LDY #12 ; beginning of text +.386b73 a9 20 lda #$20 LDA #$20 +.386b75 BLANK_INSTR_DESCR +.386b75 97 f0 sta [$f0],y STA [RAD_ADDR],Y +.386b77 c8 iny INY +.386b78 c0 16 00 cpy #$0016 CPY #22 +.386b7b d0 f8 bne $386b75 BNE BLANK_INSTR_DESCR +.386b7d 7a ply PLY +.386b7e 80 b0 bra $386b30 BRA ProcessNextInstruments_10 +.386b80 DoneProcessingInstrument_10 +.386b80 c8 iny INY +.386b81 60 rts RTS +.386b82 PARSER_RAD_FILE_INSTRUMENT_21 +.386b82 PR_LOOP +.386b82 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386b84 c8 iny INY +.386b85 c9 00 cmp #$00 CMP #0 +.386b87 d0 f9 bne $386b82 BNE PR_LOOP +.386b89 a9 38 lda #$38 LDA #<`INSTRUMENT_ACCORDN +.386b8b 85 f2 sta $f2 STA RAD_ADDR + 2 +.386b8d ProcessNextInstruments_21 +.386b8d e2 20 sep #$20 SEP #$20 ; set A short +.386b8f b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; Read Instrument Number +.386b91 f0 00 beq $386b93 BEQ DoneProcessingInstrument_21 +.386b93 DoneProcessingInstrument_21 +.386b93 c8 iny INY +.386b94 60 rts RTS +.386b95 PROCESS_ORDER_LIST_10 +.386b95 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; Read Song Length +.386b97 8f 68 6a 38 sta $386a68 STA @lTuneInfo.songLength +.386b9b aa tax TAX +.386b9c c8 iny INY +.386b9d c2 20 rep #$20 REP #$20 ; set A long +.386b9f a9 24 fc lda #$fc24 LDA #<>ORDERS +.386ba2 85 f0 sta $f0 STA RAD_ADDR +.386ba4 a9 39 00 lda #$0039 LDA #<`ORDERS +.386ba7 85 f2 sta $f2 STA RAD_ADDR + 2 +.386ba9 e2 20 sep #$20 SEP #$20 ; set A short +.386bab READ_ORDER +.386bab b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386bad c8 iny INY +.386bae 87 f0 sta [$f0] STA [RAD_ADDR] +.386bb0 e6 f0 inc $f0 INC RAD_ADDR +.386bb2 b0 02 bcs $386bb6 BCS ORDER_CONTINUE +.386bb4 e6 f1 inc $f1 INC RAD_ADDR + 1 +.386bb6 ORDER_CONTINUE +.386bb6 ca dex DEX +.386bb7 d0 f2 bne $386bab BNE READ_ORDER +.386bb9 60 rts RTS +.386bba READ_PATTERNS_10 +.386bba 64 f3 stz $f3 STZ RAD_PATTRN +.386bbc a9 39 lda #$39 LDA #<`PATTERNS +.386bbe 85 f6 sta $f6 STA RAD_PTN_DEST + 2 +.386bc0 NEXT_PATTERN +.386bc0 c2 20 rep #$20 REP #$20 ; set A long +.386bc2 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386bc4 f0 1f beq $386be5 BEQ SKIP_PATTERN +.386bc6 5a phy PHY +.386bc7 a8 tay TAY +.386bc8 a5 f3 lda $f3 LDA RAD_PATTRN +.386bca 29 ff 00 and #$00ff AND #$00FF +.386bcd 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A +.386bd1 a9 01 07 lda #$0701 LDA #PATTERN_BYTES +.386bd4 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B +.386bd8 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT +.386bdc 1a inc a INC A ; skip the pattern byte +.386bdd 85 f4 sta $f4 STA RAD_PTN_DEST +.386bdf e2 20 sep #$20 SEP #$20 ; set A short +.386be1 20 f2 6b jsr $386bf2 JSR READ_PATTERN_10 +.386be4 7a ply PLY +.386be5 SKIP_PATTERN +.386be5 c8 iny INY +.386be6 c8 iny INY +.386be7 e2 20 sep #$20 SEP #$20 ; set A short +.386be9 e6 f3 inc $f3 INC RAD_PATTRN +.386beb a5 f3 lda $f3 LDA RAD_PATTRN +.386bed c9 20 cmp #$20 CMP #32 +.386bef d0 cf bne $386bc0 BNE NEXT_PATTERN +.386bf1 60 rts RTS +.386bf2 READ_PATTERN_10 +.386bf2 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; read the line number - bit 7 indicates the last line +.386bf4 8f 42 00 00 sta $000042 STA @lRAD_LINE +.386bf8 c8 iny INY +.386bf9 c2 20 rep #$20 REP #$20 ; set A long +.386bfb 29 7f 00 and #$007f AND #$7F +.386bfe 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A +.386c02 a9 1c 00 lda #$001c LDA #LINE_BYTES +.386c05 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B +.386c09 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT +.386c0d 1a inc a INC A ; skip the line number +.386c0e 8f fa 00 00 sta $0000fa STA @lRAD_LINE_PTR +.386c12 e2 20 sep #$20 SEP #$20 ; set A short +.386c14 READ_NOTE +.386c14 a6 fa ldx $fa LDX RAD_LINE_PTR ; X contains the offset in the destination memory +.386c16 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; channel - bit 7 indicates the last note +.386c18 c8 iny INY +.386c19 8f f9 00 00 sta $0000f9 STA @lRAD_LAST_NOTE +.386c1d 29 0f and #$0f AND #$F +.386c1f 8f f7 00 00 sta $0000f7 STA @lRAD_CHANNEL +.386c23 c2 20 rep #$20 REP #$20 ; set A long +.386c25 8a txa TXA +.386c26 18 clc CLC +.386c27 65 f7 adc $f7 ADC RAD_CHANNEL ; multiply channel by 3 +.386c29 65 f7 adc $f7 ADC RAD_CHANNEL +.386c2b 65 f7 adc $f7 ADC RAD_CHANNEL +.386c2d aa tax TAX +.386c2e e2 20 sep #$20 SEP #$20 ; set A short +.386c30 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; note / octave +.386c32 5a phy PHY +.386c33 9b txy TXY +.386c34 97 f4 sta [$f4],y STA [RAD_PTN_DEST],Y +.386c36 7a ply PLY +.386c37 c8 iny INY +.386c38 e8 inx INX +.386c39 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; instrument/effect +.386c3b 5a phy PHY +.386c3c 9b txy TXY +.386c3d 97 f4 sta [$f4],y STA [RAD_PTN_DEST],Y +.386c3f 7a ply PLY +.386c40 c8 iny INY +.386c41 e8 inx INX +.386c42 29 0f and #$0f AND #$F +.386c44 f0 09 beq $386c4f BEQ CHECK_LASTNOTE +.386c46 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y ; effect parameter +.386c48 5a phy PHY +.386c49 9b txy TXY +.386c4a 97 f4 sta [$f4],y STA [RAD_PTN_DEST],Y +.386c4c 7a ply PLY +.386c4d c8 iny INY +.386c4e e8 inx INX +.386c4f CHECK_LASTNOTE +.386c4f af f9 00 00 lda $0000f9 LDA @lRAD_LAST_NOTE +.386c53 10 bf bpl $386c14 BPL READ_NOTE +.386c55 af 42 00 00 lda $000042 LDA @lRAD_LINE +.386c59 10 97 bpl $386bf2 BPL READ_PATTERN_10 +.386c5b 60 rts RTS +.386c5c DRAW_BLANKS +.386c5c 5a phy PHY +.386c5d da phx PHX +.386c5e a2 12 00 ldx #$0012 LDX #18 +.386c61 a0 00 00 ldy #$0000 LDY #0 +.386c64 a9 2d lda #$2d LDA #'-' +.386c66 BL_NEXT +.386c66 97 0c sta [$0c],y STA [SCREENBEGIN], Y +.386c68 c8 iny INY +.386c69 ca dex DEX +.386c6a d0 fa bne $386c66 BNE BL_NEXT +.386c6c fa plx PLX +.386c6d 7a ply PLY +.386c6e 60 rts RTS +.386c6f DISPLAY_RAD_PTN_DEST +.386c6f 5a phy PHY +.386c70 a5 f6 lda $f6 LDA RAD_PTN_DEST+2 +.386c72 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386c75 c8 iny INY +.386c76 c8 iny INY +.386c77 a5 f5 lda $f5 LDA RAD_PTN_DEST+1 +.386c79 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386c7c c8 iny INY +.386c7d c8 iny INY +.386c7e a5 f4 lda $f4 LDA RAD_PTN_DEST +.386c80 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386c83 7a ply PLY +.386c84 60 rts RTS +.386c85 WRITE_A_LNG +.386c85 48 pha PHA +.386c86 48 pha PHA +.386c87 e2 20 sep #$20 SEP #$20 ; set A short +.386c89 68 pla PLA +.386c8a 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386c8d 88 dey DEY +.386c8e 88 dey DEY +.386c8f 68 pla PLA +.386c90 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386c93 c2 20 rep #$20 REP #$20 ; set A long +.386c95 68 pla PLA +.386c96 60 rts RTS +.386c97 RAD_ALL_NOTES_OFF +.386c97 5a phy PHY +.386c98 c2 20 rep #$20 REP #$20 ; set A long +.386c9a a9 00 e7 lda #$e700 LDA #<>OPL3_R_BASE +.386c9d 85 2c sta $2c STA OPL2_IND_ADDY_LL +.386c9f a9 af 00 lda #$00af LDA #`OPL3_R_BASE +.386ca2 85 2e sta $2e STA OPL2_IND_ADDY_LL + 2 +.386ca4 e2 20 sep #$20 SEP #$20 ; set A short +.386ca6 a0 a0 00 ldy #$00a0 LDY #$A0 +.386ca9 a9 00 lda #$00 LDA #0 +.386cab NEXT_NOTE_OFF +.386cab 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y +.386cad c8 iny INY +.386cae c0 b9 00 cpy #$00b9 CPY #$B9 +.386cb1 d0 f8 bne $386cab BNE NEXT_NOTE_OFF +.386cb3 7a ply PLY +.386cb4 60 rts RTS +.386cb5 RAD_PLAYNOTES +.386cb5 5a phy PHY +.386cb6 20 5c 6c jsr $386c5c JSR DRAW_BLANKS +.386cb9 c2 20 rep #$20 REP #$20 ; set A long +.386cbb af 18 0f 38 lda $380f18 LDA PATTERN_NUM +.386cbf 29 ff 00 and #$00ff AND #$FF +.386cc2 3a dec a DEC A ; start at 0 +.386cc3 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A +.386cc7 a9 01 07 lda #$0701 LDA #PATTERN_BYTES +.386cca 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B +.386cce af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT +.386cd2 1a inc a INC A ; skip the pattern number byte +.386cd3 85 f4 sta $f4 STA RAD_PTN_DEST +.386cd5 e2 20 sep #$20 SEP #$20 ; set A short +.386cd7 a9 39 lda #$39 LDA #<`PATTERNS +.386cd9 85 f6 sta $f6 STA RAD_PTN_DEST + 2 +.386cdb a0 a0 00 ldy #$00a0 LDY #SCREEN_WIDTH * 2 +.386cde 20 6f 6c jsr $386c6f JSR DISPLAY_RAD_PTN_DEST ; display the address of the pattern +.386ce1 c2 20 rep #$20 REP #$20 ; set A long +.386ce3 a5 6c lda $6c LDA LINE_NUM_HEX +.386ce5 29 7f 00 and #$007f AND #$7F +.386ce8 8f 00 01 00 sta $000100 STA @lUNSIGNED_MULT_A +.386cec a9 1c 00 lda #$001c LDA #LINE_BYTES +.386cef 8f 02 01 00 sta $000102 STA @lUNSIGNED_MULT_B +.386cf3 af 04 01 00 lda $000104 LDA @lUNSIGNED_MULT_RESULT +.386cf7 1a inc a INC A ; skip the line number byte +.386cf8 a0 52 00 ldy #$0052 LDY #SCREEN_WIDTH + 2 +.386cfb 20 85 6c jsr $386c85 JSR WRITE_A_LNG ; display the line offset from the pattern address +.386cfe a8 tay TAY ; Y contains the line offset +.386cff a9 00 00 lda #$0000 LDA #0 +.386d02 e2 20 sep #$20 SEP #$20 ; set A short +.386d04 64 28 stz $28 STZ OPL2_REG_REGION +.386d06 PN_NEXT_NOTE +.386d06 8f 27 00 00 sta $000027 STA @lOPL2_CHANNEL +.386d0a aa tax TAX +.386d0b bf b2 68 38 lda $3868b2,x LDA CHANNELS,X +.386d0f d0 05 bne $386d16 BNE PN_PLAY_NOTE +.386d11 c8 iny INY ; skip the channel data +.386d12 c8 iny INY +.386d13 c8 iny INY +.386d14 80 58 bra $386d6e BRA PN_CONTINUE +.386d16 PN_PLAY_NOTE +.386d16 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; octave/note +.386d18 29 7f and #$7f AND #$7F +.386d1a 20 d5 6e jsr $386ed5 JSR RAD_WRITE_OCT_NOTE +.386d1d b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; bit 7 is bit 4 of the instrument number +.386d1f 29 80 and #$80 AND #$80 +.386d21 4a lsr a LSR A +.386d22 4a lsr a LSR A +.386d23 4a lsr a LSR A +.386d24 85 4e sta $4e STA RAD_TEMP +.386d26 c8 iny INY +.386d27 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; instrument/effect +.386d29 29 f0 and #$f0 AND #$F0 +.386d2b 4a lsr a LSR A +.386d2c 4a lsr a LSR A +.386d2d 4a lsr a LSR A +.386d2e 4a lsr a LSR A +.386d2f 65 4e adc $4e ADC RAD_TEMP +.386d31 f0 14 beq $386d47 BEQ SKIP_INSTRUMENT +.386d33 3a dec a DEC A ; instruments are starting at 0 +.386d34 8f 6a 00 00 sta $00006a STA @lINSTR_NUMBER +.386d38 5a phy PHY +.386d39 a6 27 ldx $27 LDX OPL2_CHANNEL +.386d3b a9 00 lda #$00 LDA #0 +.386d3d eb xba XBA +.386d3e bf 18 10 38 lda $381018,x LDA @lregisterOffsets_operator0,X +.386d42 aa tax TAX +.386d43 20 4e 65 jsr $38654e JSR LOAD_INSTRUMENT +.386d46 7a ply PLY +.386d47 SKIP_INSTRUMENT +.386d47 af 30 00 00 lda $000030 LDA @lOPL2_NOTE +.386d4b f0 11 beq $386d5e BEQ SKIP_NOTE ; if the note is 0, don't play anything. +.386d4d c9 0f cmp #$0f CMP #$0F ; NOTE OFF +.386d4f f0 2b beq $386d7c BEQ RAD_NOTE_OFF +.386d51 c2 20 rep #$20 REP #$20 ; set A long +.386d53 5a phy PHY +.386d54 20 f5 37 jsr $3837f5 JSR OPL2_GET_REG_OFFSET +.386d57 22 01 32 38 jsl $383201 JSL OPL2_PLAYNOTE +.386d5b 7a ply PLY +.386d5c e2 20 sep #$20 SEP #$20 ; set A short +.386d5e SKIP_NOTE +.386d5e a9 00 lda #$00 LDA #0 +.386d60 eb xba XBA +.386d61 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; instrument/effect +.386d63 c8 iny INY +.386d64 29 0f and #$0f AND #$F +.386d66 f0 05 beq $386d6d BEQ SKIP_EFFECT +.386d68 0a asl a ASL A ; double bytes +.386d69 aa tax TAX +.386d6a fc 8d 6d jsr ($386d8d,x) JSR (RAD_EFFECT_TABLE,X) +.386d6d SKIP_EFFECT +.386d6d c8 iny INY +.386d6e PN_CONTINUE +.386d6e a9 00 lda #$00 LDA #0 ; clear B +.386d70 eb xba XBA +.386d71 af 27 00 00 lda $000027 LDA @lOPL2_CHANNEL +.386d75 1a inc a INC A +.386d76 c9 09 cmp #$09 CMP #9 +.386d78 d0 8c bne $386d06 BNE PN_NEXT_NOTE +.386d7a 7a ply PLY +.386d7b 60 rts RTS +.386d7c RAD_NOTE_OFF +.386d7c af 27 00 00 lda $000027 LDA @lOPL2_CHANNEL +.386d80 18 clc CLC +.386d81 69 b0 adc #$b0 ADC #$B0 +.386d83 85 2c sta $2c STA OPL2_IND_ADDY_LL +.386d85 a9 00 lda #$00 LDA #0 +.386d87 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386d89 c8 iny INY +.386d8a c8 iny INY +.386d8b 80 e1 bra $386d6e BRA PN_CONTINUE +.386d8d RAD_EFFECT_TABLE +>386d8d ad 6d .word <>RAD_EFFECT_NONE ; 00 +>386d8f 20 6e .word <>RAD_EFFECT_NOTE_SLIDE_UP ; 01 +>386d91 20 6e .word <>RAD_EFFECT_NOTE_SLIDE_DOWN ; 02 +>386d93 ad 6d .word <>RAD_EFFECT_NOTE_SLIDE_TO ; 03 +>386d95 ad 6d .word <>RAD_NOOP +>386d97 ad 6d .word <>RAD_EFFECT_NOTE_SLIDE_VOLUME ; 05 +>386d99 ad 6d .word <>RAD_NOOP +>386d9b ad 6d .word <>RAD_NOOP +>386d9d ad 6d .word <>RAD_NOOP +>386d9f ad 6d .word <>RAD_NOOP +>386da1 ae 6d .word <>RAD_EFFECT_VOLUME_SLIDE ; 0A +>386da3 ad 6d .word <>RAD_NOOP +>386da5 96 6e .word <>RAD_EFFECT_SET_VOLUME ; 0C +>386da7 05 6e .word <>RAD_EFFECT_PATTERN_BREAK ; 0D +>386da9 ad 6d .word <>RAD_NOOP +>386dab 16 6e .word <>RAD_EFFECT_SET_SPEED ; 0F +.386dad RAD_NOOP +.386dad RAD_EFFECT_NONE +.386dad RAD_EFFECT_NOTE_SLIDE_TO +.386dad RAD_EFFECT_NOTE_SLIDE_VOLUME +.386dad 60 rts RTS +.386dae RAD_EFFECT_VOLUME_SLIDE +.386dae 5a phy PHY +.386daf b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; store value of the effect in RAD_CHANNE_EFFCT +.386db1 85 4c sta $4c STA RAD_CHANNE_EFFCT +.386db3 c2 20 rep #$20 REP #$20 ; set A long +.386db5 a9 00 e7 lda #$e700 LDA #<>OPL3_R_BASE +.386db8 85 2c sta $2c STA OPL2_IND_ADDY_LL +.386dba a9 af 00 lda #$00af LDA #`OPL3_R_BASE +.386dbd 85 2e sta $2e STA OPL2_IND_ADDY_LL + 2 +.386dbf e2 30 sep #$30 SEP #$30 ; set A&X short +.386dc1 a5 27 lda $27 LDA OPL2_CHANNEL +.386dc3 aa tax TAX +.386dc4 bf 18 10 38 lda $381018,x LDA @lregisterOffsets_operator0,X +.386dc8 18 clc CLC +.386dc9 69 40 adc #$40 ADC #$40 +.386dcb a8 tay TAY +.386dcc b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y ; volume +.386dce 48 pha PHA +.386dcf 29 3f and #$3f AND #$3F +.386dd1 18 clc CLC +.386dd2 65 4c adc $4c ADC RAD_CHANNE_EFFCT ; check for values greater than 50 +.386dd4 c9 40 cmp #$40 CMP #$40 ; if there's an overflow, use #$3F (low volume) +.386dd6 90 02 bcc $386dda BCC NO_OVERFLOW_0 +.386dd8 a9 3f lda #$3f LDA #$3F +.386dda NO_OVERFLOW_0 +.386dda 29 3f and #$3f AND #$3F +.386ddc 85 4e sta $4e STA RAD_TEMP +.386dde 68 pla PLA +.386ddf 29 c0 and #$c0 AND #$C0 +.386de1 05 4e ora $4e ORA RAD_TEMP +.386de3 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y +.386de5 c8 iny INY +.386de6 c8 iny INY +.386de7 c8 iny INY +.386de8 b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y ; volume +.386dea 48 pha PHA +.386deb 29 3f and #$3f AND #$3F +.386ded 18 clc CLC +.386dee 65 4c adc $4c ADC RAD_CHANNE_EFFCT +.386df0 c9 40 cmp #$40 CMP #$40 ; if there's an overflow, use #$3F (low volume) +.386df2 90 02 bcc $386df6 BCC NO_OVERFLOW_1 +.386df4 a9 3f lda #$3f LDA #$3F +.386df6 NO_OVERFLOW_1 +.386df6 29 3f and #$3f AND #$3F +.386df8 85 4e sta $4e STA RAD_TEMP +.386dfa 68 pla PLA +.386dfb 29 c0 and #$c0 AND #$C0 +.386dfd 05 4e ora $4e ORA RAD_TEMP +.386dff 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y +.386e01 c2 10 rep #$10 REP #$10 ; set X long +.386e03 7a ply PLY +.386e04 60 rts RTS +.386e05 RAD_EFFECT_PATTERN_BREAK +.386e05 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; effect parameter +.386e07 3a dec a DEC A ; DECREMENT by 1, because the next timer interrupt will increment at the beginning +.386e08 85 6c sta $6c STA LINE_NUM_HEX +.386e0a a9 00 lda #$00 LDA #0 ; convert the effect to a decimal line number +.386e0c 8f 19 0f 38 sta $380f19 STA @lLINE_NUM_DEC +.386e10 20 9a 64 jsr $38649a JSR INCREMENT_ORDER +.386e13 7a ply PLY ; don't return to the calling method, return to the parent +.386e14 7a ply PLY +.386e15 60 rts RTS +.386e16 RAD_EFFECT_SET_SPEED +.386e16 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; effect parameter +.386e18 8f 69 6a 38 sta $386a69 STA @lTuneInfo.InitialSpeed +.386e1c 20 af 5a jsr $385aaf JSR DISPLAY_SPEED +.386e1f 60 rts RTS +.386e20 RAD_EFFECT_NOTE_SLIDE_UP +.386e20 RAD_EFFECT_NOTE_SLIDE_DOWN +.386e20 5a phy PHY +.386e21 4a lsr a LSR +.386e22 85 50 sta $50 STA RAD_EFFECT ; 1 slide down, 2 slide up +.386e24 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; store value of the effect in RAD_CHANNE_EFFCT +.386e26 85 4c sta $4c STA RAD_CHANNE_EFFCT +.386e28 c2 20 rep #$20 REP #$20 ; set A long +.386e2a a9 00 e7 lda #$e700 LDA #<>OPL3_R_BASE +.386e2d 85 2c sta $2c STA OPL2_IND_ADDY_LL +.386e2f a9 af 00 lda #$00af LDA #`OPL3_R_BASE +.386e32 85 2e sta $2e STA OPL2_IND_ADDY_LL + 2 +.386e34 e2 30 sep #$30 SEP #$30 ; set A&X short +.386e36 a5 27 lda $27 LDA OPL2_CHANNEL +.386e38 18 clc CLC +.386e39 69 a0 adc #$a0 ADC #$A0 +.386e3b a8 tay TAY +.386e3c b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y ; read low fnumber byte +.386e3e c2 10 rep #$10 REP #$10 ; set X long +.386e40 bb tyx TYX +.386e41 a0 5a 00 ldy #$005a LDY #SCREEN_WIDTH + 10 +.386e44 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386e47 9b txy TXY +.386e48 e2 10 sep #$10 SEP #$10 ; set X short +.386e4a 48 pha PHA ; store A on the stack +.386e4b 98 tya TYA +.386e4c 18 clc CLC +.386e4d 69 10 adc #$10 ADC #$10 +.386e4f a8 tay TAY +.386e50 b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y ; read bits 0,1 of high fnumber +.386e52 85 4e sta $4e STA RAD_TEMP ; store the entire value of $B0 +.386e54 c2 10 rep #$10 REP #$10 ; set X long +.386e56 bb tyx TYX +.386e57 a0 a8 00 ldy #$00a8 LDY #SCREEN_WIDTH * 2 + 8 +.386e5a 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386e5d 29 03 and #$03 AND #3 +.386e5f a0 58 00 ldy #$0058 LDY #SCREEN_WIDTH + 8 +.386e62 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386e65 9b txy TXY +.386e66 eb xba XBA +.386e67 68 pla PLA ; A is now the FNUMBER +.386e68 aa tax TAX ; X is now the FNUMBER +.386e69 a5 50 lda $50 LDA RAD_EFFECT +.386e6b 89 02 bit #$02 BIT #2 +.386e6d f0 0a beq $386e79 BEQ SLIDE_UP +.386e6f c2 20 rep #$20 REP #$20 ; set A long +.386e71 8a txa TXA +.386e72 38 sec SEC +.386e73 e5 4c sbc $4c SBC RAD_CHANNE_EFFCT ; substract the effect parameter +.386e75 e2 20 sep #$20 SEP #$20 ; set A short +.386e77 80 08 bra $386e81 BRA FINISH_SLIDE +.386e79 SLIDE_UP +.386e79 c2 20 rep #$20 REP #$20 ; set A long +.386e7b 8a txa TXA +.386e7c 18 clc CLC +.386e7d 65 4c adc $4c ADC RAD_CHANNE_EFFCT ; substract the effect parameter +.386e7f e2 20 sep #$20 SEP #$20 ; set A short +.386e81 FINISH_SLIDE +.386e81 e2 10 sep #$10 SEP #$10 ; set X short +.386e83 eb xba XBA +.386e84 29 03 and #$03 AND #3 +.386e86 05 4e ora $4e ORA RAD_TEMP +.386e88 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y +.386e8a 98 tya TYA +.386e8b 38 sec SEC +.386e8c e9 10 sbc #$10 SBC #$10 +.386e8e a8 tay TAY +.386e8f eb xba XBA +.386e90 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y +.386e92 c2 10 rep #$10 REP #$10 ; set X long +.386e94 7a ply PLY +.386e95 60 rts RTS +.386e96 RAD_EFFECT_SET_VOLUME +.386e96 5a phy PHY +.386e97 c2 20 rep #$20 REP #$20 ; set A long +.386e99 a9 00 e7 lda #$e700 LDA #<>OPL3_R_BASE +.386e9c 85 2c sta $2c STA OPL2_IND_ADDY_LL +.386e9e a9 af 00 lda #$00af LDA #`OPL3_R_BASE +.386ea1 85 2e sta $2e STA OPL2_IND_ADDY_LL + 2 +.386ea3 e2 20 sep #$20 SEP #$20 ; set A short +.386ea5 b7 f4 lda [$f4],y LDA [RAD_PTN_DEST],Y ; effect parameter +.386ea7 29 7f and #$7f AND #$7F +.386ea9 f0 01 beq $386eac BEQ HANDLE_ZERO +.386eab 3a dec a DEC A +.386eac HANDLE_ZERO +.386eac 49 3f eor #$3f EOR #$3F ; complement +.386eae 85 4e sta $4e STA RAD_TEMP +.386eb0 e2 10 sep #$10 SEP #$10 ; set X short +.386eb2 a6 27 ldx $27 LDX OPL2_CHANNEL +.386eb4 bf 18 10 38 lda $381018,x LDA @lregisterOffsets_operator0,X +.386eb8 18 clc CLC +.386eb9 69 40 adc #$40 ADC #$40 +.386ebb a8 tay TAY +.386ebc b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y +.386ebe 29 c0 and #$c0 AND #$C0 ; +.386ec0 18 clc CLC +.386ec1 65 4e adc $4e ADC RAD_TEMP +.386ec3 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y +.386ec5 c8 iny INY +.386ec6 c8 iny INY +.386ec7 c8 iny INY +.386ec8 b7 2c lda [$2c],y LDA [OPL2_IND_ADDY_LL],Y +.386eca 29 c0 and #$c0 AND #$C0 ; +.386ecc 18 clc CLC +.386ecd 65 4e adc $4e ADC RAD_TEMP +.386ecf 97 2c sta [$2c],y STA [OPL2_IND_ADDY_LL],Y +.386ed1 c2 10 rep #$10 REP #$10 ; set X long +.386ed3 7a ply PLY +.386ed4 60 rts RTS +.386ed5 RAD_WRITE_OCT_NOTE +.386ed5 5a phy PHY +.386ed6 48 pha PHA +.386ed7 48 pha PHA +.386ed8 af 27 00 00 lda $000027 LDA @lOPL2_CHANNEL +.386edc 0a asl a ASL A ; multiply the channel by 2 for the screen position +.386edd a8 tay TAY +.386ede 68 pla PLA +.386edf f0 03 beq $386ee4 BEQ DONT_DISPLAY_00 +.386ee1 20 b1 57 jsr $3857b1 JSR WRITE_HEX +.386ee4 DONT_DISPLAY_00 +.386ee4 29 70 and #$70 AND #$70 ; octave +.386ee6 4a lsr a LSR +.386ee7 4a lsr a LSR +.386ee8 4a lsr a LSR +.386ee9 4a lsr a LSR +.386eea 8f 31 00 00 sta $000031 STA @lOPL2_OCTAVE +.386eee 68 pla PLA +.386eef 29 0f and #$0f AND #$0F ; note +.386ef1 8f 30 00 00 sta $000030 STA @lOPL2_NOTE +.386ef5 7a ply PLY +.386ef6 60 rts RTS +.386ef7 RAD_SETINSTRUMENT +.386ef7 5a phy PHY +.386ef8 e2 20 sep #$20 SEP #$20 ; set A short +.386efa a9 01 lda #$01 LDA #$01 +.386efc 85 26 sta $26 STA OPL2_OPERATOR +.386efe c2 20 rep #$20 REP #$20 ; set A long +.386f00 a9 38 00 lda #$0038 LDA #<`INSTRUMENT_ACCORDN +.386f03 85 0a sta $0a STA OPL2_ADDY_PTR_HI +.386f05 a5 32 lda $32 LDA OPL2_PARAMETER0 +.386f07 29 ff 00 and #$00ff AND #$00FF +.386f0a 3a dec a DEC A +.386f0b 0a asl a ASL A +.386f0c 0a asl a ASL A +.386f0d 0a asl a ASL A +.386f0e 0a asl a ASL A +.386f0f 18 clc CLC +.386f10 69 3b 10 adc #$103b ADC #<>INSTRUMENT_ACCORDN +.386f13 85 08 sta $08 STA OPL2_ADDY_PTR_LO +.386f15 c2 20 rep #$20 REP #$20 ; set A long +.386f17 a9 20 00 lda #$0020 LDA #$0020 +.386f1a 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET +.386f1e e2 20 sep #$20 SEP #$20 ; set A short +.386f20 a0 00 00 ldy #$0000 LDY #$0000 +.386f23 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386f25 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386f27 c2 20 rep #$20 REP #$20 ; set A long +.386f29 a9 40 00 lda #$0040 LDA #$0040 +.386f2c 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET +.386f30 e2 20 sep #$20 SEP #$20 ; set A short +.386f32 a0 02 00 ldy #$0002 LDY #$0002 +.386f35 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386f37 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386f39 c2 20 rep #$20 REP #$20 ; set A long +.386f3b a9 60 00 lda #$0060 LDA #$0060 +.386f3e 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET +.386f42 e2 20 sep #$20 SEP #$20 ; set A short +.386f44 a0 04 00 ldy #$0004 LDY #$0004 +.386f47 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386f49 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386f4b c2 20 rep #$20 REP #$20 ; set A long +.386f4d a9 80 00 lda #$0080 LDA #$0080 +.386f50 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET +.386f54 e2 20 sep #$20 SEP #$20 ; set A short +.386f56 a0 06 00 ldy #$0006 LDY #$0006 +.386f59 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386f5b 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386f5d c2 20 rep #$20 REP #$20 ; set A long +.386f5f a9 e0 00 lda #$00e0 LDA #$00E0 +.386f62 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET +.386f66 e2 20 sep #$20 SEP #$20 ; set A short +.386f68 a0 09 00 ldy #$0009 LDY #$0009 +.386f6b b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386f6d 29 0f and #$0f AND #$0F +.386f6f 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386f71 a9 00 lda #$00 LDA #$00 +.386f73 85 26 sta $26 STA OPL2_OPERATOR +.386f75 c2 20 rep #$20 REP #$20 ; set A long +.386f77 a9 20 00 lda #$0020 LDA #$0020 +.386f7a 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET +.386f7e e2 20 sep #$20 SEP #$20 ; set A short +.386f80 a0 01 00 ldy #$0001 LDY #$0001 +.386f83 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386f85 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386f87 c2 20 rep #$20 REP #$20 ; set A long +.386f89 a9 40 00 lda #$0040 LDA #$0040 +.386f8c 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET +.386f90 e2 20 sep #$20 SEP #$20 ; set A short +.386f92 a0 03 00 ldy #$0003 LDY #$0003 +.386f95 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386f97 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386f99 c2 20 rep #$20 REP #$20 ; set A long +.386f9b a9 60 00 lda #$0060 LDA #$0060 +.386f9e 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET +.386fa2 e2 20 sep #$20 SEP #$20 ; set A short +.386fa4 a0 05 00 ldy #$0005 LDY #$0005 +.386fa7 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386fa9 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386fab c2 20 rep #$20 REP #$20 ; set A long +.386fad a9 80 00 lda #$0080 LDA #$0080 +.386fb0 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET +.386fb4 e2 20 sep #$20 SEP #$20 ; set A short +.386fb6 a0 71 00 ldy #$0071 LDY #$00071 +.386fb9 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386fbb 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386fbd c2 20 rep #$20 REP #$20 ; set A long +.386fbf a9 e0 00 lda #$00e0 LDA #$00E0 +.386fc2 22 f5 37 38 jsl $3837f5 JSL OPL2_GET_REG_OFFSET +.386fc6 e2 20 sep #$20 SEP #$20 ; set A short +.386fc8 a0 09 00 ldy #$0009 LDY #$0009 +.386fcb b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386fcd 29 f0 and #$f0 AND #$F0 +.386fcf 4a lsr a LSR A +.386fd0 4a lsr a LSR A +.386fd1 4a lsr a LSR A +.386fd2 4a lsr a LSR A +.386fd3 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386fd5 a5 27 lda $27 LDA OPL2_CHANNEL +.386fd7 18 clc CLC +.386fd8 29 0f and #$0f AND #$0F ; This is just precaution, it should be between 0 to 8 +.386fda 69 c0 adc #$c0 ADC #$C0 +.386fdc 85 2a sta $2a STA OPL2_REG_OFFSET +.386fde a9 00 lda #$00 LDA #$00 +.386fe0 85 2b sta $2b STA OPL2_REG_OFFSET+1; +.386fe2 c2 30 rep #$30 REP #$30 ; set A&X long +.386fe4 18 clc CLC +.386fe5 a9 00 e7 lda #$e700 LDA #<>OPL3_R_BASE +.386fe8 65 2a adc $2a ADC OPL2_REG_OFFSET +.386fea 85 2c sta $2c STA OPL2_IND_ADDY_LL +.386fec a9 af 00 lda #$00af LDA #`OPL3_R_BASE +.386fef 85 2e sta $2e STA OPL2_IND_ADDY_HL +.386ff1 e2 20 sep #$20 SEP #$20 ; set A short +.386ff3 a0 08 00 ldy #$0008 LDY #$0008 +.386ff6 b7 08 lda [$08],y LDA [OPL2_ADDY_PTR_LO],Y +.386ff8 87 2c sta [$2c] STA [OPL2_IND_ADDY_LL] +.386ffa 7a ply PLY +.386ffb 60 rts RTS ;****** Return to file: tracker.asm