summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-10-24 15:38:08 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2013-10-24 15:38:08 (GMT)
commit47150b019ff05b74f25b1fb7ee82a8bff8b69fa5 (patch)
tree84aa25073ec3cd8f98eab0eeeb2e06ccf5b4257e
parentf1a60f3d78d16540f8bc9b93c76262b2754b71e5 (diff)
downloadabc80sim-47150b019ff05b74f25b1fb7ee82a8bff8b69fa5.zip
abc80sim-47150b019ff05b74f25b1fb7ee82a8bff8b69fa5.tar.gz
abc80sim-47150b019ff05b74f25b1fb7ee82a8bff8b69fa5.tar.bz2
abc80sim-47150b019ff05b74f25b1fb7ee82a8bff8b69fa5.tar.xz
Fix graphics mode
Fix braindamage in the font file (low right square always set!) Fix the handling of the graphics status on modifications.
-rw-r--r--abcfont.c64
-rw-r--r--sdlscrn.c9
2 files changed, 36 insertions, 37 deletions
diff --git a/abcfont.c b/abcfont.c
index 4547e72..304ef1f 100644
--- a/abcfont.c
+++ b/abcfont.c
@@ -159,38 +159,38 @@ unsigned char abc_font[256][10] = {
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 29G */
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 30G */
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 31G */
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x1c,0x1c}, /* 32G */
- {0xe0,0xe0,0xe0,0x00,0x00,0x00,0x00,0x1c,0x1c,0x1c}, /* 33G */
- {0x1c,0x1c,0x1c,0x00,0x00,0x00,0x00,0x1c,0x1c,0x1c}, /* 34G */
- {0xfc,0xfc,0xfc,0x00,0x00,0x00,0x00,0x1c,0x1c,0x1c}, /* 35G */
- {0x00,0x00,0x00,0xe0,0xe0,0xe0,0xe0,0x1c,0x1c,0x1c}, /* 36G */
- {0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0x1c,0x1c,0x1c}, /* 37G */
- {0x1c,0x1c,0x1c,0xe0,0xe0,0xe0,0xe0,0x1c,0x1c,0x1c}, /* 38G */
- {0xfc,0xfc,0xfc,0xe0,0xe0,0xe0,0xe0,0x1c,0x1c,0x1c}, /* 39G */
- {0x00,0x00,0x00,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c}, /* 40G */
- {0xe0,0xe0,0xe0,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c}, /* 41G */
- {0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c}, /* 42G */
- {0xfc,0xfc,0xfc,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c}, /* 43G */
- {0x00,0x00,0x00,0xfc,0xfc,0xfc,0xfc,0x1c,0x1c,0x1c}, /* 44G */
- {0xe0,0xe0,0xe0,0xfc,0xfc,0xfc,0xfc,0x1c,0x1c,0x1c}, /* 45G */
- {0x1c,0x1c,0x1c,0xfc,0xfc,0xfc,0xfc,0x1c,0x1c,0x1c}, /* 46G */
- {0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0x1c,0x1c,0x1c}, /* 47G */
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xfc}, /* 48G */
- {0xe0,0xe0,0xe0,0x00,0x00,0x00,0x00,0xfc,0xfc,0xfc}, /* 49G */
- {0x1c,0x1c,0x1c,0x00,0x00,0x00,0x00,0xfc,0xfc,0xfc}, /* 50G */
- {0xfc,0xfc,0xfc,0x00,0x00,0x00,0x00,0xfc,0xfc,0xfc}, /* 51G */
- {0x00,0x00,0x00,0xe0,0xe0,0xe0,0xe0,0xfc,0xfc,0xfc}, /* 52G */
- {0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xfc,0xfc,0xfc}, /* 53G */
- {0x1c,0x1c,0x1c,0xe0,0xe0,0xe0,0xe0,0xfc,0xfc,0xfc}, /* 54G */
- {0xfc,0xfc,0xfc,0xe0,0xe0,0xe0,0xe0,0xfc,0xfc,0xfc}, /* 55G */
- {0x00,0x00,0x00,0x1c,0x1c,0x1c,0x1c,0xfc,0xfc,0xfc}, /* 56G */
- {0xe0,0xe0,0xe0,0x1c,0x1c,0x1c,0x1c,0xfc,0xfc,0xfc}, /* 57G */
- {0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0xfc,0xfc,0xfc}, /* 58G */
- {0xfc,0xfc,0xfc,0x1c,0x1c,0x1c,0x1c,0xfc,0xfc,0xfc}, /* 59G */
- {0x00,0x00,0x00,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc}, /* 60G */
- {0xe0,0xe0,0xe0,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc}, /* 61G */
- {0x1c,0x1c,0x1c,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc}, /* 62G */
- {0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc}, /* 63G */
+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 32G */
+ {0xe0,0xe0,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 33G */
+ {0x1c,0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 34G */
+ {0xfc,0xfc,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 35G */
+ {0x00,0x00,0x00,0xe0,0xe0,0xe0,0xe0,0x00,0x00,0x00}, /* 36G */
+ {0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0x00,0x00,0x00}, /* 37G */
+ {0x1c,0x1c,0x1c,0xe0,0xe0,0xe0,0xe0,0x00,0x00,0x00}, /* 38G */
+ {0xfc,0xfc,0xfc,0xe0,0xe0,0xe0,0xe0,0x00,0x00,0x00}, /* 39G */
+ {0x00,0x00,0x00,0x1c,0x1c,0x1c,0x1c,0x00,0x00,0x00}, /* 40G */
+ {0xe0,0xe0,0xe0,0x1c,0x1c,0x1c,0x1c,0x00,0x00,0x00}, /* 41G */
+ {0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x00,0x00,0x00}, /* 42G */
+ {0xfc,0xfc,0xfc,0x1c,0x1c,0x1c,0x1c,0x00,0x00,0x00}, /* 43G */
+ {0x00,0x00,0x00,0xfc,0xfc,0xfc,0xfc,0x00,0x00,0x00}, /* 44G */
+ {0xe0,0xe0,0xe0,0xfc,0xfc,0xfc,0xfc,0x00,0x00,0x00}, /* 45G */
+ {0x1c,0x1c,0x1c,0xfc,0xfc,0xfc,0xfc,0x00,0x00,0x00}, /* 46G */
+ {0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0x00,0x00,0x00}, /* 47G */
+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xe0,0xe0}, /* 48G */
+ {0xe0,0xe0,0xe0,0x00,0x00,0x00,0x00,0xe0,0xe0,0xe0}, /* 49G */
+ {0x1c,0x1c,0x1c,0x00,0x00,0x00,0x00,0xe0,0xe0,0xe0}, /* 50G */
+ {0xfc,0xfc,0xfc,0x00,0x00,0x00,0x00,0xe0,0xe0,0xe0}, /* 51G */
+ {0x00,0x00,0x00,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0}, /* 52G */
+ {0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0}, /* 53G */
+ {0x1c,0x1c,0x1c,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0}, /* 54G */
+ {0xfc,0xfc,0xfc,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0}, /* 55G */
+ {0x00,0x00,0x00,0x1c,0x1c,0x1c,0x1c,0xe0,0xe0,0xe0}, /* 56G */
+ {0xe0,0xe0,0xe0,0x1c,0x1c,0x1c,0x1c,0xe0,0xe0,0xe0}, /* 57G */
+ {0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0xe0,0xe0,0xe0}, /* 58G */
+ {0xfc,0xfc,0xfc,0x1c,0x1c,0x1c,0x1c,0xe0,0xe0,0xe0}, /* 59G */
+ {0x00,0x00,0x00,0xfc,0xfc,0xfc,0xfc,0xe0,0xe0,0xe0}, /* 60G */
+ {0xe0,0xe0,0xe0,0xfc,0xfc,0xfc,0xfc,0xe0,0xe0,0xe0}, /* 61G */
+ {0x1c,0x1c,0x1c,0xfc,0xfc,0xfc,0xfc,0xe0,0xe0,0xe0}, /* 62G */
+ {0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xe0,0xe0,0xe0}, /* 63G */
{0x10,0x20,0x00,0xf8,0x80,0xf0,0x80,0xf8,0x00,0x00}, /* 64G */
{0x00,0x20,0x50,0x88,0x88,0xf8,0x88,0x88,0x00,0x00}, /* 65G */
{0x00,0xf0,0x48,0x48,0x70,0x48,0x48,0xf0,0x00,0x00}, /* 66G */
diff --git a/sdlscrn.c b/sdlscrn.c
index 23d3468..b33bfa4 100644
--- a/sdlscrn.c
+++ b/sdlscrn.c
@@ -201,16 +201,15 @@ screen_write(int addr, int value)
*p = value;
put_screen(x,y);
- xx = x;
+ xx = x+1;
- if ( (old & 0x78) == 0 || (value & 0x78) == 0 ) {
+ if ( (old & 0x68) == 0 || (value & 0x68) == 0 ) {
/* Graphics control character change */
- for ( xx = x+1 ; xx < width ; xx++ )
+ for ( ; xx < width ; xx++ )
put_screen(xx,y);
- xx = width-1;
}
- update_screen(x,y,xx,y);
+ update_screen(x,y,xx-1,y);
}
void setmode40(int m)