mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-10 08:54:51 +00:00
ds: rasterbars work
This commit is contained in:
parent
2a8a410303
commit
87de0c0aaf
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
UPDATE_START = $9000
|
UPDATE_START = $9000
|
||||||
|
|
||||||
|
DEFAULT_COLOR = $0
|
||||||
|
|
||||||
create_update_type1:
|
create_update_type1:
|
||||||
ldx #192
|
ldx #192
|
||||||
lda #<UPDATE_START
|
lda #<UPDATE_START
|
||||||
@ -48,20 +50,24 @@ create_update_inner_loop:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
BARS_START = 38
|
||||||
|
|
||||||
;===========================
|
;===========================
|
||||||
; from 32 to 160?
|
; from 32 to 160?
|
||||||
setup_rasterbars:
|
setup_rasterbars:
|
||||||
|
|
||||||
lda #4 ; which page
|
lda #4 ; which page
|
||||||
sta TEMP
|
sta RASTER_PAGE
|
||||||
|
|
||||||
ldx #32
|
ldx #BARS_START
|
||||||
lda #<(UPDATE_START+(32*49))
|
lda #<(UPDATE_START+(BARS_START*49))
|
||||||
sta OUTL
|
sta OUTL
|
||||||
lda #>(UPDATE_START+(32*49))
|
lda #>(UPDATE_START+(BARS_START*49))
|
||||||
sta OUTH
|
sta OUTH
|
||||||
setup_rasterbars_outer_loop:
|
setup_rasterbars_outer_loop:
|
||||||
ldy #6
|
ldy #6
|
||||||
|
lda #13
|
||||||
|
sta RASTER_X
|
||||||
setup_rasterbars_inner_loop:
|
setup_rasterbars_inner_loop:
|
||||||
txa
|
txa
|
||||||
pha
|
pha
|
||||||
@ -71,12 +77,15 @@ setup_rasterbars_inner_loop:
|
|||||||
lsr
|
lsr
|
||||||
and #$fe
|
and #$fe
|
||||||
tax
|
tax
|
||||||
|
clc
|
||||||
lda gr_offsets,X
|
lda gr_offsets,X
|
||||||
|
adc RASTER_X
|
||||||
|
inc RASTER_X
|
||||||
sta (OUTL),Y
|
sta (OUTL),Y
|
||||||
iny
|
iny
|
||||||
clc
|
clc
|
||||||
lda gr_offsets+1,X
|
lda gr_offsets+1,X
|
||||||
adc TEMP
|
adc RASTER_PAGE
|
||||||
sta (OUTL),Y
|
sta (OUTL),Y
|
||||||
iny
|
iny
|
||||||
iny
|
iny
|
||||||
@ -95,19 +104,19 @@ setup_rasterbars_inner_loop:
|
|||||||
sta OUTH
|
sta OUTH
|
||||||
|
|
||||||
|
|
||||||
lda TEMP
|
lda RASTER_PAGE
|
||||||
eor #$04
|
eor #$04
|
||||||
sta TEMP
|
sta RASTER_PAGE
|
||||||
|
|
||||||
inx
|
inx
|
||||||
cpx #160
|
cpx #168
|
||||||
bne setup_rasterbars_outer_loop
|
bne setup_rasterbars_outer_loop
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
one_scanline:
|
one_scanline:
|
||||||
.byte $2C,$54,$C0 ; bit PAGE0 ; 4
|
.byte $2C,$54,$C0 ; bit PAGE0 ; 4
|
||||||
.byte $A9,$0B ; lda #$0b ; 2
|
.byte $A9,DEFAULT_COLOR ; lda #$0b ; 2
|
||||||
.byte $8D,$00,$02 ; sta $200 ; 4
|
.byte $8D,$00,$02 ; sta $200 ; 4
|
||||||
.byte $8D,$00,$02 ; sta $200 ; 4
|
.byte $8D,$00,$02 ; sta $200 ; 4
|
||||||
.byte $8D,$00,$02 ; sta $200 ; 4
|
.byte $8D,$00,$02 ; sta $200 ; 4
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
#define NUMBER 128
|
#define NUMBER 128
|
||||||
|
|
||||||
|
//#define START 32
|
||||||
|
#define START 40
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
@ -10,16 +13,16 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
for(i=0;i<NUMBER;i++) {
|
for(i=0;i<NUMBER;i++) {
|
||||||
if (i%8==0) printf(".byte\t");
|
if (i%8==0) printf(".byte\t");
|
||||||
//printf(">(smc%3d+1)",i+32);
|
//printf(">(smc%3d+1)",i+START);
|
||||||
printf(">($%4X)",0x9000+(i+32)*49+4);
|
printf(">($%4X)",0x9000+(i+START)*49+4);
|
||||||
if (i%8!=7) printf(",");
|
if (i%8!=7) printf(",");
|
||||||
else printf("\n");
|
else printf("\n");
|
||||||
}
|
}
|
||||||
printf("y_lookup_l:\n");
|
printf("y_lookup_l:\n");
|
||||||
for(i=0;i<NUMBER;i++) {
|
for(i=0;i<NUMBER;i++) {
|
||||||
if (i%8==0) printf(".byte\t");
|
if (i%8==0) printf(".byte\t");
|
||||||
//printf("<(smc%3d+1)",i+32);
|
//printf("<(smc%3d+1)",i+START);
|
||||||
printf("<($%4X)",0x9000+(i+32)*49+4);
|
printf("<($%4X)",0x9000+(i+START)*49+4);
|
||||||
if (i%8!=7) printf(",");
|
if (i%8!=7) printf(",");
|
||||||
else printf("\n");
|
else printf("\n");
|
||||||
}
|
}
|
||||||
|
34
demosplash/offsets_table.s
Normal file
34
demosplash/offsets_table.s
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
y_lookup_h:
|
||||||
|
.byte >($97AC),>($97DD),>($980E),>($983F),>($9870),>($98A1),>($98D2),>($9903)
|
||||||
|
.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)
|
||||||
|
y_lookup_l:
|
||||||
|
.byte <($97AC),<($97DD),<($980E),<($983F),<($9870),<($98A1),<($98D2),<($9903)
|
||||||
|
.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)
|
@ -152,8 +152,10 @@ BLAST_OUT = $D8 ; 2+
|
|||||||
SHIELD_OUT = $D9 ; 2+
|
SHIELD_OUT = $D9 ; 2+
|
||||||
|
|
||||||
ALIEN_OUT = $DA ; 2+
|
ALIEN_OUT = $DA ; 2+
|
||||||
|
RASTER_PAGE = $DA ; rasters
|
||||||
|
|
||||||
LASER_OUT = $DB ; 2+
|
LASER_OUT = $DB ; 2+
|
||||||
|
RASTER_X = $DB ; rasters
|
||||||
|
|
||||||
GUN_CHARGE = $DC ; 2+
|
GUN_CHARGE = $DC ; 2+
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user