mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-10-09 11:54:59 +00:00
hgr: working reasonably well now
This commit is contained in:
parent
6f7a6d1626
commit
88adaa8586
@ -414,6 +414,7 @@ void draw_hires(unsigned int *out_pointer,int y_start, int y_end) {
|
||||
int temp_col;
|
||||
unsigned int *t_pointer;
|
||||
int last_last_pixel,last_pixel,current_byte,current_pixel,odd=0;
|
||||
int old_high=0,current_high;
|
||||
|
||||
t_pointer=out_pointer+(y_start*280*HGR_X_SCALE*HGR_Y_SCALE);
|
||||
|
||||
@ -436,6 +437,8 @@ void draw_hires(unsigned int *out_pointer,int y_start, int y_end) {
|
||||
for(xx=0;xx<HGR_XSIZE/7;xx++) {
|
||||
// printf("HGR ADDR=%x\n",gr_addr);
|
||||
current_byte=ram[gr_addr];
|
||||
|
||||
|
||||
// BBBBBBBB OOOOOOOO OO?WW?BB BB?KK?OO
|
||||
// 10101010 01010101 01011010 10100101
|
||||
// 1 1 010101 1 0 101010
|
||||
@ -443,6 +446,8 @@ void draw_hires(unsigned int *out_pointer,int y_start, int y_end) {
|
||||
|
||||
|
||||
for(i=0;i<7;i++) {
|
||||
old_high=current_high;
|
||||
current_high=!!(current_byte&0x80);
|
||||
current_pixel=!!(current_byte&(1<<i));
|
||||
|
||||
if (!odd) {
|
||||
@ -451,7 +456,7 @@ void draw_hires(unsigned int *out_pointer,int y_start, int y_end) {
|
||||
last_pixel<<1|
|
||||
current_pixel;
|
||||
|
||||
temp_col=((!!(current_byte&0x80))<<2)|
|
||||
temp_col=(old_high<<2)|
|
||||
hcolor_hack[pattern][0];
|
||||
|
||||
// printf("Temp col=%d\n",temp_col);
|
||||
@ -462,7 +467,7 @@ void draw_hires(unsigned int *out_pointer,int y_start, int y_end) {
|
||||
*t_pointer=hcolor[temp_col];
|
||||
t_pointer++;
|
||||
|
||||
temp_col=((!!(current_byte&0x80))<<2)|
|
||||
temp_col=(current_high<<2)|
|
||||
hcolor_hack[pattern][1];
|
||||
|
||||
*t_pointer=hcolor[temp_col];
|
||||
|
@ -29,6 +29,24 @@ int main(int argc, char **argv) {
|
||||
hplot_to(xx,100);
|
||||
}
|
||||
|
||||
/* Put vertical lines on screen */
|
||||
for(xx=0;xx<100;xx+=2) {
|
||||
hcolor_equals((xx%16)/2);
|
||||
hplot(xx,0);
|
||||
hplot_to(xx,30);
|
||||
}
|
||||
|
||||
|
||||
/* Put diagonal lines on screen */
|
||||
for(xx=100;xx<200;xx+=5) {
|
||||
hcolor_equals(3);
|
||||
hplot(150,100);
|
||||
hplot_to(xx,50);
|
||||
hplot(150,100);
|
||||
hplot_to(xx,150);
|
||||
}
|
||||
|
||||
|
||||
while(1) {
|
||||
grsim_update();
|
||||
|
||||
@ -39,10 +57,11 @@ int main(int argc, char **argv) {
|
||||
usleep(100000);
|
||||
|
||||
}
|
||||
#if 0
|
||||
int i;
|
||||
printf("20D0: ");
|
||||
for(i=0;i<16;i++) printf("%x ",ram[0x20d0+i]);
|
||||
printf("\n");
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user