src/emu/video/saa5050.c
| r15730 | r15731 | |
| 5 | 5 | Functions to emulate the |
| 6 | 6 | SAA5050 - Teletext Character Generator. |
| 7 | 7 | |
| 8 | http://www.bighole.nl/pub/mirror/homepage.ntlworld.com/kryten_droid/teletext/spec/teletext_spec_1974.htm |
| 9 | |
| 8 | 10 | TODO: |
| 9 | 11 | - Implement BOX and dirtybuffer |
| 10 | 12 | - Add support for non-English version (SAA505x), possibly merging |
| r15730 | r15731 | |
| 214 | 216 | |
| 215 | 217 | for (sy = 0; sy <= saa5050->y; sy++) |
| 216 | 218 | { |
| 219 | bool dblhi = false; |
| 220 | |
| 217 | 221 | /* Set start of line state */ |
| 218 | 222 | saa5050->flags = 0; |
| 219 | 223 | saa5050->prvchr = 32; |
| r15730 | r15731 | |
| 265 | 269 | break; |
| 266 | 270 | case 0x0d: |
| 267 | 271 | saa5050->flags |= SAA5050_DBLHI; |
| 272 | dblhi = true; |
| 268 | 273 | break; |
| 269 | 274 | case 0x18: |
| 270 | 275 | saa5050->flags |= SAA5050_CONCEAL; |
| r15730 | r15731 | |
| 315 | 320 | } |
| 316 | 321 | } |
| 317 | 322 | |
| 318 | | if((blank == 0) || (saa5050->flags & SAA5050_HOLDGR)) |
| 323 | if ((blank == 0) || (saa5050->flags & SAA5050_HOLDGR)) |
| 319 | 324 | { |
| 320 | 325 | if (saa5050->flags & SAA5050_DBLHI) |
| 321 | 326 | { |
| 322 | | drawgfxzoom_opaque(bitmap, cliprect, saa5050->screen->machine().gfx[saa5050->gfxnum + 1], code, colour, 0, 0, sx * 12, ssy * 20, 0x20000, 0x20000); |
| 323 | | drawgfxzoom_opaque(bitmap, cliprect, saa5050->screen->machine().gfx[saa5050->gfxnum + 2], code, colour, 0, 0, sx * 12, (ssy + 1) * 20, 0x20000, 0x20000); |
| 327 | drawgfxzoom_opaque(bitmap, cliprect, saa5050->screen->machine().gfx[saa5050->gfxnum + 1], code & 0x7f, colour, 0, 0, sx * 12, ssy * 20, 0x20000, 0x20000); |
| 328 | drawgfxzoom_opaque(bitmap, cliprect, saa5050->screen->machine().gfx[saa5050->gfxnum + 2], code & 0x7f, colour, 0, 0, sx * 12, (ssy + 1) * 20, 0x20000, 0x20000); |
| 324 | 329 | } |
| 325 | 330 | else |
| 326 | 331 | { |
| 327 | | drawgfxzoom_opaque(bitmap, cliprect, saa5050->screen->machine().gfx[saa5050->gfxnum + 0], code, colour, 0, 0, sx * 12, ssy * 20, 0x20000, 0x20000); |
| 332 | drawgfxzoom_opaque(bitmap, cliprect, saa5050->screen->machine().gfx[saa5050->gfxnum + 0], code & 0x7f, colour, 0, 0, sx * 12, ssy * 20, 0x20000, 0x20000); |
| 328 | 333 | } |
| 329 | 334 | } |
| 330 | 335 | } |
| 331 | 336 | |
| 332 | | if (saa5050->flags & SAA5050_DBLHI) |
| 337 | if (dblhi) |
| 333 | 338 | { |
| 334 | 339 | sy++; |
| 335 | | saa5050->flags &= ~SAA5050_DBLHI; |
| 336 | 340 | } |
| 337 | 341 | } |
| 338 | 342 | } |