hgr: vertical colors sorta right

This commit is contained in:
Vince Weaver 2018-07-02 13:55:48 -04:00
parent 4f285a2391
commit 6f7a6d1626

View File

@ -90,21 +90,20 @@ int hgr2(void) {
static void hposn(void) { static void hposn(void) {
unsigned char s;
unsigned char msktbl[]={0x81,0x82,0x84,0x88,0x90,0xA0,0xC0}; unsigned char msktbl[]={0x81,0x82,0x84,0x88,0x90,0xA0,0xC0};
// F411 // F411
ram[HGR_Y]=a; ram[HGR_Y]=a;
ram[HGR_X]=x; ram[HGR_X]=x;
ram[HGR_X+1]=y; ram[HGR_X+1]=y;
s=a; // pha pha();
a=a&0xC0; a=a&0xC0;
ram[GBASL]=a; ram[GBASL]=a;
lsr(); lsr();
lsr(); lsr();
a=a|ram[GBASL]; a=a|ram[GBASL];
ram[GBASL]=a; ram[GBASL]=a;
a=s; pla();
// F423 // F423
ram[GBASH]=a; ram[GBASH]=a;
asl(); asl();
@ -115,23 +114,20 @@ static void hposn(void) {
rol_mem(GBASH); rol_mem(GBASH);
asl(); asl();
ror_mem(GBASL); ror_mem(GBASL);
a=ram[GBASH]; lda(GBASH);
a=a&0x1f; a=a&0x1f;
a=a|ram[HGR_PAGE]; a=a|ram[HGR_PAGE];
ram[GBASH]=a; ram[GBASH]=a;
// F438 // F438
a=x; a=x;
if (y==0) { cpy(0);
c=0; if (z==1) goto hposn_2;
goto hposn_2;
} else {
c=1;
}
y=35; y=35;
adc(4); adc(4);
hposn_1: hposn_1:
y++; iny();
// f442 // f442
hposn_2: hposn_2:
sbc(7); sbc(7);
@ -406,4 +402,3 @@ int hcolor_equals(int color) {
return 0; return 0;
} }