mode7_demo: update with working scroller

This commit is contained in:
Vince Weaver 2017-12-18 01:05:05 -05:00
parent 3281551767
commit 617fc6694c
6 changed files with 86 additions and 23 deletions

View File

@ -35,7 +35,7 @@ static unsigned char font[256][9]={
{0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0},
{5,0,0,0,0,0,0,0,0}, // 32 ' ' {4,0,0,0,0,0,0,0,0}, // 32 ' '
{4, {4,
0x00, 0x00,
0xe0, // ****** 0xe0, // ******
@ -147,17 +147,19 @@ static unsigned char font[256][9]={
0x80, // ** 0x80, // **
0xf0, // ******** 0xf0, // ********
}, },
{0,0,0,0,0,0,0,0,0}, {5,
0x00,
0xf0, // ********
0x80, // **
0x80, // **
0xe0, // ******
0x80, // **
0x80, // **
0x80, // **
},
{0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0},
/* /*
********
**
**
******
**
**
**
**** ****
** **
** **
@ -201,7 +203,7 @@ static unsigned char font[256][9]={
**** ** ** **** ** **
*/ */
{5, {4,
0x00, 0x00,
0x80, // ** 0x80, // **
0x80, // ** 0x80, // **
@ -209,7 +211,7 @@ static unsigned char font[256][9]={
0x80, // ** 0x80, // **
0x80, // ** 0x80, // **
0x80, // ** 0x80, // **
0xf0, // ******** 0xe0, // ******
}, },
@ -360,6 +362,30 @@ static unsigned char font[256][9]={
** **
********** **********
*/ */
{3,
0x00,
0xc0, // ****
0x80, // **
0x80, // **
0x80, // **
0x80, // **
0x80, // **
0xc0, // ****
},
{0,0,0,0,0,0,0,0,0},
{3,
0x00,
0xc0, // ****
0x40, // **
0x40, // **
0x40, // **
0x40, // **
0x40, // **
0xc0, // ****
},
}; };
@ -427,13 +453,20 @@ static int vmw_logo[4][18]={
{0x00,0x00,0x11,0x44,0x44,0x44, 0x44,0x44,0x22,0x44,0x44,0x44, 0x44,0x44,0x22,0x00,0x00,0x00}, {0x00,0x00,0x11,0x44,0x44,0x44, 0x44,0x44,0x22,0x44,0x44,0x44, 0x44,0x44,0x22,0x00,0x00,0x00},
}; };
static int rainbow_logo[4][6]={
{0x00,0x00,0x00,0xc0,0x0c,0x00 },
{0xd0,0xdc,0xdc,0xdc,0x0c,0x00 },
{0x19,0x19,0x19,0x19,0x10,0x00 },
{0x02,0x62,0x62,0x62,0x02,0x00 },
};
int main(int argc, char **argv) { int main(int argc, char **argv) {
//char string[]="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; //char string[]="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
// char string[]=" \001DEATER \002WAS \003HERE!!! "; // char string[]=" \001DEATER \002WAS \003HERE!!! ";
char string[]=" \001BY DEATER... \002A \010 PRODUCTION "; // char string[]=" \001BY DEATER... \002A \010 PRODUCTION ";
// char string[]="\003* APPLE ][ FOREVER * "; char string[]=" \003\011APPLE ][ FOREVER\011 ";
int length=0,width=0,x,y,i,j; int length=0,width=0,x,y,i,j;
int color,color1,color2; int color,color1,color2;
int which_color=0; int which_color=0;
@ -462,6 +495,19 @@ int main(int argc, char **argv) {
continue; continue;
} }
/* rainbow apple logo */
if (string[i]==9) {
width=6;
for(x=0;x<width;x++) {
for(j=0;j<4;j++) {
row[j][length]=rainbow_logo[j][x];
}
length++;
}
continue;
}
width=font[(int)string[i]][0]; width=font[(int)string[i]][0];
for(x=0;x<width;x++) { for(x=0;x<width;x++) {
for(j=0;j<4;j++) { for(j=0;j<4;j++) {
@ -497,7 +543,7 @@ int main(int argc, char **argv) {
printf("\n"); printf("\n");
} }
#endif #endif
printf("deater_scroll:\n"); printf("a2_scroll:\n");
printf("; scroll_length:\n.byte %d\n",length); printf("; scroll_length:\n.byte %d\n",length);
for(y=0;y<4;y++) { for(y=0;y<4;y++) {
//printf("scroll_row%d:\n",y+1); //printf("scroll_row%d:\n",y+1);

View File

@ -19,7 +19,8 @@ mode7_demo.dsk: $(DOS33) MODE7_DEMO
MODE7_DEMO: mode7_demo.o MODE7_DEMO: mode7_demo.o
ld65 -o MODE7_DEMO mode7_demo.o -C ./apple2_1000.inc ld65 -o MODE7_DEMO mode7_demo.o -C ./apple2_1000.inc
mode7_demo.o: mode7_demo.s mode7_demo_backgrounds.inc scrolltext.inc \ mode7_demo.o: mode7_demo.s mode7_demo_backgrounds.inc \
a2.scrolltext deater.scrolltext \
../asm_routines/gr_unrle.s \ ../asm_routines/gr_unrle.s \
../asm_routines/hlin_clearscreen.s \ ../asm_routines/hlin_clearscreen.s \
../asm_routines/gr_setpage.s \ ../asm_routines/gr_setpage.s \

10
mode7_demo/a2.scrolltext Normal file
View File

@ -0,0 +1,10 @@
; Original size = 692 bytes
a2_scroll:
; scroll_length:
.byte 173
.byte $A0,$2F,$00,$C0,$0C,$00,$00,$10,$10,$00,$00,$A3,$10,$00,$00,$A3,$10,$00,$00,$10,$A3,$00,$A4,$10,$A5,$00,$10,$10,$00,$10,$10,$A5,$00,$A4,$10,$00,$00,$10,$10,$00,$00,$A3,$10,$00,$00,$A4,$10,$00,$10,$00,$00,$10,$00,$A4,$10,$00,$A3,$10,$A5,$00,$C0,$0C,$A0,$80,$00
.byte $A0,$2C,$00,$D0,$A3,$DC,$0C,$00,$B3,$00,$00,$B3,$00,$B3,$00,$00,$B3,$00,$B3,$00,$00,$B3,$00,$B3,$A3,$00,$B3,$A9,$00,$B3,$00,$B3,$A6,$00,$B3,$A4,$00,$B3,$00,$00,$B3,$00,$B3,$00,$00,$B3,$00,$B3,$A4,$00,$B3,$00,$00,$B3,$00,$B3,$A4,$00,$B3,$00,$00,$B3,$00,$D0,$A3,$DC,$0C,$A0,$80,$00
.byte $A0,$2C,$00,$A4,$19,$10,$00,$BF,$0F,$0F,$BF,$00,$BF,$0F,$0F,$00,$00,$BF,$0F,$0F,$00,$00,$BF,$A3,$00,$BF,$0F,$0F,$A7,$00,$BF,$00,$BF,$A6,$00,$BF,$0F,$0F,$00,$00,$BF,$00,$00,$BF,$00,$BF,$0F,$0F,$B0,$00,$BF,$0F,$0F,$00,$00,$0F,$B0,$00,$BF,$00,$BF,$0F,$0F,$00,$00,$BF,$0F,$0F,$B0,$00,$A4,$19,$10,$A0,$80,$00
.byte $A0,$2C,$00,$02,$A3,$62,$02,$00,$13,$00,$00,$13,$00,$13,$A4,$00,$13,$A4,$00,$13,$10,$10,$00,$13,$A3,$10,$A5,$00,$10,$13,$00,$13,$10,$A5,$00,$13,$A4,$00,$03,$10,$10,$03,$00,$13,$00,$00,$13,$00,$13,$A3,$10,$00,$00,$03,$10,$03,$00,$13,$A3,$10,$00,$13,$00,$00,$13,$00,$02,$A3,$62,$02,$A0,$80,$00
.byte $A1
; Compressed size = 285 bytes

Binary file not shown.

View File

@ -42,19 +42,24 @@ demo_loop:
; Scroll the message ; Scroll the message
;=================== ;===================
; lda #255 ; Scroll "BY DEATER... A VMW PRODUCTION"
; jsr WAIT
lda #>deater_scroll lda #>deater_scroll
sta INH sta INH
lda #<deater_scroll lda #<deater_scroll
sta INL sta INL
; lda #10 lda #40 ; scroll at bottom of screen
lda #40
sta CV sta CV
jsr gr_scroll
; Scroll "* APPLE ][ FOREVER *"
lda #>a2_scroll
sta INH
lda #<a2_scroll
sta INL
jsr gr_scroll jsr gr_scroll
@ -86,6 +91,7 @@ demo_loop:
; Variables ; Variables
;=============================================== ;===============================================
.include "scrolltext.inc" .include "deater.scrolltext"
.include "a2.scrolltext"