diff --git a/mode7_demo/docs/chiptune.gr b/mode7_demo/docs/chiptune.gr new file mode 100644 index 00000000..90c508af Binary files /dev/null and b/mode7_demo/docs/chiptune.gr differ diff --git a/mode7_demo/docs/dram_notes.tex b/mode7_demo/docs/dram_notes.tex index b3925ba0..758b7f00 100644 --- a/mode7_demo/docs/dram_notes.tex +++ b/mode7_demo/docs/dram_notes.tex @@ -6,6 +6,23 @@ \newcommand*\rot{\rotatebox{90}} +\definecolor{color0}{rgb}{0.000,0.000,0.000} % Black +\definecolor{color1}{rgb}{0.890,0.118,0.376} % Magenta +\definecolor{color2}{rgb}{0.376,0.306,0.741} % Dark Blue +\definecolor{color3}{rgb}{1.000,0.267,0.992} % Purple +\definecolor{color4}{rgb}{0.000,0.638,0.376} % Dark Green +\definecolor{color5}{rgb}{0.612,0.612,0.612} % Grey 1 +\definecolor{color6}{rgb}{0.078,0.812,0.992} % Medium Blue +\definecolor{color7}{rgb}{0.816,0.765,1.000} % Light Blue +\definecolor{color8}{rgb}{0.376,0.447,0.012} % Brown +\definecolor{color9}{rgb}{1.000,0.416,0.235} % Orange +\definecolor{color10}{rgb}{0.616,0.616,0.616} % Grey 2 +\definecolor{color11}{rgb}{1.000,0.627,0.816} % Pink +\definecolor{color12}{rgb}{0.078,0.961,0.235} % Bright Green +\definecolor{color13}{rgb}{0.816,0.867,0.553} % Yellow +\definecolor{color14}{rgb}{0.447,1.000,0.816} % Aqua +\definecolor{color15}{rgb}{1.000,1.000,1.000} % White + \begin{document} Sort of similar to how the Raspberry Pi started out as a GPU with a small diff --git a/mode7_demo/docs/make_table.c b/mode7_demo/docs/make_table.c index cd6c27d9..6417a0a3 100644 --- a/mode7_demo/docs/make_table.c +++ b/mode7_demo/docs/make_table.c @@ -1,4 +1,7 @@ #include +#include +#include +#include #define COLUMNS 40 #define ROWS 48 @@ -9,24 +12,61 @@ static short addresses[]={ 0x450,0x4d0,0x550,0x5d0,0x650,0x6d0,0x750,0x7d0, }; +static unsigned char image[1024]; + +static int color(int i,int j) { + + int x,y,c; + + y=addresses[j/2]-0x400; + x=i; + + if (j%2==0) { + c=image[y+x]&0xf; + } + else { + c=((image[y+x])>>4)&0xf; + } + + return c; +} int main(int argc, char **argv) { - int i,j; + int i,j,fd,addr=0,max; + char *filename; + + if (argc<2) { + filename=strdup("chiptune.gr"); + } + else { + filename=strdup(argv[1]); + } + + fd=open(filename,O_RDONLY); + if (fd<0) { + printf("Error operning %s\n",filename); + return -1; + } + read(fd,&image,1024); + close(fd); // printf("\\documentclass{article}\n"); // printf("\\usepackage{graphicx}\n"); // printf("\\usepackage{colortbl}\n"); // printf("\\begin{document}\n"); + /* First plot, interleaved */ + printf("\\tabcolsep=0.11cm\n"); printf("\\renewcommand{\\arraystretch}{0.5}\n"); - printf("\\begin{tiny}\n"); + printf("\\begin{tiny}\n"); printf("\\begin{table*}\n"); - printf("\\caption{Apple II lores memory, showing the interleaving" - " of the 40x48 display.\\label{table:loresmap}}\n"); + printf("\\caption{Apple II lores display, 40x48. " + "Note the interleaving of the row addresses. " + "Rows 40-47 are ASCII text being interpreted as graphic blocks.\\label{table:loresmap}}\n"); printf("\\centering\n"); printf("\\begin{tabular}{|l|l|"); for(i=0;i>4)&0xf); + + } + if (i