From 3e7be7622774c89b9f173375d8f87529f900296f Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 13 Jun 2020 23:09:09 -0400 Subject: [PATCH] dsr_shape: update some routines used when debugging shapes --- hgr-utils/dump_table.c | 22 ++- shapetable_party/person_old5.s | 280 --------------------------------- 2 files changed, 20 insertions(+), 282 deletions(-) delete mode 100644 shapetable_party/person_old5.s diff --git a/hgr-utils/dump_table.c b/hgr-utils/dump_table.c index b10d6faa..9d0bfca5 100644 --- a/hgr-utils/dump_table.c +++ b/hgr-utils/dump_table.c @@ -21,6 +21,9 @@ int main(int argc, char **argv) { int h,l; int num_shapes=0,offset; int a,b,c; + short offsets[256]; + /* applesoft indexes from 1 not 0 */ + int shape_num=1; l=fgetc(stdin); h=fgetc(stdin); @@ -39,10 +42,21 @@ int main(int argc, char **argv) { for(i=0;i>3)&0x7; c=(ch>>6)&0x3; - printf("%d:\t%x ",offset,ch); + printf("$%X:\t%x ",offset,ch); if ((c==0) && (b==0) && (a==0)) { printf("END!\n"); + shape_num++; + if (shape_num $20) - - jsr xdraw ; 3 ; xdraw on page 0 - - asl HGR_PAGE ; 2 ; switch back to page1 $20 -> $40 - - ; clc ; carry should always be 0 from asl - lda XPOS ; 2 - adc #16 ; 2 - sta XPOS ; 2 - cmp #240 ; 2 - bcc crowd_loop ; 2 - - ; get ready for DSR loop - - ldx #shape_person - -rot_smc: - lda OUR_ROT ; set rotation - - jmp XDRAW0 ; XDRAW 1 AT X,Y - ; Both A and X are 0 at exit - - - ;========================== - ; draw/beep/undraw - ;========================== -draw_beep: - jsr xdraw ; draw - jsr beep ; make noise/delay - - ldy #24 - sty tone_smc+1 - -done_forever: - lda FRAME - beq done_forever - - jmp xdraw ; draw - - -shape_person: -; Person, shoulders up - -;.byte $01,$00,$04,$00, -.byte $2d,$25,$3c,$24 -.byte $2c,$2c,$35,$37,$6f,$25,$16,$3f -.byte $77,$2d,$1e,$37,$2d,$2d,$15,$3f -.byte $3f,$3f,$3f,$3f,$07,$00 - -shape_arm: -;.byte $49,$49,$49,$24 -;.byte $24,$24,$ac,$36,$36,$36,$00 - -shape_dsr: -.byte $2d,$36,$ff,$3f -.byte $24,$ad,$22,$24,$94,$21,$2c,$4d -.byte $91,$3f,$36,$00 - - - ;=========================== - ; BEEP - ;=========================== -beep: - lda FRAME - - and #$1f - cmp #$1f - beq nobeep - - and #$3 - beq actual_beep - -nobeep: - lda #100 - jmp WAIT - -actual_beep: - ; BEEP - ; repeat 30 times - lda #30 ; 2 -tone1_loop: - ldy #21 ; 2 - jsr delay_tone ; 3 - - ldy #24 ; 2 - jsr delay_tone ; 3 - -tone_smc: - ldy #21 ; 2 - jsr delay_tone ; 3 - - sec ; 1 - sbc #1 ; 2 - bne tone1_loop ; 2 - - rts ; 1 - - - ; Try X=6 Y=21 cycles=757 - ; Try X=6 Y=24 cycles=865 - ; Try X=7 Y=235 cycles=9636 - -delay_tone: -loopC: ldx #6 ; 2 -loopD: dex ; 1 - bne loopD ; 2 - dey ; 1 - bne loopC ; 2 - - bit SPEAKER ; 3 ; click speaker - - rts ; 1 -