From 436ee2f087619cdbc21cdd984770a35169bb556a Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 12 Mar 2022 14:16:13 -0500 Subject: [PATCH] hgr: particle, make basic bot version doesn't display well on the bot, single pixels never do --- basic/appleiibot/Makefile | 8 ++++- basic/appleiibot/particle_hgr.bas | 2 ++ graphics/hgr/particle/Makefile | 4 +-- graphics/hgr/particle/particle_hgr_bot.s | 39 +++++++++++++++++------- 4 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 basic/appleiibot/particle_hgr.bas diff --git a/basic/appleiibot/Makefile b/basic/appleiibot/Makefile index ffdca0f9..cfc7dddd 100644 --- a/basic/appleiibot/Makefile +++ b/basic/appleiibot/Makefile @@ -21,7 +21,8 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \ FIREWORKS.BAS THINKING.BAS ARCS.BAS WIRE_HGR.BAS STATIC.BAS \ OVAL.BAS OVAL_HGR.BAS MOVING.BAS THICK_SINE.BAS TURKEY.BAS \ FLAME_HGR.BAS RECT.BAS SNOWY.BAS EDGAR.BAS OOPS4.BAS OOPS3.BAS \ - HORROR.BAS DIAMOND.BAS LEMM.BAS OOPS.BAS SPLIT.BAS PARTICLE.BAS + HORROR.BAS DIAMOND.BAS LEMM.BAS OOPS.BAS SPLIT.BAS PARTICLE.BAS \ + PARTICLE_HGR.BAS # cp $(EMPTY_DISK)/empty.dsk appleiibot.dsk cp empty.dsk appleiibot.dsk $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD @@ -117,6 +118,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \ $(DOS33) -y appleiibot.dsk SAVE A OOPS.BAS $(DOS33) -y appleiibot.dsk SAVE A SPLIT.BAS $(DOS33) -y appleiibot.dsk SAVE A PARTICLE.BAS + $(DOS33) -y appleiibot.dsk SAVE A PARTICLE_HGR.BAS #### @@ -663,6 +665,10 @@ SPLIT.BAS: split.bas PARTICLE.BAS: particle.bas $(TOKENIZE) < particle.bas > PARTICLE.BAS +#### + +PARTICLE_HGR.BAS: particle_hgr.bas + $(TOKENIZE) < particle_hgr.bas > PARTICLE_HGR.BAS #### diff --git a/basic/appleiibot/particle_hgr.bas b/basic/appleiibot/particle_hgr.bas new file mode 100644 index 00000000..cdeb2379 --- /dev/null +++ b/basic/appleiibot/particle_hgr.bas @@ -0,0 +1,2 @@ +1FORI=0TO138:POKE877+I,4*PEEK(2125+I)-204+(PEEK(2264+I/3)-35)/4^(I-INT(I/3)*3):NEXT +2&"-ho/foWB]2TlQCb/:a2;['8HpM]S\a3;9E0;Y3;r3<]2;8Q3;Y3.bbS:]RY3:]LU2;V5Y1;;d2eMLY0;;d25nY3:j3/liVqTlYEb3;]2;[3;HpM]U7T>WTBE9CW2E`PCD6:6@m5GEN3[S3'C3'S#;#T$%4''X3''4@+A;/A'+U@#%4#D1)4Z'3& diff --git a/graphics/hgr/particle/Makefile b/graphics/hgr/particle/Makefile index be34299e..122575e3 100644 --- a/graphics/hgr/particle/Makefile +++ b/graphics/hgr/particle/Makefile @@ -16,7 +16,7 @@ particle_hgr.dsk: $(DOS33) HELLO PARTICLE_HGR PARTICLE_HGR_BOT cp $(EMPTY_DISK)/empty.dsk particle_hgr.dsk $(DOS33) -y particle_hgr.dsk SAVE A HELLO $(DOS33) -y particle_hgr.dsk BSAVE -a 0xc00 PARTICLE_HGR - $(DOS33) -y particle_hgr.dsk BSAVE -a 0x36C PARTICLE_HGR_BOT + $(DOS33) -y particle_hgr.dsk BSAVE -a 0x36D PARTICLE_HGR_BOT ### @@ -34,7 +34,7 @@ particle_hgr.o: particle_hgr.s ### PARTICLE_HGR_BOT: particle_hgr_bot.o - ld65 -o PARTICLE_HGR_BOT particle_hgr_bot.o -C $(LINKERSCRIPTS)/apple2_36c.inc + ld65 -o PARTICLE_HGR_BOT particle_hgr_bot.o -C $(LINKERSCRIPTS)/apple2_36d.inc particle_hgr_bot.o: particle_hgr_bot.s ca65 -o particle_hgr_bot.o particle_hgr_bot.s -l particle_hgr_bot.lst diff --git a/graphics/hgr/particle/particle_hgr_bot.s b/graphics/hgr/particle/particle_hgr_bot.s index 25862e7b..c3488f28 100644 --- a/graphics/hgr/particle/particle_hgr_bot.s +++ b/graphics/hgr/particle/particle_hgr_bot.s @@ -52,24 +52,28 @@ main_loop: ; lda #100 ; jsr WAIT - lda #0 ; already 0 from wait - sta HGR_COLOR - ldx #PARTICLES - stx PARTICLE - stx PARTICLE2 + + ldy #PARTICLES clear_loop: - ldy PARTICLE + lda #0 ; already 0 from wait + sta HGR_COLOR + + tya + pha ldx particle_x,Y lda particle_y,Y ldy #0 jsr HPLOT0 ; plot at (Y,X), (A) - dec PARTICLE - bpl clear_loop + pla + tay + +; dey +; bpl clear_loop @@ -78,10 +82,12 @@ clear_loop: ; ldx #PARTICLES draw_particles_loop: - ldy PARTICLE2 tya tax +; txa +; tay + ; adjust x lda particle_x,Y @@ -145,17 +151,25 @@ y_good: lda #$ff sta HGR_COLOR + tya + pha + ldx particle_x,Y lda particle_y,Y ldy #0 jsr HPLOT0 ; plot at (Y,X), (A) - dec PARTICLE2 - bpl draw_particles_loop + pla + tay + + dey +; bpl draw_particles_loop + bpl clear_loop bmi main_loop + ; -8 to 8 ; batari RNG @@ -177,4 +191,7 @@ noeor: ; need this to be at $3F5 + ; we are 139 long so + ; $3F5 - 136 = 36D + jmp particle