diff --git a/demosplash/appleII_intro.s b/demosplash/appleII_intro.s index 63d24449..342163fa 100644 --- a/demosplash/appleII_intro.s +++ b/demosplash/appleII_intro.s @@ -7,8 +7,8 @@ appleII_intro: ;=================== ; init screen - jsr TEXT - jsr HOME +; jsr TEXT +; jsr HOME bit KEYRESET ;=================== diff --git a/demosplash/create_update_type1.s b/demosplash/create_update_type1.s index 84fbabc8..fecd018a 100644 --- a/demosplash/create_update_type1.s +++ b/demosplash/create_update_type1.s @@ -2,7 +2,7 @@ ; Autogenerates code that does interleaved Page0/Page1 lores mode ; but leaving room for 14 pixels/line of per-scanline color -UPDATE_START = $9000 +UPDATE_START = $9800 DEFAULT_COLOR = $0 diff --git a/demosplash/create_update_type2.s b/demosplash/create_update_type2.s index d2028b92..b30f270a 100644 --- a/demosplash/create_update_type2.s +++ b/demosplash/create_update_type2.s @@ -2,9 +2,9 @@ ; Autogenerates code for Type2 (escape) ; First 9 (?) lines = text mode - ; + ; -UPDATE2_START = $9000 +UPDATE2_START = $9800 ;DEFAULT_COLOR = $0 @@ -62,50 +62,50 @@ setup_update_type2: ; add call to TEXT lda #$2c ; bit C051 ; 4 - sta $9003 + sta UPDATE2_START+3 ; $9003 lda #$51 - sta $9004 + sta UPDATE2_START+4 ; $9004 lda #$c0 - sta $9005 + sta UPDATE2_START+5 ; $9005 lda #$A5 ; lda ZERO ; 3 - sta $9006 + sta UPDATE2_START+6 ; $9006 lda #$FA - sta $9007 + sta UPDATE2_START+7 ; $9007 lda #$A2 ; ldx, 1 ; 3 - sta $9008 + sta UPDATE2_START+8 ; $9008 lda #$01 - sta $9009 + sta UPDATE2_START+9 ; $9009 ; set first 9 lines to PAGE0 lda #$54 - sta $9030 - sta $908E - sta $90EC - sta $914A + sta UPDATE2_START+$30 ; $9030 + sta UPDATE2_START+$8E ; $908E + sta UPDATE2_START+$EC ; $90EC + sta UPDATE2_START+$14A ; $914A ; add call to GRAPHICS ; line 9 (91a7) lda #$2c ; bit C051 ; 4 - sta $91aa + sta UPDATE2_START+$1aa ; $91aa lda #$50 - sta $91ab + sta UPDATE2_START+$1ab ; $91ab lda #$c0 - sta $91ac + sta UPDATE2_START+$1ac ; $91ac lda #$A5 ; lda ZERO ; 3 - sta $91ad + sta UPDATE2_START+$1ad ; $91ad lda #$FA - sta $91ae + sta UPDATE2_START+$1ae ; $91ae lda #$A2 ; ldx, 1 ; 3 - sta $91af + sta UPDATE2_START+$1af ; $91af lda #$01 - sta $91b0 + sta UPDATE2_START+$1b0 ; $91b0 ;==================== ;==================== diff --git a/demosplash/credits.s b/demosplash/credits.s index 0ff34992..4e379e4e 100644 --- a/demosplash/credits.s +++ b/demosplash/credits.s @@ -8,8 +8,8 @@ credits: ;=================== ; init screen - jsr TEXT - jsr HOME +; jsr TEXT +; jsr HOME bit KEYRESET ;=================== @@ -37,24 +37,24 @@ credits: ; 0 34 78 12 5 4 78 12 56 9 ; 11 1 2 22 33 33 3 lda #$54 - sta $9001+(49*3) - sta $9001+(49*7) - sta $9001+(49*11) - sta $9001+(49*15) - sta $9001+(49*27) - sta $9001+(49*31) - sta $9001+(49*35) - sta $9001+(49*39) + sta UPDATE_START+1+(49*3) + sta UPDATE_START+1+(49*7) + sta UPDATE_START+1+(49*11) + sta UPDATE_START+1+(49*15) + sta UPDATE_START+1+(49*27) + sta UPDATE_START+1+(49*31) + sta UPDATE_START+1+(49*35) + sta UPDATE_START+1+(49*39) lda #$55 - sta $9001+(49*0) - sta $9001+(49*4) - sta $9001+(49*8) - sta $9001+(49*12) - sta $9001+(49*24) - sta $9001+(49*28) - sta $9001+(49*32) - sta $9001+(49*36) + sta UPDATE_START+1+(49*0) + sta UPDATE_START+1+(49*4) + sta UPDATE_START+1+(49*8) + sta UPDATE_START+1+(49*12) + sta UPDATE_START+1+(49*24) + sta UPDATE_START+1+(49*28) + sta UPDATE_START+1+(49*32) + sta UPDATE_START+1+(49*36) ;============================= @@ -158,7 +158,7 @@ tloopB: dex ; 2 credits_loop: - jsr $9000 + jsr $9800 ;====================================================== ; We have 4550 cycles in the vblank, use them wisely diff --git a/demosplash/demosplash.s b/demosplash/demosplash.s index d1ccd377..26623105 100644 --- a/demosplash/demosplash.s +++ b/demosplash/demosplash.s @@ -18,14 +18,21 @@ demosplash2019: jsr clear_ay_both jsr pt3_init_song + ;==================================== + ; turn on language card + ; enable read/write, use 1st 4k bank +; lda $C08B +; lda $C08B ;==================================== ; generate 4 patterns worth of music - ; at address $9000 + ; at address $D000-$FC00 + ; page offset lda #0 sta FRAME_PAGE + ; offset within page lda #0 sta FRAME_OFFSET @@ -35,27 +42,64 @@ frame_decode_loop: jsr pt3_write_frame inc FRAME_OFFSET + + lda FRAME_OFFSET + cmp #59 ; FIXME: make this depend on song + ; hardcoding for 59 for our song bne frame_decode_loop - inc r0_wrsmc+2 ; 6 - inc r1_wrsmc+2 ; 6 - inc r2_wrsmc+2 ; 6 - inc r4_wrsmc+2 ; 6 - inc r13_wrsmc+2 ; 6 - inc r6_wrsmc+2 ; 6 - inc r7_wrsmc+2 ; 6 - inc r8_wrsmc+2 ; 6 - inc r9_wrsmc+2 ; 6 - inc r11_wrsmc+2 ; 6 - inc r12_wrsmc+2 ; 6 + ; add 11 to all of the output pointers +.if 0 + clc + lda r0_wrsmc+2 + adc #$b + sta r0_wrsmc+2 + lda r1_wrsmc+2 + adc #$b + sta r1_wrsmc+2 + + lda r2_wrsmc+2 + adc #$b + sta r2_wrsmc+2 + + lda r4_wrsmc+2 + adc #$b + sta r4_wrsmc+2 + + lda r13_wrsmc+2 + adc #$b + sta r13_wrsmc+2 + + lda r6_wrsmc+2 + adc #$b + sta r6_wrsmc+2 + + lda r7_wrsmc+2 + adc #$b + sta r7_wrsmc+2 + + lda r8_wrsmc+2 + adc #$b + sta r8_wrsmc+2 + + lda r9_wrsmc+2 + adc #$b + sta r9_wrsmc+2 + + lda r11_wrsmc+2 + adc #$b + sta r11_wrsmc+2 + + lda r12_wrsmc+2 + adc #$b + sta r12_wrsmc+2 +.endif inc FRAME_PAGE lda FRAME_PAGE - - - cmp #3 + cmp #4 bne frame_decode_loop lda #0 @@ -113,7 +157,8 @@ frame_decode_loop: ; start irq music ;======================== - cli ; enable interrupts +nop +; cli ; enable interrupts ;=========================== ; opening book scene diff --git a/demosplash/escape.s b/demosplash/escape.s index d35a154d..a2081c69 100644 --- a/demosplash/escape.s +++ b/demosplash/escape.s @@ -9,8 +9,8 @@ escape: ;=================== ; init screen - jsr TEXT - jsr HOME +; jsr TEXT +; jsr HOME bit KEYRESET ;=================== @@ -173,7 +173,7 @@ loopRR: dex ; 2 sprites_display_loop: - jsr $9000 + jsr $9800 ;.include "sprites_screen.s" ;====================================================== @@ -1540,8 +1540,6 @@ escape_keys: .byte ' '+$80,30 .byte 27+$80,2 - - escape_keys_after: .assert >escape_keys_before = >escape_keys_after, error, "keys crosses page" diff --git a/demosplash/generator/offsets.c b/demosplash/generator/offsets.c index 5bbc97fe..49cf1e20 100644 --- a/demosplash/generator/offsets.c +++ b/demosplash/generator/offsets.c @@ -6,6 +6,8 @@ //#define START 40 #define START 48 +#define OFFSET 0x9800 + int main(int argc, char **argv) { int i; @@ -15,7 +17,7 @@ int main(int argc, char **argv) { for(i=0;i(smc%3d+1)",i+START); - printf(">($%4X)",0x9000+(i+START)*49+4); + printf(">($%4X)",OFFSET+(i+START)*49+4); if (i%8!=7) printf(","); else printf("\n"); } @@ -23,7 +25,7 @@ int main(int argc, char **argv) { for(i=0;i(smc%3d+1)",i+START); - printf(">($%4X)",0x9000+(i+START)*47+4); + printf(">($%4X)",OFFSET+(i+START)*47+4); if (i%8!=7) printf(","); else printf("\n"); } @@ -23,7 +25,7 @@ int main(int argc, char **argv) { for(i=0;i($9934),>($9965),>($9996),>($99C7),>($99F8),>($9A29),>($9A5A),>($9A8B) -.byte >($9ABC),>($9AED),>($9B1E),>($9B4F),>($9B80),>($9BB1),>($9BE2),>($9C13) -.byte >($9C44),>($9C75),>($9CA6),>($9CD7),>($9D08),>($9D39),>($9D6A),>($9D9B) -.byte >($9DCC),>($9DFD),>($9E2E),>($9E5F),>($9E90),>($9EC1),>($9EF2),>($9F23) -.byte >($9F54),>($9F85),>($9FB6),>($9FE7),>($A018),>($A049),>($A07A),>($A0AB) -.byte >($A0DC),>($A10D),>($A13E),>($A16F),>($A1A0),>($A1D1),>($A202),>($A233) -.byte >($A264),>($A295),>($A2C6),>($A2F7),>($A328),>($A359),>($A38A),>($A3BB) -.byte >($A3EC),>($A41D),>($A44E),>($A47F),>($A4B0),>($A4E1),>($A512),>($A543) -.byte >($A574),>($A5A5),>($A5D6),>($A607),>($A638),>($A669),>($A69A),>($A6CB) -.byte >($A6FC),>($A72D),>($A75E),>($A78F),>($A7C0),>($A7F1),>($A822),>($A853) -.byte >($A884),>($A8B5),>($A8E6),>($A917),>($A948),>($A979),>($A9AA),>($A9DB) -.byte >($AA0C),>($AA3D),>($AA6E),>($AA9F),>($AAD0),>($AB01),>($AB32),>($AB63) -.byte >($AB94),>($ABC5),>($ABF6),>($AC27),>($AC58),>($AC89),>($ACBA),>($ACEB) -.byte >($AD1C),>($AD4D),>($AD7E),>($ADAF),>($ADE0),>($AE11),>($AE42),>($AE73) -.byte >($AEA4),>($AED5),>($AF06),>($AF37),>($AF68),>($AF99),>($AFCA),>($AFFB) -.byte >($B02C),>($B05D),>($B08E),>($B0BF),>($B0F0),>($B121),>($B152),>($B183) +.byte >($A134),>($A165),>($A196),>($A1C7),>($A1F8),>($A229),>($A25A),>($A28B) +.byte >($A2BC),>($A2ED),>($A31E),>($A34F),>($A380),>($A3B1),>($A3E2),>($A413) +.byte >($A444),>($A475),>($A4A6),>($A4D7),>($A508),>($A539),>($A56A),>($A59B) +.byte >($A5CC),>($A5FD),>($A62E),>($A65F),>($A690),>($A6C1),>($A6F2),>($A723) +.byte >($A754),>($A785),>($A7B6),>($A7E7),>($A818),>($A849),>($A87A),>($A8AB) +.byte >($A8DC),>($A90D),>($A93E),>($A96F),>($A9A0),>($A9D1),>($AA02),>($AA33) +.byte >($AA64),>($AA95),>($AAC6),>($AAF7),>($AB28),>($AB59),>($AB8A),>($ABBB) +.byte >($ABEC),>($AC1D),>($AC4E),>($AC7F),>($ACB0),>($ACE1),>($AD12),>($AD43) +.byte >($AD74),>($ADA5),>($ADD6),>($AE07),>($AE38),>($AE69),>($AE9A),>($AECB) +.byte >($AEFC),>($AF2D),>($AF5E),>($AF8F),>($AFC0),>($AFF1),>($B022),>($B053) +.byte >($B084),>($B0B5),>($B0E6),>($B117),>($B148),>($B179),>($B1AA),>($B1DB) +.byte >($B20C),>($B23D),>($B26E),>($B29F),>($B2D0),>($B301),>($B332),>($B363) +.byte >($B394),>($B3C5),>($B3F6),>($B427),>($B458),>($B489),>($B4BA),>($B4EB) +.byte >($B51C),>($B54D),>($B57E),>($B5AF),>($B5E0),>($B611),>($B642),>($B673) +.byte >($B6A4),>($B6D5),>($B706),>($B737),>($B768),>($B799),>($B7CA),>($B7FB) +.byte >($B82C),>($B85D),>($B88E),>($B8BF),>($B8F0),>($B921),>($B952),>($B983) y_lookup_l: -.byte <($9934),<($9965),<($9996),<($99C7),<($99F8),<($9A29),<($9A5A),<($9A8B) -.byte <($9ABC),<($9AED),<($9B1E),<($9B4F),<($9B80),<($9BB1),<($9BE2),<($9C13) -.byte <($9C44),<($9C75),<($9CA6),<($9CD7),<($9D08),<($9D39),<($9D6A),<($9D9B) -.byte <($9DCC),<($9DFD),<($9E2E),<($9E5F),<($9E90),<($9EC1),<($9EF2),<($9F23) -.byte <($9F54),<($9F85),<($9FB6),<($9FE7),<($A018),<($A049),<($A07A),<($A0AB) -.byte <($A0DC),<($A10D),<($A13E),<($A16F),<($A1A0),<($A1D1),<($A202),<($A233) -.byte <($A264),<($A295),<($A2C6),<($A2F7),<($A328),<($A359),<($A38A),<($A3BB) -.byte <($A3EC),<($A41D),<($A44E),<($A47F),<($A4B0),<($A4E1),<($A512),<($A543) -.byte <($A574),<($A5A5),<($A5D6),<($A607),<($A638),<($A669),<($A69A),<($A6CB) -.byte <($A6FC),<($A72D),<($A75E),<($A78F),<($A7C0),<($A7F1),<($A822),<($A853) -.byte <($A884),<($A8B5),<($A8E6),<($A917),<($A948),<($A979),<($A9AA),<($A9DB) -.byte <($AA0C),<($AA3D),<($AA6E),<($AA9F),<($AAD0),<($AB01),<($AB32),<($AB63) -.byte <($AB94),<($ABC5),<($ABF6),<($AC27),<($AC58),<($AC89),<($ACBA),<($ACEB) -.byte <($AD1C),<($AD4D),<($AD7E),<($ADAF),<($ADE0),<($AE11),<($AE42),<($AE73) -.byte <($AEA4),<($AED5),<($AF06),<($AF37),<($AF68),<($AF99),<($AFCA),<($AFFB) -.byte <($B02C),<($B05D),<($B08E),<($B0BF),<($B0F0),<($B121),<($B152),<($B183) +.byte <($A134),<($A165),<($A196),<($A1C7),<($A1F8),<($A229),<($A25A),<($A28B) +.byte <($A2BC),<($A2ED),<($A31E),<($A34F),<($A380),<($A3B1),<($A3E2),<($A413) +.byte <($A444),<($A475),<($A4A6),<($A4D7),<($A508),<($A539),<($A56A),<($A59B) +.byte <($A5CC),<($A5FD),<($A62E),<($A65F),<($A690),<($A6C1),<($A6F2),<($A723) +.byte <($A754),<($A785),<($A7B6),<($A7E7),<($A818),<($A849),<($A87A),<($A8AB) +.byte <($A8DC),<($A90D),<($A93E),<($A96F),<($A9A0),<($A9D1),<($AA02),<($AA33) +.byte <($AA64),<($AA95),<($AAC6),<($AAF7),<($AB28),<($AB59),<($AB8A),<($ABBB) +.byte <($ABEC),<($AC1D),<($AC4E),<($AC7F),<($ACB0),<($ACE1),<($AD12),<($AD43) +.byte <($AD74),<($ADA5),<($ADD6),<($AE07),<($AE38),<($AE69),<($AE9A),<($AECB) +.byte <($AEFC),<($AF2D),<($AF5E),<($AF8F),<($AFC0),<($AFF1),<($B022),<($B053) +.byte <($B084),<($B0B5),<($B0E6),<($B117),<($B148),<($B179),<($B1AA),<($B1DB) +.byte <($B20C),<($B23D),<($B26E),<($B29F),<($B2D0),<($B301),<($B332),<($B363) +.byte <($B394),<($B3C5),<($B3F6),<($B427),<($B458),<($B489),<($B4BA),<($B4EB) +.byte <($B51C),<($B54D),<($B57E),<($B5AF),<($B5E0),<($B611),<($B642),<($B673) +.byte <($B6A4),<($B6D5),<($B706),<($B737),<($B768),<($B799),<($B7CA),<($B7FB) +.byte <($B82C),<($B85D),<($B88E),<($B8BF),<($B8F0),<($B921),<($B952),<($B983) diff --git a/demosplash/offsets_table2.s b/demosplash/offsets_table2.s index 3328f104..7b20b74a 100644 --- a/demosplash/offsets_table2.s +++ b/demosplash/offsets_table2.s @@ -1,34 +1,34 @@ y_lookup2_h: -.byte >($95E4),>($9613),>($9642),>($9671),>($96A0),>($96CF),>($96FE),>($972D) -.byte >($975C),>($978B),>($97BA),>($97E9),>($9818),>($9847),>($9876),>($98A5) -.byte >($98D4),>($9903),>($9932),>($9961),>($9990),>($99BF),>($99EE),>($9A1D) -.byte >($9A4C),>($9A7B),>($9AAA),>($9AD9),>($9B08),>($9B37),>($9B66),>($9B95) -.byte >($9BC4),>($9BF3),>($9C22),>($9C51),>($9C80),>($9CAF),>($9CDE),>($9D0D) -.byte >($9D3C),>($9D6B),>($9D9A),>($9DC9),>($9DF8),>($9E27),>($9E56),>($9E85) -.byte >($9EB4),>($9EE3),>($9F12),>($9F41),>($9F70),>($9F9F),>($9FCE),>($9FFD) -.byte >($A02C),>($A05B),>($A08A),>($A0B9),>($A0E8),>($A117),>($A146),>($A175) -.byte >($A1A4),>($A1D3),>($A202),>($A231),>($A260),>($A28F),>($A2BE),>($A2ED) -.byte >($A31C),>($A34B),>($A37A),>($A3A9),>($A3D8),>($A407),>($A436),>($A465) -.byte >($A494),>($A4C3),>($A4F2),>($A521),>($A550),>($A57F),>($A5AE),>($A5DD) -.byte >($A60C),>($A63B),>($A66A),>($A699),>($A6C8),>($A6F7),>($A726),>($A755) -.byte >($A784),>($A7B3),>($A7E2),>($A811),>($A840),>($A86F),>($A89E),>($A8CD) -.byte >($A8FC),>($A92B),>($A95A),>($A989),>($A9B8),>($A9E7),>($AA16),>($AA45) -.byte >($AA74),>($AAA3),>($AAD2),>($AB01),>($AB30),>($AB5F),>($AB8E),>($ABBD) -.byte >($ABEC),>($AC1B),>($AC4A),>($AC79),>($ACA8),>($ACD7),>($AD06),>($AD35) +.byte >($9DE4),>($9E13),>($9E42),>($9E71),>($9EA0),>($9ECF),>($9EFE),>($9F2D) +.byte >($9F5C),>($9F8B),>($9FBA),>($9FE9),>($A018),>($A047),>($A076),>($A0A5) +.byte >($A0D4),>($A103),>($A132),>($A161),>($A190),>($A1BF),>($A1EE),>($A21D) +.byte >($A24C),>($A27B),>($A2AA),>($A2D9),>($A308),>($A337),>($A366),>($A395) +.byte >($A3C4),>($A3F3),>($A422),>($A451),>($A480),>($A4AF),>($A4DE),>($A50D) +.byte >($A53C),>($A56B),>($A59A),>($A5C9),>($A5F8),>($A627),>($A656),>($A685) +.byte >($A6B4),>($A6E3),>($A712),>($A741),>($A770),>($A79F),>($A7CE),>($A7FD) +.byte >($A82C),>($A85B),>($A88A),>($A8B9),>($A8E8),>($A917),>($A946),>($A975) +.byte >($A9A4),>($A9D3),>($AA02),>($AA31),>($AA60),>($AA8F),>($AABE),>($AAED) +.byte >($AB1C),>($AB4B),>($AB7A),>($ABA9),>($ABD8),>($AC07),>($AC36),>($AC65) +.byte >($AC94),>($ACC3),>($ACF2),>($AD21),>($AD50),>($AD7F),>($ADAE),>($ADDD) +.byte >($AE0C),>($AE3B),>($AE6A),>($AE99),>($AEC8),>($AEF7),>($AF26),>($AF55) +.byte >($AF84),>($AFB3),>($AFE2),>($B011),>($B040),>($B06F),>($B09E),>($B0CD) +.byte >($B0FC),>($B12B),>($B15A),>($B189),>($B1B8),>($B1E7),>($B216),>($B245) +.byte >($B274),>($B2A3),>($B2D2),>($B301),>($B330),>($B35F),>($B38E),>($B3BD) +.byte >($B3EC),>($B41B),>($B44A),>($B479),>($B4A8),>($B4D7),>($B506),>($B535) y_lookup2_l: -.byte <($95E4),<($9613),<($9642),<($9671),<($96A0),<($96CF),<($96FE),<($972D) -.byte <($975C),<($978B),<($97BA),<($97E9),<($9818),<($9847),<($9876),<($98A5) -.byte <($98D4),<($9903),<($9932),<($9961),<($9990),<($99BF),<($99EE),<($9A1D) -.byte <($9A4C),<($9A7B),<($9AAA),<($9AD9),<($9B08),<($9B37),<($9B66),<($9B95) -.byte <($9BC4),<($9BF3),<($9C22),<($9C51),<($9C80),<($9CAF),<($9CDE),<($9D0D) -.byte <($9D3C),<($9D6B),<($9D9A),<($9DC9),<($9DF8),<($9E27),<($9E56),<($9E85) -.byte <($9EB4),<($9EE3),<($9F12),<($9F41),<($9F70),<($9F9F),<($9FCE),<($9FFD) -.byte <($A02C),<($A05B),<($A08A),<($A0B9),<($A0E8),<($A117),<($A146),<($A175) -.byte <($A1A4),<($A1D3),<($A202),<($A231),<($A260),<($A28F),<($A2BE),<($A2ED) -.byte <($A31C),<($A34B),<($A37A),<($A3A9),<($A3D8),<($A407),<($A436),<($A465) -.byte <($A494),<($A4C3),<($A4F2),<($A521),<($A550),<($A57F),<($A5AE),<($A5DD) -.byte <($A60C),<($A63B),<($A66A),<($A699),<($A6C8),<($A6F7),<($A726),<($A755) -.byte <($A784),<($A7B3),<($A7E2),<($A811),<($A840),<($A86F),<($A89E),<($A8CD) -.byte <($A8FC),<($A92B),<($A95A),<($A989),<($A9B8),<($A9E7),<($AA16),<($AA45) -.byte <($AA74),<($AAA3),<($AAD2),<($AB01),<($AB30),<($AB5F),<($AB8E),<($ABBD) -.byte <($ABEC),<($AC1B),<($AC4A),<($AC79),<($ACA8),<($ACD7),<($AD06),<($AD35) +.byte <($9DE4),<($9E13),<($9E42),<($9E71),<($9EA0),<($9ECF),<($9EFE),<($9F2D) +.byte <($9F5C),<($9F8B),<($9FBA),<($9FE9),<($A018),<($A047),<($A076),<($A0A5) +.byte <($A0D4),<($A103),<($A132),<($A161),<($A190),<($A1BF),<($A1EE),<($A21D) +.byte <($A24C),<($A27B),<($A2AA),<($A2D9),<($A308),<($A337),<($A366),<($A395) +.byte <($A3C4),<($A3F3),<($A422),<($A451),<($A480),<($A4AF),<($A4DE),<($A50D) +.byte <($A53C),<($A56B),<($A59A),<($A5C9),<($A5F8),<($A627),<($A656),<($A685) +.byte <($A6B4),<($A6E3),<($A712),<($A741),<($A770),<($A79F),<($A7CE),<($A7FD) +.byte <($A82C),<($A85B),<($A88A),<($A8B9),<($A8E8),<($A917),<($A946),<($A975) +.byte <($A9A4),<($A9D3),<($AA02),<($AA31),<($AA60),<($AA8F),<($AABE),<($AAED) +.byte <($AB1C),<($AB4B),<($AB7A),<($ABA9),<($ABD8),<($AC07),<($AC36),<($AC65) +.byte <($AC94),<($ACC3),<($ACF2),<($AD21),<($AD50),<($AD7F),<($ADAE),<($ADDD) +.byte <($AE0C),<($AE3B),<($AE6A),<($AE99),<($AEC8),<($AEF7),<($AF26),<($AF55) +.byte <($AF84),<($AFB3),<($AFE2),<($B011),<($B040),<($B06F),<($B09E),<($B0CD) +.byte <($B0FC),<($B12B),<($B15A),<($B189),<($B1B8),<($B1E7),<($B216),<($B245) +.byte <($B274),<($B2A3),<($B2D2),<($B301),<($B330),<($B35F),<($B38E),<($B3BD) +.byte <($B3EC),<($B41B),<($B44A),<($B479),<($B4A8),<($B4D7),<($B506),<($B535) diff --git a/demosplash/pt3_lib_play_frame.s b/demosplash/pt3_lib_play_frame.s index 00c79947..cd75df39 100644 --- a/demosplash/pt3_lib_play_frame.s +++ b/demosplash/pt3_lib_play_frame.s @@ -1,17 +1,17 @@ ; ZZ points to offset from pointer - ;0 $9000,$9100,$9200 = A Low (reg0) - ;1 $9300,$9400,$9500 = A high (reg1) [top], B high (reg3) [bottom] - ;2 $9600,$9700,$9800 = B Low (reg2) - ;3 $9900,$9A00,$9B00 = C Low (reg4) - ;4 $9C00,$9D00,$9E00 = Envelope Shape (r13) [top], C high (reg5) [bot] - ;5 $9F00,$A000,$A100 = Noise (r6), bit7 = don't change envelope - ;6 $A200,$A300,$A400 = Enable (r7) - ;7 $A500,$A600,$A700 = A amp (r8), bit 5 of r8,r9,r10 - ;8 $A800,$A900,$AA00 = C amp (r10) [top], B amp (r9) [bottom] - ;9 $AB00,$AC00,$AD00 = ENV low (r11) - ;a $AE00,$AF00,$B000 = ENV high (r12) +;D000 ;0 $9000,$9100,$9200 = A Low (reg0) +;D100 ;1 $9300,$9400,$9500 = A high (reg1) [top], B high (reg3) [bottom] +;D200 ;2 $9600,$9700,$9800 = B Low (reg2) +;D300 ;3 $9900,$9A00,$9B00 = C Low (reg4) +;D400 ;4 $9C00,$9D00,$9E00 = Envelope Shape (r13) [top], C high (reg5) [bot] +;D500 ;5 $9F00,$A000,$A100 = Noise (r6), bit7 = don't change envelope +;D600 ;6 $A200,$A300,$A400 = Enable (r7) +;D700 ;7 $A500,$A600,$A700 = A amp (r8), bit 5 of r8,r9,r10 +;D800 ;8 $A800,$A900,$AA00 = C amp (r10) [top], B amp (r9) [bottom] +;D900 ;9 $AB00,$AC00,$AD00 = ENV low (r11) +;DA00 ;a $AE00,$AF00,$B000 = ENV high (r12) ; 3+ 72 + 72 + 83 + 74 + 72 + 77 + 19 + 70 + 74 + 72 + ; 77 + 18 + 82 + 85 + 72 + 72 + 8 + 72 + 6 = 1180 @@ -23,7 +23,7 @@ play_frame_compressed: ; Register 0: A fine ldx #0 ; 2 r0_smc: - lda $9000,Y ; 4+ + lda $D000,Y ; 4+ jsr play_mb_write ; 6+60 ;====== ; 72 @@ -31,7 +31,7 @@ r0_smc: ; Register 2: B fine ldx #2 ; 2 r2_smc: - lda $9600,Y ; 4+ + lda $9200,Y ; 4+ jsr play_mb_write ; 6+60 ;====== ; 72 @@ -39,7 +39,7 @@ r2_smc: ; Register 1: A coarse ldx #1 ; 2 r1_smc: - lda $9300,Y ; 4+ + lda $9100,Y ; 4+ pha ; 3 lsr ; 2 lsr ; 2 @@ -59,7 +59,7 @@ r1_smc: ; Register 4: C fine ldx #4 ; 2 r4_smc: - lda $9900,Y ; 4+ + lda $D300,Y ; 4+ jsr play_mb_write ; 6+60 ;======= ; 72 @@ -67,7 +67,7 @@ r4_smc: ; Register 5: C coarse ldx #5 ; 2 r5_smc: - lda $9C00,Y ; 4+ + lda $9400,Y ; 4+ pha ; 3 and #$f ; 2 jsr play_mb_write ; 6+60 @@ -82,7 +82,7 @@ r5_smc: lsr ; 2 r13_smc: - ldx $9F00,Y ; check for env update ; 4 + ldx $D500,Y ; check for env update ; 4 bmi skip_envelope_write ; 3 ;============ ; 19 @@ -107,7 +107,7 @@ done_envelope_write: ; Register 6: Noise ldx #6 ; 2 r6_smc: - lda $9F00,Y ; 4+ + lda $D500,Y ; 4+ and #$1f ; 2 jsr play_mb_write ; 6+60 ;======= @@ -116,7 +116,7 @@ r6_smc: ; Register 7: Enable ldx #7 ; 2 r7_smc: - lda $A200,Y ; 4+ + lda $D600,Y ; 4+ jsr play_mb_write ; 6+60 ;======== ; 72 @@ -124,7 +124,7 @@ r7_smc: ; Register 8: a-amp ldx #8 ; 2 r8_smc: - lda $A500,Y ; 4+ + lda $D700,Y ; 4+ pha ; 3 and #$1f ; 2 jsr play_mb_write ; 6+60 @@ -144,7 +144,7 @@ r8_smc: ; Register 9: b-amp (bottom) ldx #9 ; 2 r9_smc: - lda $A800,Y ; 4+ + lda $D800,Y ; 4+ pha ; 3 and #$f ; 2 ora AY_REGISTERS ; 3 @@ -169,7 +169,7 @@ r9_smc: ; Register 11: E fine ldx #11 ; 2 r11_smc: - lda $AB00,Y ; 4+ + lda $D900,Y ; 4+ jsr play_mb_write ; 6+60 ;====== ; 72 @@ -177,7 +177,7 @@ r11_smc: ; Register 12: E coarse ldx #12 ; 2 r12_smc: - lda $AE00,Y ; 4+ + lda $DA00,Y ; 4+ jsr play_mb_write ; 6+60 ;====== ; 72 diff --git a/demosplash/pt3_lib_write_frame.s b/demosplash/pt3_lib_write_frame.s index 2f176f91..674074b1 100644 --- a/demosplash/pt3_lib_write_frame.s +++ b/demosplash/pt3_lib_write_frame.s @@ -1,17 +1,17 @@ ; ZZ points to offset from pointer - ;0 $9000,$9100,$9200 = A Low (reg0) - ;1 $9300,$9400,$9500 = A high (reg1) [top], B high (reg3) [bottom] - ;2 $9600,$9700,$9800 = B Low (reg2) - ;3 $9900,$9A00,$9B00 = C Low (reg4) - ;4 $9C00,$9D00,$9E00 = Envelope Shape (r13) [top], C high (reg5) [bot] - ;5 $9F00,$A000,$A100 = Noise (r6), bit7 = don't change envelope - ;6 $A200,$A300,$A400 = Enable (r7) - ;7 $A500,$A600,$A700 = A amp (r8), bit 5 of r8,r9,r10 - ;8 $A800,$A900,$AA00 = C amp (r10) [top], B amp (r9) [bottom] - ;9 $AB00,$AC00,$AD00 = ENV low (r11) - ;a $AE00,$AF00,$B000 = ENV high (r12) +;D000 ;0 $9000,$9100,$9200 = A Low (reg0) +;D100 ;1 $9300,$9400,$9500 = A high (reg1) [top], B high (reg3) [bottom] +;D200 ;2 $9600,$9700,$9800 = B Low (reg2) +;D300 ;3 $9900,$9A00,$9B00 = C Low (reg4) +;D400 ;4 $9C00,$9D00,$9E00 = Envelope Shape (r13) [top], C high (reg5) [bot] +;D500 ;5 $9F00,$A000,$A100 = Noise (r6), bit7 = don't change envelope +;D600 ;6 $A200,$A300,$A400 = Enable (r7) +;D700 ;7 $A500,$A600,$A700 = A amp (r8), bit 5 of r8,r9,r10 +;D800 ;8 $A800,$A900,$AA00 = C amp (r10) [top], B amp (r9) [bottom] +;D900 ;9 $AB00,$AC00,$AD00 = ENV low (r11) +;DA00 ;a $AE00,$AF00,$B000 = ENV high (r12) pt3_write_frame: @@ -22,7 +22,7 @@ pt3_write_frame: ; Register 0: A fine lda A_FINE_TONE r0_wrsmc: - sta $9000,Y + sta $D000,Y ;========================== ; Register 1/3: A/B coarse @@ -33,13 +33,13 @@ r0_wrsmc: asl ora B_COARSE_TONE r1_wrsmc: - sta $9300,Y + sta $D100,Y ;==================== ; Register 2: B fine lda B_FINE_TONE r2_wrsmc: - sta $9600,Y + sta $D200,Y ;==================== ; Register 3: B coarse already done @@ -49,7 +49,7 @@ r2_wrsmc: ; Register 4: C fine lda C_FINE_TONE r4_wrsmc: - sta $9900,Y + sta $D300,Y ;======================================= ; Register 5: Envelope Shape [top] / C coarse [bottom] @@ -81,7 +81,7 @@ done_envelope: lda C_COARSE_TONE r13_wrsmc: - sta $9C00,Y + sta $D400,Y ;===================== @@ -90,13 +90,13 @@ r13_wrsmc: and #$1f ora ENVELOPE_SHAPE r6_wrsmc: - sta $9F00,Y + sta $D500,Y ;===================== ; Register 7: Enable lda ENABLE r7_wrsmc: - sta $A200,Y + sta $D600,Y ;===================== ; Register 8: a-amp @@ -117,7 +117,7 @@ r7_wrsmc: asl ora A_VOLUME r8_wrsmc: - sta $A500,Y + sta $D700,Y ;============================ ; Register 9/10: b-amp (bottom) , c-amp (top) @@ -133,7 +133,7 @@ r8_wrsmc: asl ora B_VOLUME r9_wrsmc: - sta $A800,Y + sta $D800,Y ;===================== ; Register 10: c-amp already handled @@ -143,13 +143,13 @@ r9_wrsmc: ; Register 11: E fine lda ENVELOPE_FINE r11_wrsmc: - sta $AB00,Y + sta $D900,Y ;======================= ; Register 12: E coarse lda ENVELOPE_COARSE r12_wrsmc: - sta $AE00,Y + sta $DA00,Y ;============================= ; Register 13: already handled diff --git a/demosplash/reading.s b/demosplash/reading.s index d83e7cbc..5c7d537a 100644 --- a/demosplash/reading.s +++ b/demosplash/reading.s @@ -9,8 +9,8 @@ end_book: ;=================== ; init screen - jsr TEXT - jsr HOME +; jsr TEXT +; jsr HOME bit KEYRESET ;=================== @@ -133,7 +133,7 @@ loopR: dex ; 2 book_loop: - jsr $9000 ; cycle-counted page0/page1 flip code + jsr $9800 ; cycle-counted page0/page1 flip code ;====================================================== ; We have 4550 cycles in the vblank, use them wisely