|
|
| version 1.9, 2004/08/12 20:09:42 | version 1.13, 2004/08/17 16:52:46 |
|---|---|
| Line 11 | Line 11 |
| MAKESCRN makescrn; | MAKESCRN makescrn; |
| BYTE scrnallflash; | UINT8 scrnallflash; |
| static BYTE lastdisp = 0; | static UINT8 lastdisp = 0; |
| static BYTE blinktime = 1; | static UINT8 blinktime = 1; |
| UINT drawtime = 0; | UINT drawtime = 0; |
| Line 161 static void changecrtc(void) { | Line 161 static void changecrtc(void) { |
| REG8 y2; | REG8 y2; |
| UINT charcy; | UINT charcy; |
| UINT surfcy; | UINT surfcy; |
| UINT surfsy; | |
| UINT x; | UINT x; |
| UINT y; | UINT y; |
| UINT8 *p; | UINT8 *p; |
| makescrn.vramtop = crtc.e.pos; | makescrn.vramtop = crtc.e.pos; |
| scrnxmax = (crtc.s.reg[CRTCREG_HDISP] <= 40)?40:80; | scrnxmax = (crtc.s.width40)?40:80; |
| scrnymax = 200; | scrnymax = 200; |
| if (crtc.s.reg[CRTCREG_HDISP] <= 40) { | if (crtc.s.width40) { |
| if (lastdisp & SCRN_DRAW4096) { | if (lastdisp & SCRN_DRAW4096) { |
| widthmode = SCRNWIDTHMODE_4096; | widthmode = SCRNWIDTHMODE_4096; |
| } | } |
| Line 215 static void changecrtc(void) { | Line 216 static void changecrtc(void) { |
| surfcy = crtc.e.yl; | surfcy = crtc.e.yl; |
| } | } |
| surfsy = charcy * surfcy * 2; | |
| x = min(scrnxmax, makescrn.surfcx); | x = min(scrnxmax, makescrn.surfcx); |
| if (surfcx < x) { // 小さくなった | if (surfcx < x) { // 小さくなった |
| x = (x - surfcx) * 8; | x = (x - surfcx) * 8; |
| p = screenmap + (surfcx * 8); | p = screenmap + (surfcx * 8); |
| y = surfcy * 2; | y = surfsy; |
| while(y) { | while(y) { |
| y--; | y--; |
| ZeroMemory(p, x); | ZeroMemory(p, x); |
| p += SURFACE_WIDTH; | p += SURFACE_WIDTH; |
| } | } |
| } | } |
| if (surfcy < makescrn.surfcy) { | if (surfsy < makescrn.surfsy) { |
| ZeroMemory(screenmap + (SURFACE_WIDTH * surfcy * charcy * 2), | ZeroMemory(screenmap + (SURFACE_WIDTH * surfsy), |
| SURFACE_WIDTH * (makescrn.surfcy - surfcy) * charcy * 2); | SURFACE_WIDTH * (makescrn.surfsy - surfsy)); |
| } | } |
| makescrn.surfcx = surfcx; | makescrn.surfcx = surfcx; |
| makescrn.surfrx = textxl - surfcx; | makescrn.surfrx = textxl - surfcx; |
| makescrn.surfcy = surfcy; | makescrn.surfcy = surfcy; |
| makescrn.surfsy = surfsy; | |
| makescrn.surfstep = (SURFACE_WIDTH * charcy * 2) - (surfcx * 8); | makescrn.surfstep = (SURFACE_WIDTH * charcy * 2) - (surfcx * 8); |
| makescrn.vramsize = min(0x800, surfcy * textxl); | makescrn.vramsize = min(0x800, surfcy * textxl); |
| // scrnmng_setheight(0, charcy * surfcy * 2); | // scrnmng_setheight(0, charcy * surfcy * 2); |
| Line 266 void scrnupdate(void) { | Line 269 void scrnupdate(void) { |
| } | } |
| corestat.drawframe = 0; | corestat.drawframe = 0; |
| ddrawflash = FALSE; | ddrawflash = makescrn.nextdraw; |
| allflash = FALSE; | allflash = FALSE; |
| if (lastdisp != crtc.e.dispmode) { | if (lastdisp != crtc.e.dispmode) { |
| changemodes(); | changemodes(); |
| Line 347 void scrnupdate(void) { | Line 350 void scrnupdate(void) { |
| } | } |
| break; | break; |
| } | } |
| ddrawflash = 1; | ddrawflash = TRUE; |
| } | } |
| } | } |
| if (ddrawflash) { | if (ddrawflash) { |
| ddrawflash = 0; | ddrawflash = 0; |
| scrndraw_draw(allflash); | makescrn.nextdraw = scrndraw_draw(allflash); |
| drawtime++; | drawtime++; |
| } | } |
| } | } |