src/mess/video/exidy.c
| r9688 | r9689 | |
| 1 | | /*************************************************************************** |
| 2 | | |
| 3 | | video/exidy.c |
| 4 | | |
| 5 | | Functions to emulate the video hardware of the Exidy Sorcerer |
| 6 | | |
| 7 | | ***************************************************************************/ |
| 8 | | |
| 9 | | #include "emu.h" |
| 10 | | #include "includes/exidy.h" |
| 11 | | |
| 12 | | |
| 13 | | VIDEO_UPDATE( exidy ) |
| 14 | | { |
| 15 | | UINT8 y,ra,chr,gfx; |
| 16 | | UINT16 sy=0,ma=0xf080,x; |
| 17 | | UINT8 *RAM = memory_region(screen->machine, "maincpu"); |
| 18 | | |
| 19 | | for (y = 0; y < 30; y++) |
| 20 | | { |
| 21 | | for (ra = 0; ra < 8; ra++) |
| 22 | | { |
| 23 | | UINT16 *p = BITMAP_ADDR16(bitmap, sy++, 0); |
| 24 | | |
| 25 | | for (x = ma; x < ma+64; x++) |
| 26 | | { |
| 27 | | chr = RAM[x]; |
| 28 | | |
| 29 | | /* get pattern of pixels for that character scanline */ |
| 30 | | gfx = RAM[0xf800 | (chr<<3) | ra]; |
| 31 | | |
| 32 | | /* Display a scanline of a character (8 pixels) */ |
| 33 | | *p = ( gfx & 0x80 ) ? 1 : 0; p++; |
| 34 | | *p = ( gfx & 0x40 ) ? 1 : 0; p++; |
| 35 | | *p = ( gfx & 0x20 ) ? 1 : 0; p++; |
| 36 | | *p = ( gfx & 0x10 ) ? 1 : 0; p++; |
| 37 | | *p = ( gfx & 0x08 ) ? 1 : 0; p++; |
| 38 | | *p = ( gfx & 0x04 ) ? 1 : 0; p++; |
| 39 | | *p = ( gfx & 0x02 ) ? 1 : 0; p++; |
| 40 | | *p = ( gfx & 0x01 ) ? 1 : 0; p++; |
| 41 | | } |
| 42 | | } |
| 43 | | ma+=64; |
| 44 | | } |
| 45 | | return 0; |
| 46 | | } |
src/mess/drivers/exidy.c
| r9688 | r9689 | |
| 343 | 343 | GFXDECODE_ENTRY( "maincpu", 0xf800, exidy_charlayout, 0, 1 ) |
| 344 | 344 | GFXDECODE_END |
| 345 | 345 | |
| 346 | static VIDEO_UPDATE( exidy ) |
| 347 | { |
| 348 | UINT8 y,ra,chr,gfx; |
| 349 | UINT16 sy=0,ma=0xf080,x; |
| 350 | UINT8 *RAM = memory_region(screen->machine, "maincpu"); |
| 351 | |
| 352 | for (y = 0; y < 30; y++) |
| 353 | { |
| 354 | for (ra = 0; ra < 8; ra++) |
| 355 | { |
| 356 | UINT16 *p = BITMAP_ADDR16(bitmap, sy++, 0); |
| 357 | |
| 358 | for (x = ma; x < ma+64; x++) |
| 359 | { |
| 360 | chr = RAM[x]; |
| 361 | |
| 362 | /* get pattern of pixels for that character scanline */ |
| 363 | gfx = RAM[0xf800 | (chr<<3) | ra]; |
| 364 | |
| 365 | /* Display a scanline of a character (8 pixels) */ |
| 366 | *p = ( gfx & 0x80 ) ? 1 : 0; p++; |
| 367 | *p = ( gfx & 0x40 ) ? 1 : 0; p++; |
| 368 | *p = ( gfx & 0x20 ) ? 1 : 0; p++; |
| 369 | *p = ( gfx & 0x10 ) ? 1 : 0; p++; |
| 370 | *p = ( gfx & 0x08 ) ? 1 : 0; p++; |
| 371 | *p = ( gfx & 0x04 ) ? 1 : 0; p++; |
| 372 | *p = ( gfx & 0x02 ) ? 1 : 0; p++; |
| 373 | *p = ( gfx & 0x01 ) ? 1 : 0; p++; |
| 374 | } |
| 375 | } |
| 376 | ma+=64; |
| 377 | } |
| 378 | return 0; |
| 379 | } |
| 380 | |
| 381 | |
| 346 | 382 | /**********************************************************************************************************/ |
| 347 | 383 | |
| 348 | 384 | static const ay31015_config exidy_ay31015_config = |