From: Tobias Girstmair Date: Tue, 27 Apr 2021 07:58:05 +0000 (+0200) Subject: fix debug signal X-Git-Url: https://git.gir.st/Chiptunes-pms150c.git/commitdiff_plain/f60af06d2afe4e430fc3b88dfda0ef7bc8cbdf1e fix debug signal the binary representation of set1 and set0 make it possible to do this in-place. also commenting out the calibration placeholder, so we don't break it during re-programming. --- diff --git a/bsv.asm b/bsv.asm index df121a9..c91510c 100644 --- a/bsv.asm +++ b/bsv.asm @@ -205,19 +205,19 @@ init: MOV a, #active_clock MOV clkmd, a ; switch to IHRC - ;; .org 0x46 ; comment out on 2nd iteration - ; calibration placeholder: - AND a, #'R' - AND a, #'C' - AND a, #1 ; IHRC - AND a, #( calib_freq ) - AND a, #( calib_freq>>8 ) - AND a, #( calib_freq>>16 ) - AND a, #( calib_freq>>24 ) - AND a, #( calib_vdd ) - AND a, #( calib_vdd>>8 ) - AND a, #ihrcr - ;; .org 0x5a + ;; .org 0xe8 ; comment out on 2nd iteration + ;; ; calibration placeholder: + ;; AND a, #'R' + ;; AND a, #'C' + ;; AND a, #1 ; IHRC + ;; AND a, #( calib_freq ) + ;; AND a, #( calib_freq>>8 ) + ;; AND a, #( calib_freq>>16 ) + ;; AND a, #( calib_freq>>24 ) + ;; AND a, #( calib_vdd ) + ;; AND a, #( calib_vdd>>8 ) + ;; AND a, #ihrcr + .org 0xfc ;stack setup: MOV a, #stack_start @@ -243,6 +243,7 @@ init: MOV tm2c, a ; timer2: IHRC, PA4, PWM, not inverted MOV a, #(( 0<<7 | 1<<5 | 0<<0 )) MOV tm2s, a ; 8bit, /4 prescaler, divide by (0+1) + ;XXX: increase pwm base frequency (/1) -> (4*4.096mhz)/(2^8) = 64khz ;timer16/ivr setup ;mov a, #(( 0<<0 | 1<<3 | 4<<5 )) ; ovf@bit8 (512cy; §9.2.5), clk/4, ihrc @@ -476,7 +477,7 @@ interrupt: ADDC i1 ADDC i2 - SET1 pa, #6 ; debug + SET0 pa, #6 ; debug ivr_end: POP af RETI