mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-10-31 10:13:35 +00:00
Merge branch 'master' of github.com:deater/dos33fsprogs
This commit is contained in:
commit
6d8bf2b877
@ -5,7 +5,7 @@ TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
LINKER_SCRIPTS = ../../../linker_scripts
|
||||
EMPTY_DISK = ../../../empty_disk
|
||||
|
||||
all: bubble_gr.dsk
|
||||
all: bubble_gr.dsk make_table
|
||||
|
||||
bubble_gr.dsk: HELLO BUBBLE_GR BUBBLE_COLOR BUBBLE_TINY
|
||||
cp $(EMPTY_DISK)/empty.dsk bubble_gr.dsk
|
||||
@ -43,10 +43,18 @@ BUBBLE_TINY: bubble_tiny.o
|
||||
bubble_tiny.o: bubble_tiny.s
|
||||
ca65 -o bubble_tiny.o bubble_tiny.s -l bubble_tiny.lst
|
||||
|
||||
###
|
||||
|
||||
make_table: make_table.o
|
||||
$(CC) $(LFLAGS) -o make_table make_table.o
|
||||
|
||||
make_table.o: make_table.c
|
||||
$(CC) $(CFLAGS) -c make_table.c
|
||||
|
||||
###
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst HELLO BUBBLE_GR BUBBLE_COLOR BUBBLE_TINY
|
||||
rm -f *~ *.o *.lst make_table \
|
||||
HELLO BUBBLE_GR BUBBLE_COLOR BUBBLE_TINY
|
||||
|
||||
|
||||
|
53
graphics/gr/bubble_universe/make_table.c
Normal file
53
graphics/gr/bubble_universe/make_table.c
Normal file
@ -0,0 +1,53 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
int x;
|
||||
|
||||
unsigned char values[256];
|
||||
|
||||
//
|
||||
// ldy #0 ; 2
|
||||
//xloop:
|
||||
// ldx #15 ; 2
|
||||
//loop:
|
||||
// tya ; 1
|
||||
// sec ; 1
|
||||
// sbc #$11 ; 2
|
||||
|
||||
// cpx #15 ; 2
|
||||
// bne skip2 ; 2
|
||||
// and #$f0 ; 2
|
||||
// clc ; 1
|
||||
// adc #$10 ; 2
|
||||
|
||||
// skip2:
|
||||
|
||||
// cpy #16 ; 2
|
||||
// bcs skip ; 2
|
||||
// and #$f ; 2
|
||||
|
||||
|
||||
// skip:
|
||||
// sta table,Y ; 3
|
||||
// iny ; 1
|
||||
// beq done ; 2
|
||||
// dex ; 1
|
||||
// bmi xloop ; 2
|
||||
// bpl loop ; 2
|
||||
//done:
|
||||
|
||||
for(x=0;x<256;x++) {
|
||||
values[x]=x-0x11;
|
||||
if (x%16==0) values[x]=(values[x]&0xf0)+0x10;
|
||||
if (x<16) values[x]&=0xf;
|
||||
}
|
||||
|
||||
for(x=0;x<256;x++) {
|
||||
if (x%16==0) printf("\n");
|
||||
printf("$%02X ",values[x]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user