| Previous | 15994 Revisions | Next |
| r1444 Friday 28th December, 2007 at 15:47:56 UTC by Nathan Woods |
|---|
| Machine variable and gfxdecode cleanups [Atari Ace] |
| [docs] | messnew.txt |
| [src/mess/drivers] | abc80.c abc80x.c amstrad.c apexc.c apple1.c apple2.c apple2gs.c aquarius.c arcadia.c c128.c cbmb.c cgenie.c comquest.c galaxy.c gamecom.c gb.c hp48.c intv.c jupiter.c kaypro.c kim1.c mbee.c mekd2.c microtan.c mz700.c nascom1.c odyssey2.c osi.c p2000t.c pc.c pc8801.c pce.c pdp1.c pet.c pocketc.c saturn.c snes.c spectrum.c super80.c svision.c ti990_10.c ti990_4.c ti99_2.c ti99_4p.c tm990189.c trs80.c tx0.c vc4000.c vtech2.c wswan.c x68k.c zx.c |
| [src/mess/includes] | sms.h |
| [src/mess/machine] | apple2.c coco.c dgn_beta.c lisa.c mac.c sms.c svi318.c ti99_4x.c |
| [src/mess/osd/winui] | winui.mak |
| [src/mess/video] | 733_asr.c 733_asr.h 911_vdt.c 911_vdt.h advision.c aim65.c arcadia.c avigo.c cbmb.c cdp1861.c cdp1864.c cgenie.c channelf.c comquest.c dai.c exidy.c galaxy.c hd66421.c hp48.c intv.c jupiter.c lviv.c mbee.c mekd2.c mz700.c nascom1.c nc.c odyssey2.c p2000m.c pc1251.c pc1350.c pc1401.c pc1403.c pc8801.c pc_aga.c pc_aga.h pc_cga.c pc_mda.c pc_mda.h pc_t1t.c pc_video.c pcw.c pcw16.c pdp1.c pet.c pocketc.c saa5050.c smsvdp.c spectrum.c ssystem3.c ted7360.c thomson.c ti85.c tms3556.c tx0.c vc4000.c vdc8563.c vectrex.c vic6560.c vic6567.c vtech2.c x68k.c z88.c |
| r1443 | r1444 | |
|---|---|---|
| 50 | 50 | |
| 51 | 51 | void setup_rom(void); |
| 52 | 52 | |
| 53 | void check_pause_button( void ); | |
| 53 | void sms_check_pause_button( void ); | |
| 54 | 54 | |
| 55 | 55 | DEVICE_INIT( sms_cart ); |
| 56 | 56 | DEVICE_LOAD( sms_cart ); |
| r1443 | r1444 | |
|---|---|---|
| 23 | 23 | for (y=0; y<128;y++) { |
| 24 | 24 | for (x=0, j=0; j<8;j++,x+=8*4) { |
| 25 | 25 | #if 0 |
| 26 | drawgfx(bitmap, | |
| 26 | drawgfx(bitmap, machine->gfx[0], studio2_video.data[y][j],0, | |
| 27 | 27 | 0,0,x,y, |
| 28 | 28 | 0, TRANSPARENCY_NONE,0); |
| 29 | 29 | #endif |
| r1443 | r1444 | |
|---|---|---|
| 161 | 161 | |
| 162 | 162 | VIDEO_START( vic6560 ) |
| 163 | 163 | { |
| 164 | black = Machine->pens[0]; | |
| 165 | white = Machine->pens[1]; | |
| 164 | black = machine->pens[0]; | |
| 165 | white = machine->pens[1]; | |
| 166 | 166 | pointerelement = allocgfx(&pointerlayout); |
| 167 | 167 | decodegfx(pointerelement, pointermask, 0, 1); |
| 168 | 168 | /* 7-Sep-2007 - After 0.118u5, you cannot revector the color table */ |
| 169 | 169 | /* pointerelement->colortable = pointercolortable; */ |
| 170 | pointercolortable[1] = Machine->pens[1]; | |
| 171 | pointercolortable[2] = Machine->pens[0]; | |
| 170 | pointercolortable[1] = machine->pens[1]; | |
| 171 | pointercolortable[2] = machine->pens[0]; | |
| 172 | 172 | pointerelement->total_colors = 3; |
| 173 | vic6560_bitmap = auto_bitmap_alloc( | |
| 173 | vic6560_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); | |
| 174 | 174 | add_exit_callback(machine, vic6560_video_stop); |
| 175 | 175 | } |
| 176 | 176 |
| r1443 | r1444 | |
|---|---|---|
| 63 | 63 | /* set up out bitmaps */ |
| 64 | 64 | pdp1_draw_panel_backdrop(panel_bitmap); |
| 65 | 65 | |
| 66 | fillbitmap(typewriter_bitmap, | |
| 66 | fillbitmap(typewriter_bitmap, machine->pens[pen_typewriter_bg], &typewriter_bitmap_bounds); | |
| 67 | 67 | |
| 68 | 68 | /* initialize CRT */ |
| 69 | 69 | video_start_crt(pen_crt_num_levels, crt_window_offset_x, crt_window_offset_y, crt_window_width, crt_window_height); |
| r1443 | r1444 | |
| 92 | 92 | pdp1_draw_lightpen(bitmap); |
| 93 | 93 | |
| 94 | 94 | pdp1_draw_panel(panel_bitmap); |
| 95 | copybitmap(bitmap, panel_bitmap, 0, 0, panel_window_offset_x, panel_window_offset_y, & | |
| 95 | copybitmap(bitmap, panel_bitmap, 0, 0, panel_window_offset_x, panel_window_offset_y, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 96 | 96 | |
| 97 | copybitmap(bitmap, typewriter_bitmap, 0, 0, typewriter_window_offset_x, typewriter_window_offset_y, & | |
| 97 | copybitmap(bitmap, typewriter_bitmap, 0, 0, typewriter_window_offset_x, typewriter_window_offset_y, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 98 | 98 | return 0; |
| 99 | 99 | } |
| 100 | 100 |
| r1443 | r1444 | |
|---|---|---|
| 142 | 142 | bitmap_fill(bitmap, cliprect, 5); |
| 143 | 143 | |
| 144 | 144 | /* HJB: we cannot initialize array with values from other arrays, thus... */ |
| 145 | color[0] = Machine->pens[pocketc_colortable[CONTRAST][0]]; | |
| 146 | color[1] = Machine->pens[pocketc_colortable[CONTRAST][1]]; | |
| 145 | color[0] = machine->pens[pocketc_colortable[CONTRAST][0]]; | |
| 146 | color[1] = machine->pens[pocketc_colortable[CONTRAST][1]]; | |
| 147 | 147 | |
| 148 | 148 | if (pc1401_portc&1) { |
| 149 | 149 | for (x=RIGHT,y=DOWN,i=0; i<0x28;x+=2) { |
| 150 | 150 | for (j=0; j<5;j++,i++,x+=2) |
| 151 | drawgfx(bitmap, | |
| 151 | drawgfx(bitmap, machine->gfx[0], pc1401_lcd.reg[i],CONTRAST,0,0, | |
| 152 | 152 | x,y, |
| 153 | 153 | 0, TRANSPARENCY_NONE,0); |
| 154 | 154 | } |
| 155 | 155 | for (i=0x67; i>=0x40;x+=2) { |
| 156 | 156 | for (j=0; j<5;j++,i--,x+=2) |
| 157 | drawgfx(bitmap, | |
| 157 | drawgfx(bitmap, machine->gfx[0], pc1401_lcd.reg[i],CONTRAST,0,0, | |
| 158 | 158 | x,y, |
| 159 | 159 | 0, TRANSPARENCY_NONE,0); |
| 160 | 160 | } |
| r1443 | r1444 | |
|---|---|---|
| 66 | 66 | { |
| 67 | 67 | char backdrop_name[200]; |
| 68 | 68 | /* try to load a backdrop for the machine */ |
| 69 | sprintf (backdrop_name, "%s.png", | |
| 69 | sprintf (backdrop_name, "%s.png", machine->gamedrv->name); | |
| 70 | 70 | backdrop_load(backdrop_name, 8); |
| 71 | 71 | } |
| 72 | 72 | #endif |
| r1443 | r1444 | |
| 165 | 165 | int contrast=(hp48_hardware.data[1]|((hp48_hardware.data[2]&1)<<4)); |
| 166 | 166 | |
| 167 | 167 | /* HJB: we cannot initialize array with values from other arrays, thus... */ |
| 168 | color[0] = Machine->pens[0]; | |
| 169 | // color[0] = Machine->pens[1]; | |
| 170 | color[1] = Machine->pens[1]; | |
| 168 | color[0] = machine->pens[0]; | |
| 169 | // color[0] = machine->pens[1]; | |
| 170 | color[1] = machine->pens[1]; | |
| 171 | 171 | |
| 172 | 172 | |
| 173 | 173 | for (y=0,i=LCD_BASE_ADDRESS; y<64; y+=8, i+=LCD_LINE_OFFSET) { |
| 174 | 174 | for (x=0; x<131; x++) { |
| 175 | drawgfx(bitmap, | |
| 175 | drawgfx(bitmap, machine->gfx[0], | |
| 176 | 176 | program_read_byte(i+x), |
| 177 | 177 | contrast,0,0, |
| 178 | 178 | x*2+RIGHT,y*2+DOWN, |
| r1443 | r1444 | |
|---|---|---|
| 42 | 42 | 10*8 /* every char takes 10 consecutive bytes */ |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | GFXDECODE_START( vdt911 | |
| 45 | GFXDECODE_START( vdt911 | |
| 46 | 46 | /* array must use same order as vdt911_model_t!!! */ |
| 47 | 47 | /* US */ |
| 48 | 48 | GFXDECODE_ENTRY( vdt911_chr_region, vdt911_US_chr_offset, fontlayout_7bit, 0, 4 ) |
| r1443 | r1444 | |
|---|---|---|
| 20 | 20 | vdt911_chr_region_len = vdt911_japanese_chr_offset+256*vdt911_single_char_len |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | GFXDECODE_EXTERN( vdt911 | |
| 23 | GFXDECODE_EXTERN( vdt911 | |
| 24 | 24 | |
| 25 | 25 | extern const unsigned char vdt911_palette[]; |
| 26 | 26 | extern const unsigned short vdt911_colortable[]; |
| r1443 | r1444 | |
|---|---|---|
| 140 | 140 | { |
| 141 | 141 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 142 | 142 | for (l=0; l<12; l++) |
| 143 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = | |
| 143 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = machine->pens[current_colour]; | |
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | } |
| r1443 | r1444 | |
| 157 | 157 | { |
| 158 | 158 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 159 | 159 | for (l=0; l<12; l++) |
| 160 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = | |
| 160 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = machine->pens[current_colour]; | |
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | } |
| r1443 | r1444 | |
| 179 | 179 | { |
| 180 | 180 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 181 | 181 | for (l=0; l<6; l++) |
| 182 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = | |
| 182 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = machine->pens[current_colour]; | |
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | } |
| r1443 | r1444 | |
| 196 | 196 | { |
| 197 | 197 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 198 | 198 | for (l=0; l<6; l++) |
| 199 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = | |
| 199 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = machine->pens[current_colour]; | |
| 200 | 200 | } |
| 201 | 201 | } |
| 202 | 202 | } |
| r1443 | r1444 | |
| 218 | 218 | { |
| 219 | 219 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 220 | 220 | for (l=0; l<3; l++) |
| 221 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = | |
| 221 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = machine->pens[current_colour]; | |
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | 224 | } |
| r1443 | r1444 | |
| 234 | 234 | { |
| 235 | 235 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 236 | 236 | for (l=0; l<3; l++) |
| 237 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = | |
| 237 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = machine->pens[current_colour]; | |
| 238 | 238 | } |
| 239 | 239 | } |
| 240 | 240 | } |
| r1443 | r1444 | |
| 256 | 256 | { |
| 257 | 257 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 258 | 258 | for (l=0; l<2; l++) |
| 259 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = | |
| 259 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = machine->pens[current_colour]; | |
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | 262 | } |
| r1443 | r1444 | |
| 272 | 272 | { |
| 273 | 273 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 274 | 274 | for (l=0; l<2; l++) |
| 275 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = | |
| 275 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = machine->pens[current_colour]; | |
| 276 | 276 | } |
| 277 | 277 | } |
| 278 | 278 | } |
| r1443 | r1444 | |
| 301 | 301 | { |
| 302 | 302 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 303 | 303 | for (l=0; l<12; l++) |
| 304 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = | |
| 304 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = machine->pens[current_colour]; | |
| 305 | 305 | } |
| 306 | 306 | } |
| 307 | 307 | } |
| r1443 | r1444 | |
| 319 | 319 | { |
| 320 | 320 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 321 | 321 | for (l=0; l<12; l++) |
| 322 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = | |
| 322 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = machine->pens[current_colour]; | |
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | } |
| r1443 | r1444 | |
| 342 | 342 | { |
| 343 | 343 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 344 | 344 | for (l=0; l<6; l++) |
| 345 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = | |
| 345 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = machine->pens[current_colour]; | |
| 346 | 346 | } |
| 347 | 347 | } |
| 348 | 348 | } |
| r1443 | r1444 | |
| 360 | 360 | { |
| 361 | 361 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 362 | 362 | for (l=0; l<6; l++) |
| 363 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = | |
| 363 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = machine->pens[current_colour]; | |
| 364 | 364 | } |
| 365 | 365 | } |
| 366 | 366 | } |
| r1443 | r1444 | |
| 383 | 383 | { |
| 384 | 384 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 385 | 385 | for (l=0; l<3; l++) |
| 386 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = | |
| 386 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = machine->pens[current_colour]; | |
| 387 | 387 | } |
| 388 | 388 | } |
| 389 | 389 | } |
| r1443 | r1444 | |
| 400 | 400 | { |
| 401 | 401 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 402 | 402 | for (l=0; l<3; l++) |
| 403 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = | |
| 403 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = machine->pens[current_colour]; | |
| 404 | 404 | } |
| 405 | 405 | } |
| 406 | 406 | } |
| r1443 | r1444 | |
| 422 | 422 | { |
| 423 | 423 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 424 | 424 | for (l=0; l<2; l++) |
| 425 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = | |
| 425 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = machine->pens[current_colour]; | |
| 426 | 426 | } |
| 427 | 427 | } |
| 428 | 428 | } |
| r1443 | r1444 | |
| 439 | 439 | { |
| 440 | 440 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 441 | 441 | for (l=0; l<2; l++) |
| 442 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = | |
| 442 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = machine->pens[current_colour]; | |
| 443 | 443 | } |
| 444 | 444 | } |
| 445 | 445 | } |
| r1443 | r1444 | |
| 467 | 467 | { |
| 468 | 468 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 469 | 469 | for (l=0; l<12; l++) |
| 470 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = | |
| 470 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = machine->pens[current_colour]; | |
| 471 | 471 | } |
| 472 | 472 | } |
| 473 | 473 | } |
| r1443 | r1444 | |
| 484 | 484 | { |
| 485 | 485 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 486 | 486 | for (l=0; l<12; l++) |
| 487 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = | |
| 487 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = machine->pens[current_colour]; | |
| 488 | 488 | } |
| 489 | 489 | } |
| 490 | 490 | } |
| r1443 | r1444 | |
| 506 | 506 | { |
| 507 | 507 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 508 | 508 | for (l=0; l<6; l++) |
| 509 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = | |
| 509 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = machine->pens[current_colour]; | |
| 510 | 510 | } |
| 511 | 511 | } |
| 512 | 512 | } |
| r1443 | r1444 | |
| 523 | 523 | { |
| 524 | 524 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 525 | 525 | for (l=0; l<6; l++) |
| 526 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = | |
| 526 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = machine->pens[current_colour]; | |
| 527 | 527 | } |
| 528 | 528 | } |
| 529 | 529 | } |
| r1443 | r1444 | |
| 545 | 545 | { |
| 546 | 546 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 547 | 547 | for (l=0; l<3; l++) |
| 548 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = | |
| 548 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = machine->pens[current_colour]; | |
| 549 | 549 | } |
| 550 | 550 | } |
| 551 | 551 | } |
| r1443 | r1444 | |
| 561 | 561 | { |
| 562 | 562 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 563 | 563 | for (l=0; l<3; l++) |
| 564 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = | |
| 564 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = machine->pens[current_colour]; | |
| 565 | 565 | } |
| 566 | 566 | } |
| 567 | 567 | } |
| r1443 | r1444 | |
| 583 | 583 | { |
| 584 | 584 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 585 | 585 | for (l=0; l<2; l++) |
| 586 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = | |
| 586 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = machine->pens[current_colour]; | |
| 587 | 587 | } |
| 588 | 588 | } |
| 589 | 589 | } |
| r1443 | r1444 | |
| 599 | 599 | { |
| 600 | 600 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 601 | 601 | for (l=0; l<2; l++) |
| 602 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = | |
| 602 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = machine->pens[current_colour]; | |
| 603 | 603 | } |
| 604 | 604 | } |
| 605 | 605 | } |
| r1443 | r1444 | |
| 626 | 626 | { |
| 627 | 627 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 628 | 628 | for (l=0; l<12; l++) |
| 629 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = | |
| 629 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = machine->pens[current_colour]; | |
| 630 | 630 | } |
| 631 | 631 | } |
| 632 | 632 | } |
| r1443 | r1444 | |
| 643 | 643 | { |
| 644 | 644 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 645 | 645 | for (l=0; l<12; l++) |
| 646 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = | |
| 646 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = machine->pens[current_colour]; | |
| 647 | 647 | } |
| 648 | 648 | } |
| 649 | 649 | } |
| r1443 | r1444 | |
| 665 | 665 | { |
| 666 | 666 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 667 | 667 | for (l=0; l<6; l++) |
| 668 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = | |
| 668 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = machine->pens[current_colour]; | |
| 669 | 669 | } |
| 670 | 670 | } |
| 671 | 671 | } |
| r1443 | r1444 | |
| 682 | 682 | { |
| 683 | 683 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 684 | 684 | for (l=0; l<6; l++) |
| 685 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = | |
| 685 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = machine->pens[current_colour]; | |
| 686 | 686 | } |
| 687 | 687 | } |
| 688 | 688 | } |
| r1443 | r1444 | |
| 704 | 704 | { |
| 705 | 705 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 706 | 706 | for (l=0; l<3; l++) |
| 707 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = | |
| 707 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = machine->pens[current_colour]; | |
| 708 | 708 | } |
| 709 | 709 | } |
| 710 | 710 | } |
| r1443 | r1444 | |
| 720 | 720 | { |
| 721 | 721 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 722 | 722 | for (l=0; l<3; l++) |
| 723 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = | |
| 723 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = machine->pens[current_colour]; | |
| 724 | 724 | } |
| 725 | 725 | } |
| 726 | 726 | } |
| r1443 | r1444 | |
| 741 | 741 | { |
| 742 | 742 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 743 | 743 | for (l=0; l<2; l++) |
| 744 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = | |
| 744 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = machine->pens[current_colour]; | |
| 745 | 745 | } |
| 746 | 746 | } |
| 747 | 747 | } |
| r1443 | r1444 | |
| 757 | 757 | { |
| 758 | 758 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 759 | 759 | for (l=0; l<2; l++) |
| 760 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = | |
| 760 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = machine->pens[current_colour]; | |
| 761 | 761 | } |
| 762 | 762 | } |
| 763 | 763 | } |
| r1443 | r1444 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | if (nc200_backlight) |
| 74 | 74 | { |
| 75 | pens[0] = Machine->pens[2]; | |
| 76 | pens[1] = Machine->pens[3]; | |
| 75 | pens[0] = machine->pens[2]; | |
| 76 | pens[1] = machine->pens[3]; | |
| 77 | 77 | } |
| 78 | 78 | else |
| 79 | 79 | { |
| 80 | pens[0] = Machine->pens[0]; | |
| 81 | pens[1] = Machine->pens[1]; | |
| 80 | pens[0] = machine->pens[0]; | |
| 81 | pens[1] = machine->pens[1]; | |
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | else |
| 85 | 85 | { |
| 86 | 86 | height = NC_SCREEN_HEIGHT; |
| 87 | 87 | width = NC_SCREEN_WIDTH; |
| 88 | pens[0] = Machine->pens[2]; | |
| 89 | pens[1] = Machine->pens[3]; | |
| 88 | pens[0] = machine->pens[2]; | |
| 89 | pens[1] = machine->pens[3]; | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 |
| r1443 | r1444 | |
|---|---|---|
| 47 | 47 | // if( i < 176 || i > 223 ) |
| 48 | 48 | { |
| 49 | 49 | int y; |
| 50 | for( y = 0; y < Machine->gfx[0]->height; y++ ) { | |
| 51 | Machine->gfx[0]->gfxdata[(i * Machine->gfx[0]->height + y) * Machine->gfx[0]->width + 8] = 0; | |
| 52 | Machine->gfx[1]->gfxdata[(i * Machine->gfx[1]->height + y) * Machine->gfx[1]->width + 8] = 0; | |
| 50 | for( y = 0; y < machine->gfx[0]->height; y++ ) { | |
| 51 | machine->gfx[0]->gfxdata[(i * machine->gfx[0]->height + y) * machine->gfx[0]->width + 8] = 0; | |
| 52 | machine->gfx[1]->gfxdata[(i * machine->gfx[1]->height + y) * machine->gfx[1]->width + 8] = 0; | |
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | } |
| r1443 | r1444 | |
|---|---|---|
| 535 | 535 | sx = (off_x + ((offs - screen_) % crt.horizontal_displayed)) * 8; |
| 536 | 536 | code = videoram[offs]; |
| 537 | 537 | color = colorram[offs]; |
| 538 | drawgfx( bitmap,Machine->gfx[0],code,color,0,0,sx,sy, | |
| 539 | &Machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 538 | drawgfx( bitmap,machine->gfx[0],code,color,0,0,sx,sy, | |
| 539 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 540 | 540 | dirtybuffer[offs] = 0; |
| 541 | 541 | if( offs == cursor && (crt.cursor_top & 0x60) != 0x20 ) |
| 542 | 542 | { |
| r1443 | r1444 | |
| 548 | 548 | if( y > crt.scan_lines ) |
| 549 | 549 | break; |
| 550 | 550 | for( x = 0; x < 8; x++ ) |
| 551 | *BITMAP_ADDR16(bitmap, sy+y, sx+x) = | |
| 551 | *BITMAP_ADDR16(bitmap, sy+y, sx+x) = machine->pens[color]; | |
| 552 | 552 | } |
| 553 | 553 | dirtybuffer[offs] = 1; |
| 554 | 554 | } |
| r1443 | r1444 | |
|---|---|---|
| 139 | 139 | bitmap_fill(bitmap, cliprect, 5); |
| 140 | 140 | |
| 141 | 141 | /* HJB: we cannot initialize array with values from other arrays, thus... */ |
| 142 | color[0] = Machine->pens[pocketc_colortable[PC1350_CONTRAST][0]]; | |
| 143 | color[1] = Machine->pens[pocketc_colortable[PC1350_CONTRAST][1]]; | |
| 142 | color[0] = machine->pens[pocketc_colortable[PC1350_CONTRAST][0]]; | |
| 143 | color[1] = machine->pens[pocketc_colortable[PC1350_CONTRAST][1]]; | |
| 144 | 144 | |
| 145 | 145 | for (k=0, y=DOWN; k<4; y+=16,k++) |
| 146 | 146 | { |
| r1443 | r1444 | |
|---|---|---|
| 47 | 47 | { |
| 48 | 48 | char backdrop_name[200]; |
| 49 | 49 | /* try to load a backdrop for the machine */ |
| 50 | sprintf(backdrop_name, "%s.png", | |
| 50 | sprintf(backdrop_name, "%s.png", machine->gamedrv->name); | |
| 51 | 51 | backdrop_load(backdrop_name, 8); |
| 52 | 52 | } |
| 53 | 53 | #endif |
| r1443 | r1444 | |
|---|---|---|
| 181 | 181 | /* inverted graphics? */ |
| 182 | 182 | if (byte1 & Z88_SCR_HW_REV) |
| 183 | 183 | { |
| 184 | pen1 = | |
| 184 | pen1 = machine->pens[0]; | |
| 185 | 185 | |
| 186 | 186 | if (byte1 & Z88_SCR_HW_GRY) |
| 187 | 187 | { |
| 188 | pen0 = | |
| 188 | pen0 = machine->pens[2]; | |
| 189 | 189 | } |
| 190 | 190 | else |
| 191 | 191 | { |
| 192 | pen0 = | |
| 192 | pen0 = machine->pens[1]; | |
| 193 | 193 | } |
| 194 | 194 | } |
| 195 | 195 | else |
| 196 | 196 | { |
| 197 | pen0 = | |
| 197 | pen0 = machine->pens[0]; | |
| 198 | 198 | if (byte1 & Z88_SCR_HW_GRY) |
| 199 | 199 | { |
| 200 | pen1 = | |
| 200 | pen1 = machine->pens[2]; | |
| 201 | 201 | } |
| 202 | 202 | else |
| 203 | 203 | { |
| 204 | pen1 = | |
| 204 | pen1 = machine->pens[1]; | |
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 |
| r1443 | r1444 | |
|---|---|---|
| 178 | 178 | border_colour = pcw16_colour_palette[1]; |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | border_colour = | |
| 181 | border_colour = machine->pens[border_colour]; | |
| 182 | 182 | |
| 183 | 183 | if ((pcw16_video_control & (1<<6))==0) |
| 184 | 184 | { |
| r1443 | r1444 | |
|---|---|---|
| 108 | 108 | for( bit = 0; bit < 8; bit++ ) |
| 109 | 109 | { |
| 110 | 110 | if( *led > 0 ) |
| 111 | *BITMAP_ADDR16(bitmap, 30 + 2 *( y * 8 + bit), 85 + x) = | |
| 111 | *BITMAP_ADDR16(bitmap, 30 + 2 *( y * 8 + bit), 85 + x) = machine->pens[--(*led)]; | |
| 112 | 112 | led += 256; |
| 113 | 113 | } |
| 114 | 114 | } |
| r1443 | r1444 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | if( full_refresh ) |
| 56 | 56 | { |
| 57 | fillbitmap(bitmap, | |
| 57 | fillbitmap(bitmap, machine->pens[0], &machine->screen[0].visarea); | |
| 58 | 58 | memset(dirtybuffer, 1, videoram_size); |
| 59 | 59 | } |
| 60 | 60 | |
| r1443 | r1444 | |
| 72 | 72 | color = colorram[offs]; |
| 73 | 73 | code |= (color & 0x80) << 1; |
| 74 | 74 | |
| 75 | drawgfx(bitmap,Machine->gfx[0],code,color,0,0,sx,sy, | |
| 76 | &Machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 75 | drawgfx(bitmap,machine->gfx[0],code,color,0,0,sx,sy, | |
| 76 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | return 0; |
| r1443 | r1444 | |
|---|---|---|
| 258 | 258 | { |
| 259 | 259 | int width, height; |
| 260 | 260 | |
| 261 | width = Machine->screen[0].width; | |
| 262 | height = Machine->screen[0].height; | |
| 261 | width = machine->screen[0].width; | |
| 262 | height = machine->screen[0].height; | |
| 263 | 263 | |
| 264 | x_center=((Machine->screen[0].visarea.max_x | |
| 265 | -Machine->screen[0].visarea.min_x) / 2) << VEC_SHIFT; | |
| 266 | y_center=((Machine->screen[0].visarea.max_y | |
| 267 | -Machine->screen[0].visarea.min_y) / 2) << VEC_SHIFT; | |
| 268 | x_max = Machine->screen[0].visarea.max_x << VEC_SHIFT; | |
| 269 | y_max = Machine->screen[0].visarea.max_y << VEC_SHIFT; | |
| 264 | x_center=((machine->screen[0].visarea.max_x | |
| 265 | -machine->screen[0].visarea.min_x) / 2) << VEC_SHIFT; | |
| 266 | y_center=((machine->screen[0].visarea.max_y | |
| 267 | -machine->screen[0].visarea.min_y) / 2) << VEC_SHIFT; | |
| 268 | x_max = machine->screen[0].visarea.max_x << VEC_SHIFT; | |
| 269 | y_max = machine->screen[0].visarea.max_y << VEC_SHIFT; | |
| 270 | 270 | |
| 271 | 271 | via_config(0, &vectrex_via6522_interface); |
| 272 | 272 | via_reset(); |
| r1443 | r1444 | |
| 460 | 460 | |
| 461 | 461 | VIDEO_START( raaspec ) |
| 462 | 462 | { |
| 463 | x_center=((Machine->screen[0].visarea.max_x | |
| 464 | -Machine->screen[0].visarea.min_x)/2) << VEC_SHIFT; | |
| 465 | y_center=((Machine->screen[0].visarea.max_y | |
| 466 | -Machine->screen[0].visarea.min_y)/2) << VEC_SHIFT; | |
| 467 | x_max = Machine->screen[0].visarea.max_x << VEC_SHIFT; | |
| 468 | y_max = Machine->screen[0].visarea.max_y << VEC_SHIFT; | |
| 463 | x_center=((machine->screen[0].visarea.max_x | |
| 464 | -machine->screen[0].visarea.min_x)/2) << VEC_SHIFT; | |
| 465 | y_center=((machine->screen[0].visarea.max_y | |
| 466 | -machine->screen[0].visarea.min_y)/2) << VEC_SHIFT; | |
| 467 | x_max = machine->screen[0].visarea.max_x << VEC_SHIFT; | |
| 468 | y_max = machine->screen[0].visarea.max_y << VEC_SHIFT; | |
| 469 | 469 | |
| 470 | 470 | via_config(0, &spectrum1_via6522_interface); |
| 471 | 471 | via_reset(); |
| r1443 | r1444 | |
|---|---|---|
| 161 | 161 | |
| 162 | 162 | for (b = 0; b<10; b++) |
| 163 | 163 | { |
| 164 | color= | |
| 164 | color=machine->pens[(data & 0x1)?2:0]; | |
| 165 | 165 | plot_pixel(bitmap,700 - ((b * 10) + x), y,color); |
| 166 | 166 | data = data >> 1; |
| 167 | 167 | } |
| r1443 | r1444 | |
|---|---|---|
| 535 | 535 | arcadia_rectangle[i][5]=arcadia_rectangle[i][6]=arcadia_rectangle[i][7]=arcadia_rectangle[i][4]; |
| 536 | 536 | } |
| 537 | 537 | |
| 538 | arcadia_video.bitmap = auto_bitmap_alloc( | |
| 538 | arcadia_video.bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); | |
| 539 | 539 | } |
| 540 | 540 | |
| 541 | 541 | READ8_HANDLER(arcadia_video_r) |
| r1443 | r1444 | |
|---|---|---|
| 915 | 915 | const int yup = THOM_BORDER_HEIGHT + THOM_ACTIVE_HEIGHT; |
| 916 | 916 | const int ybot = THOM_BORDER_HEIGHT + thom_bheight + 200; |
| 917 | 917 | UINT16* v = thom_vbody; |
| 918 | pen_t border = | |
| 918 | pen_t border = machine->pens[ 0 ]; | |
| 919 | 919 | rectangle wrect = { 0, xright - 1, 0, 0 }; |
| 920 | 920 | rectangle lrect = { 0, xbleft - 1, 0, 0 }; |
| 921 | 921 | rectangle rrect = { xbright, xright - 1, 0, 0 }; |
| r1443 | r1444 | |
| 926 | 926 | for ( y = 0; y < THOM_BORDER_HEIGHT - thom_bheight; y++ ) |
| 927 | 927 | { |
| 928 | 928 | if ( thom_border_l[ y ] != -1 ) |
| 929 | border = | |
| 929 | border = machine->pens[ thom_border_l[ y ] ]; | |
| 930 | 930 | } |
| 931 | 931 | ypos = 0; |
| 932 | 932 | while ( y < THOM_BORDER_HEIGHT ) |
| 933 | 933 | { |
| 934 | 934 | if ( thom_border_l[ y ] != -1 ) |
| 935 | border = | |
| 935 | border = machine->pens[ thom_border_l[ y ] ]; | |
| 936 | 936 | wrect.min_y = ypos; |
| 937 | 937 | do |
| 938 | 938 | { |
| r1443 | r1444 | |
| 948 | 948 | while ( y < yup ) |
| 949 | 949 | { |
| 950 | 950 | if ( thom_border_l[ y ] != -1 ) |
| 951 | border = | |
| 951 | border = machine->pens[ thom_border_l[ y ] ]; | |
| 952 | 952 | lrect.min_y = ypos; |
| 953 | 953 | do |
| 954 | 954 | { |
| r1443 | r1444 | |
| 964 | 964 | while (y < ybot ) |
| 965 | 965 | { |
| 966 | 966 | if ( thom_border_l[ y ] != -1 ) |
| 967 | border = | |
| 967 | border = machine->pens[ thom_border_l[ y ] ]; | |
| 968 | 968 | wrect.min_y = ypos; |
| 969 | 969 | do |
| 970 | 970 | { |
| r1443 | r1444 | |
| 978 | 978 | /* right border */ |
| 979 | 979 | for ( y = 0; y < THOM_BORDER_HEIGHT; y++ ) { |
| 980 | 980 | if ( thom_border_r[ y ] != -1 ) |
| 981 | border = | |
| 981 | border = machine->pens[ thom_border_r[ y ] ]; | |
| 982 | 982 | } |
| 983 | 983 | ypos = thom_bheight /* * scale */; |
| 984 | 984 | while ( y < yup ) |
| 985 | 985 | { |
| 986 | 986 | if ( thom_border_r[ y ] != -1 ) |
| 987 | border = | |
| 987 | border = machine->pens[ thom_border_r[ y ] ]; | |
| 988 | 988 | rrect.min_y = ypos; |
| 989 | 989 | do |
| 990 | 990 | { |
| r1443 | r1444 | |
|---|---|---|
| 33 | 33 | |
| 34 | 34 | video_start_generic(machine); |
| 35 | 35 | |
| 36 | dlybitmap = auto_bitmap_alloc( | |
| 36 | dlybitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); | |
| 37 | 37 | |
| 38 | 38 | cleanbuffer = (UINT8*)auto_malloc(64 * 32 * 8); |
| 39 | 39 | memset(cleanbuffer, 0, 64 * 32 * 8); |
| r1443 | r1444 | |
|---|---|---|
| 899 | 899 | 128*8 |
| 900 | 900 | }; |
| 901 | 901 | |
| 902 | /* | |
| 903 | static gfx_decode x68k_gfxdecodeinfo[] = | |
| 904 | { | |
| 905 | { REGION_USER1, 0, &x68k_pcg_8, 0x100, 16 }, // 8x8 sprite tiles | |
| 906 | { REGION_USER1, 0, &x68k_pcg_16, 0x100, 16 }, // 16x16 sprite tiles | |
| 907 | { -1 } | |
| 908 | }; | |
| 909 | */ | |
| 902 | #if 0 | |
| 903 | static GFXDECODEINFO_START( x68k ) | |
| 904 | GFXDECODE_ENTRY( REGION_USER1, 0, x68k_pcg_8, 0x100, 16 ) // 8x8 sprite tiles | |
| 905 | GFXDECODE_ENTRY( REGION_USER1, 0, x68k_pcg_16, 0x100, 16 ) // 16x16 sprite tiles | |
| 906 | GFXDECODEINFO_END | |
| 907 | #endif | |
| 910 | 908 | |
| 911 | 909 | static TILE_GET_INFO(x68k_get_bg0_tile) |
| 912 | 910 | { |
| r1443 | r1444 | |
| 954 | 952 | x68k_gfx_0_bitmap_65536 = auto_bitmap_alloc(512,512,BITMAP_FORMAT_INDEXED16); |
| 955 | 953 | |
| 956 | 954 | for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++) |
| 957 | if ( | |
| 955 | if (machine->gfx[gfx_index] == 0) | |
| 958 | 956 | break; |
| 959 | 957 | |
| 960 | 958 | /* create the char set (gfx will then be updated dynamically from RAM) */ |
| 961 | Machine->gfx[gfx_index] = allocgfx(&x68k_pcg_8); | |
| 962 | decodegfx(Machine->gfx[gfx_index] , memory_region(REGION_USER1), 0, 256); | |
| 963 | Machine->gfx[gfx_index]->total_colors = 32; | |
| 959 | machine->gfx[gfx_index] = allocgfx(&x68k_pcg_8); | |
| 960 | decodegfx(machine->gfx[gfx_index] , memory_region(REGION_USER1), 0, 256); | |
| 961 | machine->gfx[gfx_index]->total_colors = 32; | |
| 964 | 962 | |
| 965 | 963 | gfx_index++; |
| 966 | 964 | |
| 967 | Machine->gfx[gfx_index] = allocgfx(&x68k_pcg_16); | |
| 968 | decodegfx(Machine->gfx[gfx_index] , memory_region(REGION_USER1), 0, 256); | |
| 969 | Machine->gfx[gfx_index]->total_colors = 32; | |
| 965 | machine->gfx[gfx_index] = allocgfx(&x68k_pcg_16); | |
| 966 | decodegfx(machine->gfx[gfx_index] , memory_region(REGION_USER1), 0, 256); | |
| 967 | machine->gfx[gfx_index]->total_colors = 32; | |
| 970 | 968 | |
| 971 | 969 | /* Tilemaps */ |
| 972 | 970 | x68k_bg0_8 = tilemap_create(x68k_get_bg0_tile,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); |
| r1443 | r1444 | |
| 1022 | 1020 | { |
| 1023 | 1021 | if(sys.video.tile16_dirty[x] != 0) |
| 1024 | 1022 | { |
| 1025 | decodechar( | |
| 1023 | decodechar(machine->gfx[1], x,memory_region(REGION_USER1), &x68k_pcg_16); | |
| 1026 | 1024 | sys.video.tile16_dirty[x] = 0; |
| 1027 | 1025 | } |
| 1028 | 1026 | if(sys.video.tile8_dirty[x] != 0) |
| 1029 | 1027 | { |
| 1030 | decodechar( | |
| 1028 | decodechar(machine->gfx[0], x,memory_region(REGION_USER1), &x68k_pcg_8); | |
| 1031 | 1029 | sys.video.tile8_dirty[x] = 0; |
| 1032 | 1030 | } |
| 1033 | 1031 | } |
| r1443 | r1444 | |
|---|---|---|
| 192 | 192 | for (count=0;count<32*8;count++) |
| 193 | 193 | { |
| 194 | 194 | if (charsdirty[count]) { |
| 195 | decodechar( Machine->gfx[0],count,spectrum_characterram, | |
| 196 | Machine->drv->gfxdecodeinfo[0].gfxlayout ); | |
| 195 | decodechar( machine->gfx[0],count,spectrum_characterram, | |
| 196 | machine->drv->gfxdecodeinfo[0].gfxlayout ); | |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | if (charsdirty[count+256]) { |
| 200 | decodechar( Machine->gfx[1],count,&spectrum_characterram[0x800], | |
| 201 | Machine->drv->gfxdecodeinfo[0].gfxlayout ); | |
| 200 | decodechar( machine->gfx[1],count,&spectrum_characterram[0x800], | |
| 201 | machine->drv->gfxdecodeinfo[0].gfxlayout ); | |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | if (charsdirty[count+512]) { |
| 205 | decodechar( Machine->gfx[2],count,&spectrum_characterram[0x1000], | |
| 206 | Machine->drv->gfxdecodeinfo[0].gfxlayout ); | |
| 205 | decodechar( machine->gfx[2],count,&spectrum_characterram[0x1000], | |
| 206 | machine->drv->gfxdecodeinfo[0].gfxlayout ); | |
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | |
| r1443 | r1444 | |
| 216 | 216 | if (charsdirty[count]) { |
| 217 | 217 | color=get_display_color(spectrum_colorram[count], |
| 218 | 218 | flash_invert); |
| 219 | drawgfx(bitmap, | |
| 219 | drawgfx(bitmap,machine->gfx[0], | |
| 220 | 220 | count, |
| 221 | 221 | color, |
| 222 | 222 | 0,0, |
| r1443 | r1444 | |
| 228 | 228 | if (charsdirty[count+256]) { |
| 229 | 229 | color=get_display_color(spectrum_colorram[count+0x100], |
| 230 | 230 | flash_invert); |
| 231 | drawgfx(bitmap, | |
| 231 | drawgfx(bitmap,machine->gfx[1], | |
| 232 | 232 | count, |
| 233 | 233 | color, |
| 234 | 234 | 0,0, |
| r1443 | r1444 | |
| 240 | 240 | if (charsdirty[count+512]) { |
| 241 | 241 | color=get_display_color(spectrum_colorram[count+0x200], |
| 242 | 242 | flash_invert); |
| 243 | drawgfx(bitmap, | |
| 243 | drawgfx(bitmap,machine->gfx[2], | |
| 244 | 244 | count, |
| 245 | 245 | color, |
| 246 | 246 | 0,0, |
| r1443 | r1444 | |
| 304 | 304 | for (b=0x80;b!=0;b>>=1) |
| 305 | 305 | { |
| 306 | 306 | if (*scr&b) |
| 307 | spectrum_plot_pixel(bitmap,scrx++,SPEC_TOP_BORDER+scry, | |
| 307 | spectrum_plot_pixel(bitmap,scrx++,SPEC_TOP_BORDER+scry,machine->pens[ink]); | |
| 308 | 308 | else |
| 309 | spectrum_plot_pixel(bitmap,scrx++,SPEC_TOP_BORDER+scry, | |
| 309 | spectrum_plot_pixel(bitmap,scrx++,SPEC_TOP_BORDER+scry,machine->pens[pap]); | |
| 310 | 310 | } |
| 311 | 311 | scr++; |
| 312 | 312 | attr++; |
| r1443 | r1444 | |
|---|---|---|
| 48 | 48 | /* set up out bitmaps */ |
| 49 | 49 | tx0_draw_panel_backdrop(panel_bitmap); |
| 50 | 50 | |
| 51 | fillbitmap(typewriter_bitmap, | |
| 51 | fillbitmap(typewriter_bitmap, machine->pens[pen_typewriter_bg], &typewriter_bitmap_bounds); | |
| 52 | 52 | |
| 53 | 53 | /* initialize CRT */ |
| 54 | 54 | video_start_crt(pen_crt_num_levels, crt_window_offset_x, crt_window_offset_y, crt_window_width, crt_window_height); |
| r1443 | r1444 | |
| 75 | 75 | video_update_crt(bitmap); |
| 76 | 76 | |
| 77 | 77 | tx0_draw_panel(panel_bitmap); |
| 78 | copybitmap(bitmap, panel_bitmap, 0, 0, panel_window_offset_x, panel_window_offset_y, & | |
| 78 | copybitmap(bitmap, panel_bitmap, 0, 0, panel_window_offset_x, panel_window_offset_y, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 79 | 79 | |
| 80 | copybitmap(bitmap, typewriter_bitmap, 0, 0, typewriter_window_offset_x, typewriter_window_offset_y, & | |
| 80 | copybitmap(bitmap, typewriter_bitmap, 0, 0, typewriter_window_offset_x, typewriter_window_offset_y, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 81 | 81 | return 0; |
| 82 | 82 | } |
| 83 | 83 |
| r1443 | r1444 | |
|---|---|---|
| 77 | 77 | data = lviv_video_ram[y*64+x/4]; |
| 78 | 78 | |
| 79 | 79 | pen = lviv_colortable[0][((data & 0x08) >> 3) | ((data & 0x80) >> (3+3))]; |
| 80 | *BITMAP_ADDR16(bitmap, y, x + 0) = | |
| 80 | *BITMAP_ADDR16(bitmap, y, x + 0) = machine->pens[pen]; | |
| 81 | 81 | |
| 82 | 82 | pen = lviv_colortable[0][((data & 0x04) >> 2) | ((data & 0x40) >> (2+3))]; |
| 83 | *BITMAP_ADDR16(bitmap, y, x + 1) = | |
| 83 | *BITMAP_ADDR16(bitmap, y, x + 1) = machine->pens[pen]; | |
| 84 | 84 | |
| 85 | 85 | pen = lviv_colortable[0][((data & 0x02) >> 1) | ((data & 0x20) >> (1+3))]; |
| 86 | *BITMAP_ADDR16(bitmap, y, x + 2) = | |
| 86 | *BITMAP_ADDR16(bitmap, y, x + 2) = machine->pens[pen]; | |
| 87 | 87 | |
| 88 | 88 | pen = lviv_colortable[0][((data & 0x01) >> 0) | ((data & 0x10) >> (0+3))]; |
| 89 | *BITMAP_ADDR16(bitmap, y, x + 3) = | |
| 89 | *BITMAP_ADDR16(bitmap, y, x + 3) = machine->pens[pen]; | |
| 90 | 90 | } |
| 91 | 91 | return 0; |
| 92 | 92 | } |
| r1443 | r1444 | |
|---|---|---|
| 50 | 50 | int x,y; |
| 51 | 51 | int pens[2]; |
| 52 | 52 | |
| 53 | pens[0] = Machine->pens[0]; | |
| 54 | pens[1] = Machine->pens[1]; | |
| 53 | pens[0] = machine->pens[0]; | |
| 54 | pens[1] = machine->pens[1]; | |
| 55 | 55 | |
| 56 | 56 | for (y=0; y<EXIDY_SCREEN_HEIGHT>>3; y++) |
| 57 | 57 | { |
| r1443 | r1444 | |
|---|---|---|
| 467 | 467 | GRP_DIRTY(x,y) || |
| 468 | 468 | full_refresh) { |
| 469 | 469 | plot_box(wbm2,x*8,y*BLOCK_YSIZE,8,BLOCK_YSIZE,palette_transparent_pen); |
| 470 | ct= | |
| 470 | ct=machine->pens[((attr_new&TX_COL_MASK)>>TX_COL_SHIFT)+8]; | |
| 471 | 471 | TEXT_OLD(x,y)=text_new; |
| 472 | 472 | ATTR_OLD(x,y)=attr_new; |
| 473 | 473 | if(attr_new&TX_GL) { |
| r1443 | r1444 | |
| 490 | 490 | } |
| 491 | 491 | } else { |
| 492 | 492 | /* normal text */ |
| 493 | drawgfx(wbm2, | |
| 493 | drawgfx(wbm2,machine->gfx | |
| 494 | 494 | [((attr_new&TX_WID_MASK)>>TX_WID_SHIFT)+ |
| 495 | 495 | (pc8801_is_24KHz ? 3 : 0)], |
| 496 | 496 | text_new, |
| 497 | 497 | ((attr_new&TX_REV) ? 8 : 0) |
| 498 | 498 | + ((attr_new&TX_COL_MASK)>>TX_COL_SHIFT), |
| 499 | 499 | 0,0,x*8,y*BLOCK_YSIZE, |
| 500 | & | |
| 500 | &machine->screen[0].visarea,TRANSPARENCY_PEN, | |
| 501 | 501 | (attr_new&TX_REV) ? 1 : 0); |
| 502 | 502 | } |
| 503 | 503 | if(attr_new&TX_UL) { |
| r1443 | r1444 | |
| 520 | 520 | (((gVRAM[0x0000+x+y*2*80+gy*80] << gx) & 0x80) >> 7) | |
| 521 | 521 | (((gVRAM[0x4000+x+y*2*80+gy*80] << gx) & 0x80) >> 6) | |
| 522 | 522 | (((gVRAM[0x8000+x+y*2*80+gy*80] << gx) & 0x80) >> 5); |
| 523 | pc8801_plot_pixel(wbm1,x*8+gx,y*4+gy*2,Machine->pens[cg]); | |
| 524 | pc8801_plot_pixel(wbm1,x*8+gx,y*4+gy*2+1,Machine->pens[17]); | |
| 523 | pc8801_plot_pixel(wbm1,x*8+gx,y*4+gy*2,machine->pens[cg]); | |
| 524 | pc8801_plot_pixel(wbm1,x*8+gx,y*4+gy*2+1,machine->pens[17]); | |
| 525 | 525 | } |
| 526 | 526 | } |
| 527 | 527 | break; |
| r1443 | r1444 | |
| 536 | 536 | (((gVRAM[0x8000+x+y*2*80+gy*80] << gx) & 0x80) && |
| 537 | 537 | disp_plane[2]) ? |
| 538 | 538 | ((attr_new&TX_COL_MASK)>>TX_COL_SHIFT)+8 : 16; |
| 539 | pc8801_plot_pixel(wbm1,x*8+gx,y*4+gy*2,Machine->pens[cg]); | |
| 540 | pc8801_plot_pixel(wbm1,x*8+gx,y*4+gy*2+1,Machine->pens[17]); | |
| 539 | pc8801_plot_pixel(wbm1,x*8+gx,y*4+gy*2,machine->pens[cg]); | |
| 540 | pc8801_plot_pixel(wbm1,x*8+gx,y*4+gy*2+1,machine->pens[17]); | |
| 541 | 541 | } |
| 542 | 542 | } |
| 543 | 543 | break; |
| r1443 | r1444 | |
| 549 | 549 | & 0x80) && |
| 550 | 550 | disp_plane[y<200 ? 0 : 1] ? |
| 551 | 551 | ((attr_new&TX_COL_MASK)>>TX_COL_SHIFT)+8 : 16; |
| 552 | pc8801_plot_pixel(wbm1,x*8+gx,y*4+gy, | |
| 552 | pc8801_plot_pixel(wbm1,x*8+gx,y*4+gy,machine->pens[cg]); | |
| 553 | 553 | } |
| 554 | 554 | } |
| 555 | 555 | break; |
| 556 | 556 | case GRAPH_NO: |
| 557 | 557 | default: |
| 558 | plot_box(wbm1,x*8,y*4,8,4, | |
| 558 | plot_box(wbm1,x*8,y*4,8,4,machine->pens[16]); | |
| 559 | 559 | break; |
| 560 | 560 | } |
| 561 | 561 | } else { |
| r1443 | r1444 | |
| 567 | 567 | (((gVRAM[0x0000+x+y*2*80+gy*80] << gx) & 0x80) >> 7) | |
| 568 | 568 | (((gVRAM[0x4000+x+y*2*80+gy*80] << gx) & 0x80) >> 6) | |
| 569 | 569 | (((gVRAM[0x8000+x+y*2*80+gy*80] << gx) & 0x80) >> 5); |
| 570 | pc8801_plot_pixel(wbm1,x*8+gx,y*2+gy, | |
| 570 | pc8801_plot_pixel(wbm1,x*8+gx,y*2+gy,machine->pens[cg]); | |
| 571 | 571 | } |
| 572 | 572 | } |
| 573 | 573 | break; |
| r1443 | r1444 | |
| 582 | 582 | (((gVRAM[0x8000+x+y*2*80+gy*80] << gx) & 0x80) && |
| 583 | 583 | disp_plane[2]) ? |
| 584 | 584 | ((attr_new&TX_COL_MASK)>>TX_COL_SHIFT)+8 : 16; |
| 585 | pc8801_plot_pixel(wbm1,x*8+gx,y*2+gy, | |
| 585 | pc8801_plot_pixel(wbm1,x*8+gx,y*2+gy,machine->pens[cg]); | |
| 586 | 586 | } |
| 587 | 587 | } |
| 588 | 588 | break; |
| 589 | 589 | case GRAPH_NO: |
| 590 | 590 | default: |
| 591 | plot_box(wbm1,x*8,y*2,8,2, | |
| 591 | plot_box(wbm1,x*8,y*2,8,2,machine->pens[16]); | |
| 592 | 592 | break; |
| 593 | 593 | } |
| 594 | 594 | } |
| r1443 | r1444 | |
| 597 | 597 | } |
| 598 | 598 | |
| 599 | 599 | copybitmap(wbm1,wbm2,0,0,0,0, |
| 600 | & | |
| 600 | &machine->screen[0].visarea,TRANSPARENCY_PEN,palette_transparent_pen); | |
| 601 | 601 | copybitmap(bitmap,wbm1,0,0,0,0, |
| 602 | & | |
| 602 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 603 | 603 | return 0; |
| 604 | 604 | } |
| 605 | 605 |
| r1443 | r1444 | |
|---|---|---|
| 77 | 77 | { |
| 78 | 78 | for (x=0;x<40;x++, i++) |
| 79 | 79 | { |
| 80 | drawgfx(bitmap, | |
| 80 | drawgfx(bitmap,machine->gfx[pet_font], | |
| 81 | 81 | videoram[i], 0, 0, 0, 8*x,8*y, |
| 82 | & | |
| 82 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | return 0; |
| r1443 | r1444 | |
|---|---|---|
| 92 | 92 | pc_current_height = h; |
| 93 | 93 | pc_anythingdirty = 1; |
| 94 | 94 | |
| 95 | if (pc_current_width > Machine->screen[0].width) | |
| 96 | pc_current_width = Machine->screen[0].width; | |
| 97 | if (pc_current_height > Machine->screen[0].height) | |
| 98 | pc_current_height = Machine->screen[0].height; | |
| 95 | if (pc_current_width > machine->screen[0].width) | |
| 96 | pc_current_width = machine->screen[0].width; | |
| 97 | if (pc_current_height > machine->screen[0].height) | |
| 98 | pc_current_height = machine->screen[0].height; | |
| 99 | 99 | |
| 100 | 100 | if ((pc_current_width > 100) && (pc_current_height > 100)) |
| 101 | 101 | video_screen_set_visarea(0, 0, pc_current_width-1, 0, pc_current_height-1); |
| r1443 | r1444 | |
|---|---|---|
| 71 | 71 | pen0^=1; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | pen0 = Machine->pens[pen0]; | |
| 75 | pen1 = Machine->pens[pen1]; | |
| 74 | pen0 = machine->pens[pen0]; | |
| 75 | pen1 = machine->pens[pen1]; | |
| 76 | 76 | |
| 77 | 77 | /* video enable? */ |
| 78 | 78 | if ((pcw_vdu_video_control_register & (1<<6))!=0) |
| r1443 | r1444 | |
|---|---|---|
| 65 | 65 | { |
| 66 | 66 | char backdrop_name[200]; |
| 67 | 67 | /* try to load a backdrop for the machine */ |
| 68 | sprintf(backdrop_name, "%s.png", | |
| 68 | sprintf(backdrop_name, "%s.png", machine->gamedrv->name); | |
| 69 | 69 | backdrop_load(backdrop_name, 2); |
| 70 | 70 | } |
| 71 | 71 | #endif |
| r1443 | r1444 | |
| 80 | 80 | for (x = 0; x < 6; x++) |
| 81 | 81 | { |
| 82 | 82 | int sy = 408; |
| 83 | int sx = | |
| 83 | int sx = machine->screen[0].width - 212 + x * 30 + ((x >= 4) ? 6 : 0); | |
| 84 | 84 | |
| 85 | drawgfx (bitmap, | |
| 85 | drawgfx (bitmap, machine->gfx[0], | |
| 86 | 86 | videoram[2 * x + 0], videoram[2 * x + 1], |
| 87 | 87 | 0, 0, sx, sy, NULL, TRANSPARENCY_PEN, 0); |
| 88 | 88 | } |
| r1443 | r1444 | |
| 102 | 102 | { 4, 5, 6, 7}, |
| 103 | 103 | { 0, 1, 2, 3} |
| 104 | 104 | }; |
| 105 | int sx = | |
| 105 | int sx = machine->screen[0].width - 182 + x * 37; | |
| 106 | 106 | int color, code = layout[y][x]; |
| 107 | 107 | |
| 108 | 108 | color = (readinputport (code / 7) & (0x40 >> (code % 7))) ? 0 : 1; |
| 109 | 109 | |
| 110 | 110 | videoram[6 * 2 + code] = color; |
| 111 | drawgfx (bitmap, | |
| 111 | drawgfx (bitmap, machine->gfx[1], | |
| 112 | 112 | layout[y][x], color, |
| 113 | 113 | 0, 0, sx, sy, NULL, |
| 114 | 114 | TRANSPARENCY_NONE, 0); |
| r1443 | r1444 | |
|---|---|---|
| 48 | 48 | |
| 49 | 49 | VIDEO_START( pc1403 ) |
| 50 | 50 | { |
| 51 | if (strcmp( | |
| 51 | if (strcmp(machine->gamedrv->name,"pc1403h")==0) { | |
| 52 | 52 | DOWN=pos[1].y; |
| 53 | 53 | RIGHT=pos[1].x; |
| 54 | 54 | } |
| r1443 | r1444 | |
| 160 | 160 | bitmap_fill(bitmap, cliprect, 5); |
| 161 | 161 | |
| 162 | 162 | /* HJB: we cannot initialize array with values from other arrays, thus... */ |
| 163 | color[0] = Machine->pens[pocketc_colortable[CONTRAST][0]]; | |
| 164 | color[2] = Machine->pens[pocketc_colortable[CONTRAST][1]]; | |
| 163 | color[0] = machine->pens[pocketc_colortable[CONTRAST][0]]; | |
| 164 | color[2] = machine->pens[pocketc_colortable[CONTRAST][1]]; | |
| 165 | 165 | color[1] = (pc1403_portc&1) ? color[2] : color[0]; |
| 166 | 166 | |
| 167 | 167 | if (pc1403_portc&1) { |
| 168 | 168 | for (x=RIGHT,y=DOWN,i=0; i<6*5;x+=2) { |
| 169 | 169 | for (j=0; j<5;j++,i++,x+=2) |
| 170 | drawgfx(bitmap, | |
| 170 | drawgfx(bitmap, machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, | |
| 171 | 171 | x,y, |
| 172 | 172 | 0, TRANSPARENCY_NONE,0); |
| 173 | 173 | } |
| 174 | 174 | for (i=9*5; i<12*5;x+=2) { |
| 175 | 175 | for (j=0; j<5;j++,i++,x+=2) |
| 176 | drawgfx(bitmap, | |
| 176 | drawgfx(bitmap, machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, | |
| 177 | 177 | x,y, |
| 178 | 178 | 0, TRANSPARENCY_NONE,0); |
| 179 | 179 | } |
| 180 | 180 | for (i=6*5; i<9*5;x+=2) { |
| 181 | 181 | for (j=0; j<5;j++,i++,x+=2) |
| 182 | drawgfx(bitmap, | |
| 182 | drawgfx(bitmap, machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, | |
| 183 | 183 | x,y, |
| 184 | 184 | 0, TRANSPARENCY_NONE,0); |
| 185 | 185 | } |
| 186 | 186 | for (i=0x7b-3*5; i>0x7b-6*5;x+=2) { |
| 187 | 187 | for (j=0; j<5;j++,i--,x+=2) |
| 188 | drawgfx(bitmap, | |
| 188 | drawgfx(bitmap, machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, | |
| 189 | 189 | x,y, |
| 190 | 190 | 0, TRANSPARENCY_NONE,0); |
| 191 | 191 | } |
| 192 | 192 | for (i=0x7b; i>0x7b-3*5;x+=2) { |
| 193 | 193 | for (j=0; j<5;j++,i--,x+=2) |
| 194 | drawgfx(bitmap, | |
| 194 | drawgfx(bitmap, machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, | |
| 195 | 195 | x,y, |
| 196 | 196 | 0, TRANSPARENCY_NONE,0); |
| 197 | 197 | } |
| 198 | 198 | for (i=0x7b-6*5; i>0x7b-12*5;x+=2) { |
| 199 | 199 | for (j=0; j<5;j++,i--,x+=2) |
| 200 | drawgfx(bitmap, | |
| 200 | drawgfx(bitmap, machine->gfx[0], pc1403_lcd.reg[i],CONTRAST,0,0, | |
| 201 | 201 | x,y, |
| 202 | 202 | 0, TRANSPARENCY_NONE,0); |
| 203 | 203 | } |
| r1443 | r1444 | |
|---|---|---|
| 67 | 67 | { |
| 68 | 68 | offset = y*128+x; |
| 69 | 69 | color = palette_offset+(videoram[offset]&3); |
| 70 | pen = | |
| 70 | pen = machine->pens[colormap[color]]; | |
| 71 | 71 | *BITMAP_ADDR16(bitmap, y, x) = pen; |
| 72 | 72 | } |
| 73 | 73 | } |
| r1443 | r1444 | |
|---|---|---|
| 46 | 46 | 8*8 /* every char takes 8 bytes (upper half) */ |
| 47 | 47 | }; |
| 48 | 48 | |
| 49 | GFXDECODE_START( pc_mda | |
| 49 | GFXDECODE_START( pc_mda | |
| 50 | 50 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, pc_mda_charlayout, 0, 256 ) |
| 51 | 51 | GFXDECODE_END |
| 52 | 52 | |
| r1443 | r1444 | |
| 188 | 188 | { |
| 189 | 189 | int buswidth; |
| 190 | 190 | |
| 191 | buswidth = cputype_databus_width( | |
| 191 | buswidth = cputype_databus_width(machine->drv->cpu[0].type, ADDRESS_SPACE_PROGRAM); | |
| 192 | 192 | switch(buswidth) |
| 193 | 193 | { |
| 194 | 194 | case 8: |
| r1443 | r1444 | |
|---|---|---|
| 19 | 19 | |
| 20 | 20 | extern const unsigned char mda_palette[4][3]; |
| 21 | 21 | extern const gfx_layout pc_mda_charlayout; |
| 22 | GFXDECODE_EXTERN( pc_mda | |
| 22 | GFXDECODE_EXTERN( pc_mda | |
| 23 | 23 | extern const unsigned short mda_colortable[256*2+1*2]; |
| 24 | 24 | |
| 25 | 25 | PALETTE_INIT( pc_mda ); |
| r1443 | r1444 | |
|---|---|---|
| 89 | 89 | 8*8 /* every char takes 8 bytes */ |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | static GFXDECODE_START( t1000hx | |
| 92 | static GFXDECODE_START( t1000hx | |
| 93 | 93 | GFXDECODE_ENTRY( REGION_CPU1, 0xffa6e, t1t_charlayout, 0, 128 ) /* single width */ |
| 94 | 94 | GFXDECODE_ENTRY( REGION_CPU1, 0xfc0a8, t1t_charlayout, 0, 128 ) /* single width */ |
| 95 | 95 | GFXDECODE_ENTRY( REGION_GFX1, 0x1000, t1t_gfxlayout_4bpp, 256*2+16*2+2*4, 16 ) /* 160x200 4bpp gfx */ |
| 96 | 96 | GFXDECODE_END |
| 97 | 97 | |
| 98 | static GFXDECODE_START( t1000sx | |
| 98 | static GFXDECODE_START( t1000sx | |
| 99 | 99 | GFXDECODE_ENTRY( REGION_CPU1, 0xffa6e, t1t_charlayout, 0, 128 ) /* single width */ |
| 100 | 100 | GFXDECODE_ENTRY( REGION_CPU1, 0xf40a3, t1t_charlayout, 0, 128 ) /* single width */ |
| 101 | 101 | GFXDECODE_ENTRY( REGION_GFX1, 0x1000, t1t_gfxlayout_4bpp, 256*2+16*2+2*4, 16 ) /* 160x200 4bpp gfx */ |
| r1443 | r1444 | |
| 106 | 106 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 107 | 107 | MDRV_SCREEN_SIZE(80*8, 25*9) |
| 108 | 108 | MDRV_SCREEN_VISIBLE_AREA(0,80*8-1, 0,25*9-1) |
| 109 | MDRV_GFXDECODE(t1000hx | |
| 109 | MDRV_GFXDECODE(t1000hx | |
| 110 | 110 | MDRV_PALETTE_LENGTH(sizeof(cga_palette) / sizeof(cga_palette[0])) |
| 111 | 111 | MDRV_COLORTABLE_LENGTH(sizeof(pcjr_colortable) / sizeof(pcjr_colortable[0])) |
| 112 | 112 | MDRV_PALETTE_INIT(pcjr) |
| r1443 | r1444 | |
| 117 | 117 | |
| 118 | 118 | MACHINE_DRIVER_START( pcvideo_t1000sx ) |
| 119 | 119 | MDRV_IMPORT_FROM( pcvideo_t1000hx ) |
| 120 | MDRV_GFXDECODE( t1000sx | |
| 120 | MDRV_GFXDECODE( t1000sx | |
| 121 | 121 | MACHINE_DRIVER_END |
| 122 | 122 | |
| 123 | 123 | /*************************************************************************** |
| r1443 | r1444 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | for (sx = 0; sx < 48; sx++) |
| 18 | 18 | { |
| 19 | drawgfx (bitmap, Machine->gfx[0], videoram[0x03ca + sx], | |
| 20 | 1, 0, 0, sx * 8, 0, &Machine->screen[0].visarea, | |
| 19 | drawgfx (bitmap, machine->gfx[0], videoram[0x03ca + sx], | |
| 20 | 1, 0, 0, sx * 8, 0, &machine->screen[0].visarea, | |
| 21 | 21 | TRANSPARENCY_NONE, 0); |
| 22 | 22 | } |
| 23 | 23 | |
| r1443 | r1444 | |
| 25 | 25 | { |
| 26 | 26 | for (sx = 0; sx < 48; sx++) |
| 27 | 27 | { |
| 28 | drawgfx (bitmap, Machine->gfx[0], videoram[0x000a + (sy * 64) + sx], | |
| 29 | 1, 0, 0, sx * 8, (sy + 1) * 16, &Machine->screen[0].visarea, | |
| 28 | drawgfx (bitmap, machine->gfx[0], videoram[0x000a + (sy * 64) + sx], | |
| 29 | 1, 0, 0, sx * 8, (sy + 1) * 16, &machine->screen[0].visarea, | |
| 30 | 30 | TRANSPARENCY_NONE, 0); |
| 31 | 31 | } |
| 32 | 32 | } |
| r1443 | r1444 | |
| 39 | 39 | |
| 40 | 40 | for (sx = 0; sx < 48; sx++) |
| 41 | 41 | { |
| 42 | drawgfx (bitmap, Machine->gfx[0], videoram[0x03ca + sx], | |
| 43 | 1, 0, 0, sx * 8, 0, &Machine->screen[0].visarea, | |
| 42 | drawgfx (bitmap, machine->gfx[0], videoram[0x03ca + sx], | |
| 43 | 1, 0, 0, sx * 8, 0, &machine->screen[0].visarea, | |
| 44 | 44 | TRANSPARENCY_NONE, 0); |
| 45 | 45 | } |
| 46 | 46 | |
| r1443 | r1444 | |
| 48 | 48 | { |
| 49 | 49 | for (sx = 0; sx < 48; sx++) |
| 50 | 50 | { |
| 51 | drawgfx (bitmap, Machine->gfx[0], videoram[0x000a + (sy * 64) + sx], | |
| 52 | 1, 0, 0, sx * 8, (sy + 1) * 14, &Machine->screen[0].visarea, | |
| 51 | drawgfx (bitmap, machine->gfx[0], videoram[0x000a + (sy * 64) + sx], | |
| 52 | 1, 0, 0, sx * 8, (sy + 1) * 14, &machine->screen[0].visarea, | |
| 53 | 53 | TRANSPARENCY_NONE, 0); |
| 54 | 54 | } |
| 55 | 55 | } |
| r1443 | r1444 | |
|---|---|---|
| 553 | 553 | } else { |
| 554 | 554 | for (i=0; i<512; i++) { |
| 555 | 555 | if (full_refresh||vdc.fontdirty[i]) { |
| 556 | decodechar(Machine->gfx[0],i,vdc.ram+(vdc.fontram_start&vdc.mask), | |
| 557 | Machine->drv->gfxdecodeinfo[0].gfxlayout); | |
| 556 | decodechar(machine->gfx[0],i,vdc.ram+(vdc.fontram_start&vdc.mask), | |
| 557 | machine->drv->gfxdecodeinfo[0].gfxlayout); | |
| 558 | 558 | vdc.fontdirty[i]=0; |
| 559 | 559 | } |
| 560 | 560 | } |
| r1443 | r1444 | |
| 567 | 567 | int h=CRTC6845_CHAR_LINES; |
| 568 | 568 | int height=CRTC6845_CHAR_HEIGHT; |
| 569 | 569 | |
| 570 | plot_box(bitmap, 0, 0, | |
| 570 | plot_box(bitmap, 0, 0, machine->gfx[0]->width*(w+2), height, machine->pens[FRAMECOLOR]); | |
| 571 | 571 | |
| 572 | plot_box(bitmap, 0, height, | |
| 572 | plot_box(bitmap, 0, height, machine->gfx[0]->width, height*h, machine->pens[FRAMECOLOR]); | |
| 573 | 573 | |
| 574 | plot_box(bitmap, Machine->gfx[0]->width*(w+1), height, Machine->gfx[0]->width, height*h, | |
| 575 | Machine->pens[FRAMECOLOR]); | |
| 574 | plot_box(bitmap, machine->gfx[0]->width*(w+1), height, machine->gfx[0]->width, height*h, | |
| 575 | machine->pens[FRAMECOLOR]); | |
| 576 | 576 | |
| 577 | plot_box(bitmap, 0, height*(h+1), Machine->gfx[0]->width*(w+2), height, | |
| 578 | Machine->pens[FRAMECOLOR]); | |
| 577 | plot_box(bitmap, 0, height*(h+1), machine->gfx[0]->width*(w+2), height, | |
| 578 | machine->pens[FRAMECOLOR]); | |
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | vdc.changed=0; |
| r1443 | r1444 | |
|---|---|---|
| 77 | 77 | }; |
| 78 | 78 | |
| 79 | 79 | |
| 80 | GFXDECODE_START( europc | |
| 80 | GFXDECODE_START( europc | |
| 81 | 81 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, europc_cga_charlayout, 0, 256 ) /* single width */ |
| 82 | 82 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, europc_cga_charlayout, 0, 256 ) /* single width */ |
| 83 | 83 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, europc_cga_charlayout, 0, 256 ) /* single width */ |
| r1443 | r1444 | |
| 88 | 88 | GFXDECODE_ENTRY( REGION_GFX1, 0x1000, europc_mda_charlayout, 256*2+16*2+96*4, 256 ) /* single width */ |
| 89 | 89 | GFXDECODE_END |
| 90 | 90 | |
| 91 | GFXDECODE_START( aga | |
| 91 | GFXDECODE_START( aga | |
| 92 | 92 | /* The four CGA fonts */ |
| 93 | 93 | GFXDECODE_ENTRY( REGION_GFX1, 0x1000, pc200_cga_charlayout, 0, 256 ) /* single width */ |
| 94 | 94 | GFXDECODE_ENTRY( REGION_GFX1, 0x3000, pc200_cga_charlayout, 0, 256 ) /* single width */ |
| r1443 | r1444 | |
| 208 | 208 | |
| 209 | 209 | pc_mda_europc_init(); |
| 210 | 210 | |
| 211 | buswidth = cputype_databus_width( | |
| 211 | buswidth = cputype_databus_width(machine->drv->cpu[0].type, ADDRESS_SPACE_PROGRAM); | |
| 212 | 212 | switch(buswidth) |
| 213 | 213 | { |
| 214 | 214 | case 8: |
| r1443 | r1444 | |
| 241 | 241 | |
| 242 | 242 | video_start_pc_aga(machine); |
| 243 | 243 | |
| 244 | buswidth = cputype_databus_width( | |
| 244 | buswidth = cputype_databus_width(machine->drv->cpu[0].type, ADDRESS_SPACE_PROGRAM); | |
| 245 | 245 | switch(buswidth) |
| 246 | 246 | { |
| 247 | 247 | case 8: |
| r1443 | r1444 | |
|---|---|---|
| 233 | 233 | |
| 234 | 234 | /* Check if we're on the last line of a frame */ |
| 235 | 235 | if ( vpos == vpos_limit - 1 ) { |
| 236 | check_pause_button(); | |
| 236 | sms_check_pause_button(); | |
| 237 | 237 | return; |
| 238 | 238 | } |
| 239 | 239 | |
| r1443 | r1444 | |
| 273 | 273 | /* Draw left border */ |
| 274 | 274 | rec.min_x = LBORDER_START; |
| 275 | 275 | rec.max_x = LBORDER_START + LBORDER_X_PIXELS - 1; |
| 276 | fillbitmap( tmpbitmap, | |
| 276 | fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec ); | |
| 277 | 277 | /* Draw right border */ |
| 278 | 278 | rec.min_x = LBORDER_START + LBORDER_X_PIXELS + 256; |
| 279 | 279 | rec.max_x = rec.min_x + RBORDER_X_PIXELS - 1; |
| 280 | fillbitmap( tmpbitmap, | |
| 280 | fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec ); | |
| 281 | 281 | /* Draw middle of the border */ |
| 282 | 282 | /* We need to do this through the regular drawing function so it will */ |
| 283 | 283 | /* be included in the gamegear scaling functions */ |
| r1443 | r1444 | |
| 313 | 313 | /* set whole line to backdrop color */ |
| 314 | 314 | rec.min_x = LBORDER_START; |
| 315 | 315 | rec.max_x = LBORDER_START + LBORDER_X_PIXELS + 255 + RBORDER_X_PIXELS; |
| 316 | fillbitmap( tmpbitmap, | |
| 316 | fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec ); | |
| 317 | 317 | } else { |
| 318 | 318 | /* Draw left border */ |
| 319 | 319 | rec.min_x = LBORDER_START; |
| 320 | 320 | rec.max_x = LBORDER_START + LBORDER_X_PIXELS - 1; |
| 321 | fillbitmap( tmpbitmap, | |
| 321 | fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec ); | |
| 322 | 322 | /* Draw right border */ |
| 323 | 323 | rec.min_x = LBORDER_START + LBORDER_X_PIXELS + 256; |
| 324 | 324 | rec.max_x = rec.min_x + RBORDER_X_PIXELS - 1; |
| 325 | fillbitmap( tmpbitmap, | |
| 325 | fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec ); | |
| 326 | 326 | sms_refresh_line( tmpbitmap, LBORDER_START + LBORDER_X_PIXELS, vpos_limit, vpos - vpos_limit ); |
| 327 | 327 | } |
| 328 | 328 | return; |
| r1443 | r1444 | |
| 339 | 339 | /* Draw left border */ |
| 340 | 340 | rec.min_x = LBORDER_START; |
| 341 | 341 | rec.max_x = LBORDER_START + LBORDER_X_PIXELS - 1; |
| 342 | fillbitmap( tmpbitmap, | |
| 342 | fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec ); | |
| 343 | 343 | /* Draw right border */ |
| 344 | 344 | rec.min_x = LBORDER_START + LBORDER_X_PIXELS + 256; |
| 345 | 345 | rec.max_x = rec.min_x + RBORDER_X_PIXELS - 1; |
| 346 | fillbitmap( tmpbitmap, | |
| 346 | fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec ); | |
| 347 | 347 | /* Draw middle of the border */ |
| 348 | 348 | /* We need to do this through the regular drawing function so it will */ |
| 349 | 349 | /* be included in the gamegear scaling functions */ |
| r1443 | r1444 | |
| 1047 | 1047 | int x, y; |
| 1048 | 1048 | |
| 1049 | 1049 | if (smsvdp.prev_bitmap_saved) { |
| 1050 | for (y = 0; y < Machine->screen[0].height; y++) { | |
| 1051 | for (x = 0; x < Machine->screen[0].width; x++) { | |
| 1050 | for (y = 0; y < machine->screen[0].height; y++) { | |
| 1051 | for (x = 0; x < machine->screen[0].width; x++) { | |
| 1052 | 1052 | *BITMAP_ADDR32(bitmap, y, x) = (*BITMAP_ADDR32(tmpbitmap, y, x) + *BITMAP_ADDR32(smsvdp.prev_bitmap, y, x)) >> 2; |
| 1053 | 1053 | logerror("%x %x %x\n", *BITMAP_ADDR32(tmpbitmap, y, x), *BITMAP_ADDR32(smsvdp.prev_bitmap, y, x), (*BITMAP_ADDR32(tmpbitmap, y, x) + *BITMAP_ADDR32(smsvdp.prev_bitmap, y, x)) >> 2); |
| 1054 | 1054 | } |
| 1055 | 1055 | } |
| 1056 | 1056 | } else { |
| 1057 | copybitmap(bitmap, tmpbitmap, 0, 0, 0, 0, & | |
| 1057 | copybitmap(bitmap, tmpbitmap, 0, 0, 0, 0, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 1058 | 1058 | } |
| 1059 | 1059 | if (!smsvdp.prev_bitmap_saved) { |
| 1060 | copybitmap(smsvdp.prev_bitmap, tmpbitmap, 0, 0, 0, 0, & | |
| 1060 | copybitmap(smsvdp.prev_bitmap, tmpbitmap, 0, 0, 0, 0, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 1061 | 1061 | //smsvdp.prev_bitmap_saved = 1; |
| 1062 | 1062 | } |
| 1063 | 1063 | return 0; |
| r1443 | r1444 | |
|---|---|---|
| 164 | 164 | 8*8 /* every char takes 8 bytes */ |
| 165 | 165 | }; |
| 166 | 166 | |
| 167 | static GFXDECODE_START( CGA | |
| 167 | static GFXDECODE_START( CGA | |
| 168 | 168 | /* Support up to four CGA fonts */ |
| 169 | 169 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, CGA_charlayout, 0, 256 ) /* Font 0 */ |
| 170 | 170 | GFXDECODE_ENTRY( REGION_GFX1, 0x0800, CGA_charlayout, 0, 256 ) /* Font 1 */ |
| r1443 | r1444 | |
| 177 | 177 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 178 | 178 | MDRV_SCREEN_SIZE(80*8, 25*8) |
| 179 | 179 | MDRV_SCREEN_VISIBLE_AREA(0,80*8-1, 0,25*8-1) |
| 180 | MDRV_GFXDECODE(CGA | |
| 180 | MDRV_GFXDECODE(CGA | |
| 181 | 181 | MDRV_PALETTE_LENGTH(sizeof(cga_palette) / (CGA_PALETTE_SETS * sizeof(cga_palette[0]))) |
| 182 | 182 | MDRV_COLORTABLE_LENGTH(sizeof(cga_colortable) / sizeof(cga_colortable[0])) |
| 183 | 183 | |
| r1443 | r1444 | |
| 290 | 290 | * Plantronics chipset. |
| 291 | 291 | * TODO: Cards which don't support Plantronics should repeat at |
| 292 | 292 | * BC000h */ |
| 293 | buswidth = cputype_databus_width( | |
| 293 | buswidth = cputype_databus_width(machine->drv->cpu[0].type, ADDRESS_SPACE_PROGRAM); | |
| 294 | 294 | switch(buswidth) |
| 295 | 295 | { |
| 296 | 296 | case 8: |
| r1443 | r1444 | |
|---|---|---|
| 61 | 61 | if (code < 32) code = 32; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | drawgfx (bitmap, | |
| 64 | drawgfx (bitmap, machine->gfx[0], code, | |
| 65 | 65 | videoram[offs + 2048] & 0x08 ? 0 : 1, 0, 0, sx, sy, |
| 66 | & | |
| 66 | &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 67 | 67 | if (videoram[offs] & 0x80) |
| 68 | 68 | { |
| 69 | 69 | for (loop = 0; loop < 6; loop++) |
| r1443 | r1444 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | extern const gfx_layout europc_cga_charlayout; |
| 24 | 24 | extern const gfx_layout europc_mda_charlayout; |
| 25 | GFXDECODE_EXTERN( europc_gfxdecodeinfo ); | |
| 26 | GFXDECODE_EXTERN( aga_gfxdecodeinfo ); | |
| 25 | GFXDECODE_EXTERN( europc ); | |
| 26 | GFXDECODE_EXTERN( aga ); | |
| 27 | 27 | |
| 28 | 28 | extern PALETTE_INIT( pc_aga ); |
| 29 | 29 |
| r1443 | r1444 | |
|---|---|---|
| 766 | 766 | { |
| 767 | 767 | copybitmap(bitmap,tmpbitmap,0,0, |
| 768 | 768 | col_delay*2,row_delay*2, |
| 769 | & | |
| 769 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 770 | 770 | return 0; |
| 771 | 771 | } |
| 772 | 772 | |
| r1443 | r1444 | |
| 849 | 849 | for(x=0;x<40;x++) |
| 850 | 850 | { |
| 851 | 851 | offs = current_row*64+x; |
| 852 | drawgfx(bitmap, | |
| 852 | drawgfx(bitmap,machine->gfx[2], | |
| 853 | 853 | videoram[offs], |
| 854 | 854 | 7, /* white */ |
| 855 | 855 | 0,0, |
| 856 | 856 | x*8,y*8, |
| 857 | & | |
| 857 | &machine->screen[0].visarea, TRANSPARENCY_PEN, 0); | |
| 858 | 858 | } |
| 859 | 859 | if (current_row == tms9927_cursor_row) |
| 860 | 860 | { |
| 861 | 861 | /* draw the cursor as a solid white block */ |
| 862 | 862 | /* (should use a filled rect here!) */ |
| 863 | drawgfx(bitmap, | |
| 863 | drawgfx(bitmap,machine->gfx[2], | |
| 864 | 864 | 191, /* a block */ |
| 865 | 865 | 7, /* white */ |
| 866 | 866 | 0,0, |
| 867 | 867 | (tms9927_cursor_col-1)*8,y*8, |
| 868 | & | |
| 868 | &machine->screen[0].visarea, TRANSPARENCY_PEN, 0); | |
| 869 | 869 | } |
| 870 | 870 | current_row = (current_row + 1) % tms9927_num_rows; |
| 871 | 871 | } |
| r1443 | r1444 | |
| 874 | 874 | #if 0 |
| 875 | 875 | // debugging |
| 876 | 876 | c = tape_motor_mode_desc[tape_motor_mode][0]; |
| 877 | drawgfx(bitmap, | |
| 877 | drawgfx(bitmap,machine->gfx[2], | |
| 878 | 878 | c, |
| 879 | 879 | 1, |
| 880 | 880 | 0,0, |
| 881 | 881 | 0*8,0*8, |
| 882 | & | |
| 882 | &machine->screen[0].visarea, TRANSPARENCY_PEN, 0); | |
| 883 | 883 | for(y=0;y<5;y++) |
| 884 | 884 | { |
| 885 | drawgfx(bitmap, | |
| 885 | drawgfx(bitmap,machine->gfx[2], | |
| 886 | 886 | tape_unknown_write[y]+'0', |
| 887 | 887 | 1, |
| 888 | 888 | 0,0, |
| 889 | 889 | 0*8,(y+2)*8, |
| 890 | & | |
| 890 | &machine->screen[0].visarea, TRANSPARENCY_PEN, 0); | |
| 891 | 891 | } |
| 892 | drawgfx(bitmap, | |
| 892 | drawgfx(bitmap,machine->gfx[2], | |
| 893 | 893 | tape_unknown_write[5]+'0', |
| 894 | 894 | 1, |
| 895 | 895 | 0,0, |
| 896 | 896 | 0*8,8*8, |
| 897 | &Machine->screen[0].visarea, TRANSPARENCY_PEN, 0); | |
| 898 | drawgfx(bitmap,Machine->gfx[2], | |
| 897 | &machine->screen[0].visarea, TRANSPARENCY_PEN, 0); | |
| 898 | drawgfx(bitmap,machine->gfx[2], | |
| 899 | 899 | tape_interrupts_enabled+'0', |
| 900 | 900 | 1, |
| 901 | 901 | 0,0, |
| 902 | 902 | 0*8,10*8, |
| 903 | & | |
| 903 | &machine->screen[0].visarea, TRANSPARENCY_PEN, 0); | |
| 904 | 904 | #endif |
| 905 | 905 | return 0; |
| 906 | 906 | } |
| r1443 | r1444 | |
|---|---|---|
| 57 | 57 | sy = (offs / 32) * 8; |
| 58 | 58 | sx = (offs % 32) * 8; |
| 59 | 59 | |
| 60 | drawgfx(bitmap, Machine->gfx[0], code & 0x7f, (code & 0x80) ? 1 : 0, 0,0, sx,sy, | |
| 61 | &Machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 60 | drawgfx(bitmap, machine->gfx[0], code & 0x7f, (code & 0x80) ? 1 : 0, 0,0, sx,sy, | |
| 61 | &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 62 | 62 | |
| 63 | 63 | dirtybuffer[offs] = 0; |
| 64 | 64 | } |
| r1443 | r1444 | |
|---|---|---|
| 201 | 201 | cdp1864_dma_timer = timer_alloc(cdp1864_dma_tick, NULL); |
| 202 | 202 | |
| 203 | 203 | /* allocate the temporary bitmap */ |
| 204 | cdptmpbitmap = auto_bitmap_alloc( | |
| 204 | cdptmpbitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 205 | 205 | |
| 206 | 206 | /* ensure the contents of the bitmap are saved */ |
| 207 | 207 | state_save_register_bitmap("video", 0, "cdptmpbitmap", cdptmpbitmap); |
| r1443 | r1444 | |
|---|---|---|
| 37 | 37 | { |
| 38 | 38 | char backdrop_name[200]; |
| 39 | 39 | /* try to load a backdrop for the machine */ |
| 40 | sprintf (backdrop_name, "%s.png", | |
| 40 | sprintf (backdrop_name, "%s.png", machine->gamedrv->name); | |
| 41 | 41 | backdrop_load(backdrop_name, 3); |
| 42 | 42 | } |
| 43 | 43 | #endif |
| r1443 | r1444 | |
| 184 | 184 | ssystem3_led_pos[i].y); |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | ssystem3_draw_led(bitmap, | |
| 187 | ssystem3_draw_led(bitmap, machine->pens[ssystem3_led[4]&8?1:0], | |
| 188 | 188 | ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '0'); |
| 189 | ssystem3_draw_led(bitmap, | |
| 189 | ssystem3_draw_led(bitmap, machine->pens[ssystem3_led[4]&8?1:0], | |
| 190 | 190 | ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '1'); |
| 191 | ssystem3_draw_led(bitmap, | |
| 191 | ssystem3_draw_led(bitmap, machine->pens[ssystem3_led[4]&8?1:0], | |
| 192 | 192 | ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '2'); |
| 193 | ssystem3_draw_led(bitmap, | |
| 193 | ssystem3_draw_led(bitmap, machine->pens[ssystem3_led[4]&8?1:0], | |
| 194 | 194 | ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '3'); |
| 195 | ssystem3_draw_led(bitmap, | |
| 195 | ssystem3_draw_led(bitmap, machine->pens[ssystem3_led[4]&8?1:0], | |
| 196 | 196 | ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '4'); |
| 197 | ssystem3_draw_led(bitmap, | |
| 197 | ssystem3_draw_led(bitmap, machine->pens[ssystem3_led[4]&8?1:0], | |
| 198 | 198 | ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '5'); |
| 199 | ssystem3_draw_led(bitmap, | |
| 199 | ssystem3_draw_led(bitmap, machine->pens[ssystem3_led[4]&8?1:0], | |
| 200 | 200 | ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '6'); |
| 201 | 201 | return 0; |
| 202 | 202 | } |
| r1443 | r1444 | |
|---|---|---|
| 129 | 129 | |
| 130 | 130 | /* allocate video memory */ |
| 131 | 131 | avigo_video_memory = auto_malloc(((AVIGO_SCREEN_WIDTH>>3)*AVIGO_SCREEN_HEIGHT)); |
| 132 | | |
| 132 | machine->gfx[0] = stylus_pointer = allocgfx(&pointerlayout); | |
| 133 | 133 | decodegfx(stylus_pointer, pointermask, 0, 1); |
| 134 | 134 | /* 7-Sep-2007 - After 0.118u5, you cannot revector the color table */ |
| 135 | 135 | /*stylus_pointer->colortable = stylus_color_table;*/ |
| 136 | 136 | stylus_pointer->total_colors = 3; |
| 137 | stylus_color_table[1] = Machine->pens[0]; | |
| 138 | stylus_color_table[2] = Machine->pens[1]; | |
| 137 | stylus_color_table[1] = machine->pens[0]; | |
| 138 | stylus_color_table[2] = machine->pens[1]; | |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | /* two colours */ |
| r1443 | r1444 | |
| 162 | 162 | |
| 163 | 163 | /* load backdrop */ |
| 164 | 164 | #if 0 |
| 165 | backdrop_name = malloc(strlen( | |
| 165 | backdrop_name = malloc(strlen(machine->gamedrv->name)+4+1); | |
| 166 | 166 | |
| 167 | 167 | if (backdrop_name!=NULL) |
| 168 | 168 | { |
| 169 | strcpy(backdrop_name, | |
| 169 | strcpy(backdrop_name, machine->gamedrv->name); | |
| 170 | 170 | strcat(backdrop_name, ".png"); |
| 171 | 171 | |
| 172 | 172 | logerror("%s\n",backdrop_name); |
| 173 | 173 | |
| 174 | artwork_load(&avigo_backdrop, backdrop_name, used, | |
| 174 | artwork_load(&avigo_backdrop, backdrop_name, used,machine->drv->total_colors-used); | |
| 175 | 175 | |
| 176 | 176 | if (avigo_backdrop) |
| 177 | 177 | { |
| r1443 | r1444 | |
| 210 | 210 | rectangle r; |
| 211 | 211 | |
| 212 | 212 | /* draw avigo display */ |
| 213 | pens[0] = Machine->pens[0]; | |
| 214 | pens[1] = Machine->pens[1]; | |
| 213 | pens[0] = machine->pens[0]; | |
| 214 | pens[1] = machine->pens[1]; | |
| 215 | 215 | |
| 216 | 216 | for (y=0; y<AVIGO_SCREEN_HEIGHT; y++) |
| 217 | 217 | { |
| r1443 | r1444 | |
|---|---|---|
| 653 | 653 | { |
| 654 | 654 | int i; |
| 655 | 655 | |
| 656 | vic2.bitmap = auto_bitmap_alloc( | |
| 656 | vic2.bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); | |
| 657 | 657 | |
| 658 | 658 | if (vic2.vic3) { |
| 659 | 659 | vic2.screen[0] = (UINT8*)auto_malloc (sizeof (UINT8) * 216 * 656 / 8); |
| r1443 | r1444 | |
|---|---|---|
| 165 | 165 | |
| 166 | 166 | VIDEO_START( odyssey2 ) |
| 167 | 167 | { |
| 168 | o2_snd_shift[0] = Machine->sample_rate / 983; | |
| 169 | o2_snd_shift[1] = Machine->sample_rate / 3933; | |
| 168 | o2_snd_shift[0] = machine->sample_rate / 983; | |
| 169 | o2_snd_shift[1] = machine->sample_rate / 3933; | |
| 170 | 170 | |
| 171 | 171 | odyssey2_vh_hpos = 0; |
| 172 | 172 | odyssey2_display = (UINT8 *) auto_malloc(8 * 8 * 256); |
| r1443 | r1444 | |
| 461 | 461 | |
| 462 | 462 | assert(bitmap->width<=ARRAY_LENGTH(bg[0]) && bitmap->height<=ARRAY_LENGTH(bg)); |
| 463 | 463 | |
| 464 | plot_box( bitmap, 0, 0, bitmap->width, bitmap->height, | |
| 464 | plot_box( bitmap, 0, 0, bitmap->width, bitmap->height, machine->pens[(o2_vdc.s.color >> 3) & 0x7] ); | |
| 465 | 465 | |
| 466 | 466 | if (o2_vdc.s.control & 0x08) /* show grid */ |
| 467 | 467 | odyssey2_draw_grid(bitmap, bg); |
| r1443 | r1444 | |
| 491 | 491 | /* 7-Sep-2007 - whomever wrote this crap code was dynamically remapping |
| 492 | 492 | * the color table, a vile gross hack. Doesn't look like this is going |
| 493 | 493 | * to survive the 0.118u5 transition */ |
| 494 | /* | |
| 494 | /* machine->gfx[0]->colortable[1]=machine->pens[16+((o2_vdc.s.sprites[i].color>>3)&7)]; */ | |
| 495 | 495 | |
| 496 | 496 | y=o2_vdc.s.sprites[i].y; |
| 497 | 497 | x=o2_vdc.s.sprites[i].x; |
| r1443 | r1444 | |
| 503 | 503 | if (y+4*j>=bitmap->height) |
| 504 | 504 | break; |
| 505 | 505 | odyssey2_draw_sprite(bg, o2_vdc.s.shape[i][j], x, y+j*4, 2, 4, 1<<i); /* 1 << i is sprite collision index */ |
| 506 | drawgfxzoom(bitmap, | |
| 506 | drawgfxzoom(bitmap, machine->gfx[1], o2_vdc.s.shape[i][j],0, | |
| 507 | 507 | 0,0,x,y+j*4, |
| 508 | 508 | 0, TRANSPARENCY_PEN,0,0x20000, 0x40000); |
| 509 | 509 | } |
| r1443 | r1444 | |
| 513 | 513 | if (y+j*2>=bitmap->height) |
| 514 | 514 | break; |
| 515 | 515 | odyssey2_draw_sprite(bg, o2_vdc.s.shape[i][j], x, y+j*2, 1, 2, 1<<i); /* 1 << i is sprite collision index */ |
| 516 | drawgfxzoom(bitmap, | |
| 516 | drawgfxzoom(bitmap, machine->gfx[1], o2_vdc.s.shape[i][j],0, | |
| 517 | 517 | 0,0,x,y+j*2, |
| 518 | 518 | 0, TRANSPARENCY_PEN,0, 0x10000, 0x20000); |
| 519 | 519 | } |
| r1443 | r1444 | |
|---|---|---|
| 590 | 590 | static VIDEO_UPDATE(tms3556) |
| 591 | 591 | { |
| 592 | 592 | /* already been rendered, since we're using scanline stuff */ |
| 593 | copybitmap(bitmap, tmpbitmap, 0, 0, 0, 0, & | |
| 593 | copybitmap(bitmap, tmpbitmap, 0, 0, 0, 0, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 594 | 594 | return 0; |
| 595 | 595 | } |
| 596 | 596 |
| r1443 | r1444 | |
|---|---|---|
| 112 | 112 | palette_set_color_rgb(machine, i, ti85_palette[i][0], ti85_palette[i][1], ti85_palette[i][2]); |
| 113 | 113 | memcpy (colortable, ti85_colortable, sizeof (ti85_colortable)); |
| 114 | 114 | |
| 115 | if (!strncmp( | |
| 115 | if (!strncmp(machine->gamedrv->name, "ti81", 4)) | |
| 116 | 116 | { |
| 117 | 117 | ti_video_memory_size = TI81_VIDEO_MEMORY_SIZE; |
| 118 | 118 | ti_screen_x_size = TI81_SCREEN_X_SIZE; |
| 119 | 119 | ti_screen_y_size = TI81_SCREEN_Y_SIZE; |
| 120 | 120 | ti_number_of_frames = TI81_NUMBER_OF_FRAMES; |
| 121 | 121 | } |
| 122 | if (!strncmp( | |
| 122 | if (!strncmp(machine->gamedrv->name, "ti85", 4)) | |
| 123 | 123 | { |
| 124 | 124 | ti_video_memory_size = TI85_VIDEO_MEMORY_SIZE; |
| 125 | 125 | ti_screen_x_size = TI85_SCREEN_X_SIZE; |
| 126 | 126 | ti_screen_y_size = TI85_SCREEN_Y_SIZE; |
| 127 | 127 | ti_number_of_frames = TI85_NUMBER_OF_FRAMES; |
| 128 | 128 | } |
| 129 | if (!strncmp( | |
| 129 | if (!strncmp(machine->gamedrv->name, "ti86", 4)) | |
| 130 | 130 | { |
| 131 | 131 | ti_video_memory_size = TI86_VIDEO_MEMORY_SIZE; |
| 132 | 132 | ti_screen_x_size = TI86_SCREEN_X_SIZE; |
| r1443 | r1444 | |
| 153 | 153 | for (y=0; y<ti_screen_y_size; y++) |
| 154 | 154 | for (x=0; x<ti_screen_x_size; x++) |
| 155 | 155 | for (b=0; b<8; b++) |
| 156 | *BITMAP_ADDR16(bitmap, y, x*8+b) = | |
| 156 | *BITMAP_ADDR16(bitmap, y, x*8+b) = machine->pens[ti85_colortable[ti85_LCD_contrast&0x1f][6]]; | |
| 157 | 157 | return 0; |
| 158 | 158 | } |
| 159 | 159 | |
| r1443 | r1444 | |
| 176 | 176 | + ((*(ti85_frames+4*ti_video_memory_size+y*ti_screen_x_size+x)>>(7-b)) & 0x01) |
| 177 | 177 | + ((*(ti85_frames+5*ti_video_memory_size+y*ti_screen_x_size+x)>>(7-b)) & 0x01); |
| 178 | 178 | |
| 179 | *BITMAP_ADDR16(bitmap, y, x*8+b) = | |
| 179 | *BITMAP_ADDR16(bitmap, y, x*8+b) = machine->pens[ti85_colortable[ti85_LCD_contrast&0x1f][brightnes]]; | |
| 180 | 180 | } |
| 181 | 181 | return 0; |
| 182 | 182 | } |
| r1443 | r1444 | |
|---|---|---|
| 952 | 952 | decodegfx(cursorelement, cursormask, 0, 1); |
| 953 | 953 | /* 7-Sep-2007 - After 0.118u5, you cannot revector the color table */ |
| 954 | 954 | /* cursorelement->colortable = cursorcolortable; */ |
| 955 | cursorcolortable[1] = | |
| 955 | cursorcolortable[1] = machine->pens[1]; | |
| 956 | 956 | cursorelement->total_colors = 2; |
| 957 | ted7360_bitmap = auto_bitmap_alloc( | |
| 957 | ted7360_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); | |
| 958 | 958 | add_exit_callback(machine, ted7360_video_stop); |
| 959 | 959 | } |
| 960 | 960 |
| r1443 | r1444 | |
|---|---|---|
| 144 | 144 | if (temp < 0) temp = 0; |
| 145 | 145 | if (temp > 31) temp = 31; |
| 146 | 146 | bright = 1.0 * temp / 31; |
| 147 | pen[i] = | |
| 147 | pen[i] = machine->pens[i]; | |
| 148 | 148 | #ifdef BRIGHTNESS_DOES_NOT_WORK |
| 149 | 149 | palette_set_color( machine, pen[i], 255 * bright, 255 * bright, 255 * bright); |
| 150 | 150 | #else |
| r1443 | r1444 | |
|---|---|---|
| 125 | 125 | bitmap_fill(bitmap, cliprect, 5); |
| 126 | 126 | |
| 127 | 127 | /* HJB: we cannot initialize array with values from other arrays, thus... */ |
| 128 | color[0] = Machine->pens[pocketc_colortable[PC1251_CONTRAST][0]]; | |
| 129 | color[1] = Machine->pens[pocketc_colortable[PC1251_CONTRAST][1]]; | |
| 128 | color[0] = machine->pens[pocketc_colortable[PC1251_CONTRAST][0]]; | |
| 129 | color[1] = machine->pens[pocketc_colortable[PC1251_CONTRAST][1]]; | |
| 130 | 130 | |
| 131 | 131 | for (x=RIGHT,y=DOWN,i=0; i<60;x+=3) { |
| 132 | 132 | for (j=0; j<5;j++,i++,x+=3) |
| 133 | drawgfx(bitmap, | |
| 133 | drawgfx(bitmap, machine->gfx[0], pc1251_lcd.reg[i], | |
| 134 | 134 | PC1251_CONTRAST,0,0, |
| 135 | 135 | x,y, |
| 136 | 136 | 0, TRANSPARENCY_NONE,0); |
| 137 | 137 | } |
| 138 | 138 | for (i=0x7b; i>=0x40;x+=3) { |
| 139 | 139 | for (j=0; j<5;j++,i--,x+=3) |
| 140 | drawgfx(bitmap, | |
| 140 | drawgfx(bitmap, machine->gfx[0], pc1251_lcd.reg[i], | |
| 141 | 141 | PC1251_CONTRAST,0,0, |
| 142 | 142 | x,y, |
| 143 | 143 | 0, TRANSPARENCY_NONE,0); |
| r1443 | r1444 | |
|---|---|---|
| 95 | 95 | if ((i&0x18)==0x18) background_collision[i]|=0x10; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | vc4000_video.bitmap = auto_bitmap_alloc( | |
| 98 | vc4000_video.bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | READ8_HANDLER(vc4000_video_r) |
| r1443 | r1444 | |
|---|---|---|
| 68 | 68 | 8 * 10 |
| 69 | 69 | }; |
| 70 | 70 | |
| 71 | static GFXDECODE_START( saa5050 | |
| 71 | static GFXDECODE_START( saa5050 | |
| 72 | 72 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_charlayout, 0, 128 ) |
| 73 | 73 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_hilayout, 0, 128 ) |
| 74 | 74 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_lolayout, 0, 128 ) |
| r1443 | r1444 | |
| 218 | 218 | colour = saa5050_state.saa5050_forecol | (saa5050_state.saa5050_backcol << 3); |
| 219 | 219 | if (saa5050_state.saa5050_flags & SAA5050_DBLHI) |
| 220 | 220 | { |
| 221 | drawgfx (bitmap, Machine->gfx[1], code, colour, 0, 0, | |
| 222 | sx * 6, sy * 10, &Machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 223 | drawgfx (bitmap, Machine->gfx[2], code, colour, 0, 0, | |
| 224 | sx * 6, (sy + 1) * 10, &Machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 221 | drawgfx (bitmap, machine->gfx[1], code, colour, 0, 0, | |
| 222 | sx * 6, sy * 10, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 223 | drawgfx (bitmap, machine->gfx[2], code, colour, 0, 0, | |
| 224 | sx * 6, (sy + 1) * 10, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 225 | 225 | } |
| 226 | 226 | else |
| 227 | 227 | { |
| 228 | drawgfx (bitmap, Machine->gfx[0], code, colour, 0, 0, | |
| 229 | sx * 6, sy * 10, &Machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 228 | drawgfx (bitmap, machine->gfx[0], code, colour, 0, 0, | |
| 229 | sx * 6, sy * 10, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 230 | 230 | } |
| 231 | 231 | } |
| 232 | 232 | if (saa5050_state.saa5050_flags & SAA5050_DBLHI) |
| r1443 | r1444 | |
| 247 | 247 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 248 | 248 | MDRV_SCREEN_SIZE(40 * 6, 24 * 10) |
| 249 | 249 | MDRV_SCREEN_VISIBLE_AREA(0, 40 * 6 - 1, 0, 24 * 10 - 1) |
| 250 | MDRV_GFXDECODE( saa5050 | |
| 250 | MDRV_GFXDECODE( saa5050 | |
| 251 | 251 | MDRV_PALETTE_LENGTH(8) |
| 252 | 252 | MDRV_COLORTABLE_LENGTH(128) |
| 253 | 253 | MDRV_PALETTE_INIT(saa5050) |
| r1443 | r1444 | |
|---|---|---|
| 106 | 106 | 8*8 /* every char takes 8 consecutive bytes */ |
| 107 | 107 | }; |
| 108 | 108 | |
| 109 | GFXDECODE_START( asr733 | |
| 109 | GFXDECODE_START( asr733 | |
| 110 | 110 | GFXDECODE_ENTRY( asr733_chr_region, 0, fontlayout, 0, 1 ) |
| 111 | 111 | GFXDECODE_END |
| 112 | 112 |
| r1443 | r1444 | |
|---|---|---|
| 63 | 63 | black_area.max_x = 32*8-1; |
| 64 | 64 | black_area.min_y = 0; |
| 65 | 65 | black_area.max_y = 16*13-1; |
| 66 | fillbitmap(bitmap, | |
| 66 | fillbitmap(bitmap, machine->pens[1], &black_area); | |
| 67 | 67 | fast_mode = TRUE; |
| 68 | 68 | return 0; |
| 69 | 69 | } |
| r1443 | r1444 | |
| 84 | 84 | } |
| 85 | 85 | if (horizontal_pos == 0x0b) |
| 86 | 86 | black_area.min_x = black_area.max_x = 0; |
| 87 | fillbitmap(bitmap, | |
| 87 | fillbitmap(bitmap, machine->pens[1], &black_area); | |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | for( offs = 0; offs < 512; offs++ ) |
| r1443 | r1444 | |
| 101 | 101 | if (code>191) |
| 102 | 102 | code-=128; |
| 103 | 103 | sy = (offs / 32) * 13; |
| 104 | drawgfx(bitmap, | |
| 104 | drawgfx(bitmap, machine->gfx[0], code & 0x7f, 1, 0,0, sx,sy, | |
| 105 | 105 | NULL, TRANSPARENCY_NONE, 0); |
| 106 | 106 | } |
| 107 | 107 | } |
| r1443 | r1444 | |
|---|---|---|
| 154 | 154 | cdp1861_dma_timer = timer_alloc(cdp1861_dma_tick, NULL); |
| 155 | 155 | |
| 156 | 156 | /* allocate the temporary bitmap */ |
| 157 | cdptmpbitmap = auto_bitmap_alloc( | |
| 157 | cdptmpbitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 158 | 158 | |
| 159 | 159 | /* ensure the contents of the bitmap are saved */ |
| 160 | 160 | state_save_register_bitmap("video", 0, "cdptmpbitmap", cdptmpbitmap); |
| r1443 | r1444 | |
|---|---|---|
| 12 | 12 | asr733_chr_region_len = 128*asr733_single_char_len |
| 13 | 13 | }; |
| 14 | 14 | |
| 15 | GFXDECODE_EXTERN( asr733 | |
| 15 | GFXDECODE_EXTERN( asr733 | |
| 16 | 16 | |
| 17 | 17 | enum |
| 18 | 18 | { |
| r1443 | r1444 | |
|---|---|---|
| 130 | 130 | |
| 131 | 131 | if( full_refresh ) |
| 132 | 132 | { |
| 133 | fillbitmap(bitmap, | |
| 133 | fillbitmap(bitmap, machine->pens[(laser_bg_mode >> 4) & 15], &machine->screen[0].visarea); | |
| 134 | 134 | memset(dirtybuffer, 1, videoram_size); |
| 135 | 135 | } |
| 136 | 136 | |
| r1443 | r1444 | |
| 156 | 156 | sy = BORDER_V/2 + y; |
| 157 | 157 | sx = BORDER_H/2 + x * 8; |
| 158 | 158 | code = videoram[offs]; |
| 159 | drawgfx(bitmap,Machine->gfx[2],code,color,0,0,sx,sy, | |
| 160 | &Machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 159 | drawgfx(bitmap,machine->gfx[2],code,color,0,0,sx,sy, | |
| 160 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 161 | 161 | dirtybuffer[offs] = 0; |
| 162 | 162 | } |
| 163 | 163 | } |
| r1443 | r1444 | |
| 181 | 181 | sx = BORDER_H/2 + x * 16; |
| 182 | 182 | code = videoram[offs]; |
| 183 | 183 | color = videoram[offs+1]; |
| 184 | drawgfx(bitmap,Machine->gfx[3],code,color,0,0,sx,sy, | |
| 185 | &Machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 184 | drawgfx(bitmap,machine->gfx[3],code,color,0,0,sx,sy, | |
| 185 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 186 | 186 | dirtybuffer[offs] = dirtybuffer[offs+1] = 0; |
| 187 | 187 | } |
| 188 | 188 | } |
| r1443 | r1444 | |
| 205 | 205 | sy = BORDER_V/2 + y; |
| 206 | 206 | sx = BORDER_H/2 + x * 8; |
| 207 | 207 | code = videoram[offs]; |
| 208 | drawgfx(bitmap,Machine->gfx[5],code,0,0,0,sx,sy, | |
| 209 | &Machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 208 | drawgfx(bitmap,machine->gfx[5],code,0,0,0,sx,sy, | |
| 209 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 210 | 210 | dirtybuffer[offs] = 0; |
| 211 | 211 | } |
| 212 | 212 | } |
| r1443 | r1444 | |
| 230 | 230 | sy = BORDER_V/2 + y * 2; |
| 231 | 231 | sx = BORDER_H/2 + x * 8; |
| 232 | 232 | code = videoram[offs]; |
| 233 | drawgfx(bitmap,Machine->gfx[6],code,0,0,0,sx,sy, | |
| 234 | &Machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 233 | drawgfx(bitmap,machine->gfx[6],code,0,0,0,sx,sy, | |
| 234 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 235 | 235 | dirtybuffer[offs] = 0; |
| 236 | 236 | } |
| 237 | 237 | } |
| r1443 | r1444 | |
| 254 | 254 | sy = BORDER_V/2 + y; |
| 255 | 255 | sx = BORDER_H/2 + x * 16; |
| 256 | 256 | code = videoram[offs]; |
| 257 | drawgfx(bitmap,Machine->gfx[3],code,color,0,0,sx,sy, | |
| 258 | &Machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 257 | drawgfx(bitmap,machine->gfx[3],code,color,0,0,sx,sy, | |
| 258 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 259 | 259 | dirtybuffer[offs] = 0; |
| 260 | 260 | } |
| 261 | 261 | } |
| r1443 | r1444 | |
| 279 | 279 | sx = BORDER_H/2 + x * 32; |
| 280 | 280 | code = videoram[offs]; |
| 281 | 281 | color = videoram[offs+1]; |
| 282 | drawgfx(bitmap,Machine->gfx[4],code,color,0,0,sx,sy, | |
| 283 | &Machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 282 | drawgfx(bitmap,machine->gfx[4],code,color,0,0,sx,sy, | |
| 283 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 284 | 284 | dirtybuffer[offs] = dirtybuffer[offs+1] = 0; |
| 285 | 285 | } |
| 286 | 286 | } |
| r1443 | r1444 | |
| 305 | 305 | sy = BORDER_V/2 + y * 8; |
| 306 | 306 | sx = BORDER_H/2 + x * 8; |
| 307 | 307 | code = videoram[0x3800+offs]; |
| 308 | drawgfx(bitmap,Machine->gfx[0],code,color,0,0,sx,sy, | |
| 309 | &Machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 308 | drawgfx(bitmap,machine->gfx[0],code,color,0,0,sx,sy, | |
| 309 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 310 | 310 | dirtybuffer[offs] = 0; |
| 311 | 311 | } |
| 312 | 312 | } |
| r1443 | r1444 | |
| 327 | 327 | sx = BORDER_H/2 + x * 16; |
| 328 | 328 | code = videoram[0x3800+offs]; |
| 329 | 329 | color = videoram[0x3801+offs]; |
| 330 | drawgfx(bitmap,Machine->gfx[1],code,color,0,0,sx,sy, | |
| 331 | &Machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 330 | drawgfx(bitmap,machine->gfx[1],code,color,0,0,sx,sy, | |
| 331 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 332 | 332 | dirtybuffer[0x3800+offs] = dirtybuffer[0x3801+offs] = 0; |
| 333 | 333 | } |
| 334 | 334 | } |
| r1443 | r1444 | |
|---|---|---|
| 66 | 66 | # rules for creating helpids.c |
| 67 | 67 | #------------------------------------------------- |
| 68 | 68 | |
| 69 | $(WINUISRC)/helpids.c : $(WINUIOBJ)/mkhelp$(EXE) $(WINUISRC)/resource.h $(WINUISRC)/resource.hm $(WINUISRC)/mameui.rc | |
| 69 | $(WINUIOBJ)/helpids.o : $(WINUIOBJ)/helpids.c | |
| 70 | @echo Compiling $<... | |
| 71 | $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@ | |
| 72 | ||
| 73 | $(WINUIOBJ)/helpids.c : $(WINUIOBJ)/mkhelp$(EXE) $(WINUISRC)/resource.h $(WINUISRC)/resource.hm $(WINUISRC)/mameui.rc | |
| 70 | 74 | $(WINUIOBJ)/mkhelp$(EXE) $(WINUISRC)/mameui.rc >$@ |
| 71 | 75 | |
| 72 | 76 | # rule to build the generator |
| r1443 | r1444 | |
|---|---|---|
| 1156 | 1156 | dgnbeta_reset(machine); |
| 1157 | 1157 | #ifdef MAME_DEBUG |
| 1158 | 1158 | /* setup debug commands */ |
| 1159 | if ( | |
| 1159 | if (machine->debug_mode) | |
| 1160 | 1160 | { |
| 1161 | 1161 | debug_console_register_command("beta_dat_log", CMDFLAG_NONE, 0, 0, 0,ToggleDatLog); |
| 1162 | 1162 | debug_console_register_command("beta_key_dump", CMDFLAG_NONE, 0, 0, 0,DumpKeys); |
| r1443 | r1444 | |
|---|---|---|
| 1076 | 1076 | struct tm mac_reference; |
| 1077 | 1077 | UINT32 seconds; |
| 1078 | 1078 | |
| 1079 | mame_get_base_datetime( | |
| 1079 | mame_get_base_datetime(machine, &systime); | |
| 1080 | 1080 | |
| 1081 | 1081 | /* The count starts on 1st January 1904 */ |
| 1082 | 1082 | mac_reference.tm_sec = 0; |
| r1443 | r1444 | |
|---|---|---|
| 3039 | 3039 | state_save_register_global(gime_firq); |
| 3040 | 3040 | state_save_register_func_postload(coco3_state_postload); |
| 3041 | 3041 | |
| 3042 | video_crosshair_set_screenmask_callback( | |
| 3042 | video_crosshair_set_screenmask_callback(machine, crosshairs_get_screen); | |
| 3043 | 3043 | |
| 3044 | 3044 | /* add reset callback */ |
| 3045 | 3045 | add_reset_callback(machine, coco3_machine_reset); |
| r1443 | r1444 | |
|---|---|---|
| 915 | 915 | { |
| 916 | 916 | for (x = 0; x < resx; x++) |
| 917 | 917 | line_buffer[x] = (v[(x+y*resx)>>4] & (0x8000 >> ((x+y*resx) & 0xf))) ? 1 : 0; |
| 918 | draw_scanline8(bitmap, 0, y, resx, line_buffer, | |
| 918 | draw_scanline8(bitmap, 0, y, resx, line_buffer, machine->pens, -1); | |
| 919 | 919 | } |
| 920 | 920 | return 0; |
| 921 | 921 | } |
| r1443 | r1444 | |
| 1034 | 1034 | { |
| 1035 | 1035 | /* Now we copy the host clock into the Lisa clock */ |
| 1036 | 1036 | mame_system_time systime; |
| 1037 | mame_get_base_datetime( | |
| 1037 | mame_get_base_datetime(machine, &systime); | |
| 1038 | 1038 | |
| 1039 | 1039 | clock_regs.alarm = 0xfffffL; |
| 1040 | 1040 | /* The clock count starts on 1st January 1980 */ |
| r1443 | r1444 | |
|---|---|---|
| 276 | 276 | } |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | void check_pause_button( void ) { | |
| 279 | void sms_check_pause_button( void ) { | |
| 280 | 280 | if ( ! IS_GAMEGEAR ) { |
| 281 | 281 | if ( ! (readinputport(2) & 0x80) ) { |
| 282 | 282 | if ( ! smsPaused ) { |
| r1443 | r1444 | |
|---|---|---|
| 1576 | 1576 | memset(&a2_cfg, 0, sizeof(a2_cfg)); |
| 1577 | 1577 | |
| 1578 | 1578 | /* specify slots */ |
| 1579 | if (!strcmp(Machine->gamedrv->name, "apple2c0") || | |
| 1580 | !strcmp(Machine->gamedrv->name, "apple2c3") || | |
| 1581 | !strcmp(Machine->gamedrv->name, "apple2cp")) | |
| 1579 | if (!strcmp(machine->gamedrv->name, "apple2c0") || | |
| 1580 | !strcmp(machine->gamedrv->name, "apple2c3") || | |
| 1581 | !strcmp(machine->gamedrv->name, "apple2cp")) | |
| 1582 | 1582 | { |
| 1583 | 1583 | a2_cfg.slots[0] = &apple2_slot_langcard; |
| 1584 | 1584 | a2_cfg.slots[4] = &apple2_slot_mockingboard; |
| r1443 | r1444 | |
| 1594 | 1594 | /* there appears to be some hidden RAM that is swapped in on the Apple |
| 1595 | 1595 | * IIc plus; I have not found any official documentation but the BIOS |
| 1596 | 1596 | * clearly uses this area as writeable memory */ |
| 1597 | if (!strcmp( | |
| 1597 | if (!strcmp(machine->gamedrv->name, "apple2cp")) | |
| 1598 | 1598 | apple2cp_ce00_ram = auto_malloc(0x200); |
| 1599 | 1599 | |
| 1600 | 1600 | apple2_init_common(machine, &a2_cfg); |
| r1443 | r1444 | |
|---|---|---|
| 552 | 552 | |
| 553 | 553 | memset(&svi, 0, sizeof (svi) ); |
| 554 | 554 | |
| 555 | if ( ! strcmp( | |
| 555 | if ( ! strcmp( machine->gamedrv->name, "svi318" ) || ! strcmp( machine->gamedrv->name, "svi318n" ) ) { | |
| 556 | 556 | svi.svi318 = 1; |
| 557 | 557 | } |
| 558 | 558 |
| r1443 | r1444 | |
|---|---|---|
| 949 | 949 | */ |
| 950 | 950 | VIDEO_START( ti99_4ev ) |
| 951 | 951 | { |
| 952 | v9938_init( | |
| 952 | v9938_init(machine, MODEL_V9938, 0x20000, tms9901_set_int2); /* v38 with 128 kb of video RAM */ | |
| 953 | 953 | } |
| 954 | 954 | |
| 955 | 955 | /* |
| r1443 | r1444 | |
|---|---|---|
| 96 | 96 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y2 - Up") PORT_CODE(KEYCODE_W) |
| 97 | 97 | INPUT_PORTS_END |
| 98 | 98 | |
| 99 | static GFXDECODE_START( | |
| 99 | static GFXDECODE_START( wswa | |
| 100 | 100 | GFXDECODE_END |
| 101 | 101 | |
| 102 | 102 | /* WonderSwan can display 16 shades of grey */ |
| r1443 | r1444 | |
| 148 | 148 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 149 | 149 | MDRV_SCREEN_SIZE( WSWAN_X_PIXELS, WSWAN_X_PIXELS ) |
| 150 | 150 | MDRV_SCREEN_VISIBLE_AREA(0*8, WSWAN_X_PIXELS - 1, 0, WSWAN_X_PIXELS - 1) |
| 151 | MDRV_GFXDECODE( | |
| 151 | MDRV_GFXDECODE(wswa | |
| 152 | 152 | MDRV_PALETTE_LENGTH(16) |
| 153 | 153 | MDRV_COLORTABLE_LENGTH(4*16) |
| 154 | 154 | MDRV_PALETTE_INIT(wswan) |
| r1443 | r1444 | |
|---|---|---|
| 198 | 198 | 8*8 |
| 199 | 199 | }; |
| 200 | 200 | |
| 201 | static GFXDECODE_START( comquest | |
| 201 | static GFXDECODE_START( comquest | |
| 202 | 202 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, comquest_charlayout, 0, 2 ) |
| 203 | 203 | GFXDECODE_END |
| 204 | 204 | |
| r1443 | r1444 | |
| 270 | 270 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 271 | 271 | MDRV_SCREEN_SIZE(64*4, 128) /* 160 x 102 */ |
| 272 | 272 | MDRV_SCREEN_VISIBLE_AREA(0, 64*4-1, 0, 128-1) |
| 273 | MDRV_GFXDECODE( comquest | |
| 273 | MDRV_GFXDECODE( comquest | |
| 274 | 274 | MDRV_PALETTE_LENGTH( sizeof(comquest_palette) / 3) |
| 275 | 275 | MDRV_COLORTABLE_LENGTH( sizeof(comquest_colortable) / sizeof(comquest_colortable[0][0]) ) |
| 276 | 276 | MDRV_PALETTE_INIT( comquest ) |
| r1443 | r1444 | |
|---|---|---|
| 319 | 319 | |
| 320 | 320 | /* Graphics Decode Information */ |
| 321 | 321 | |
| 322 | static GFXDECODE_START( zx80 | |
| 322 | static GFXDECODE_START( zx80 | |
| 323 | 323 | GFXDECODE_ENTRY( REGION_CPU1, 0x0e00, zx_char_layout, 0, 2 ) |
| 324 | 324 | GFXDECODE_END |
| 325 | 325 | |
| 326 | static GFXDECODE_START( zx81 | |
| 326 | static GFXDECODE_START( zx81 | |
| 327 | 327 | GFXDECODE_ENTRY( REGION_CPU1, 0x1e00, zx_char_layout, 0, 2 ) |
| 328 | 328 | GFXDECODE_END |
| 329 | 329 | |
| 330 | static GFXDECODE_START( pc8300 | |
| 330 | static GFXDECODE_START( pc8300 | |
| 331 | 331 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, zx_char_layout, 0, 2 ) |
| 332 | 332 | GFXDECODE_END |
| 333 | 333 | |
| 334 | static GFXDECODE_START( pow3000 | |
| 334 | static GFXDECODE_START( pow3000 | |
| 335 | 335 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, zx_char_layout, 0, 2 ) |
| 336 | 336 | GFXDECODE_END |
| 337 | 337 | |
| r1443 | r1444 | |
| 410 | 410 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 411 | 411 | MDRV_SCREEN_SIZE(ZX81_PIXELS_PER_SCANLINE, ZX81_PAL_SCANLINES) |
| 412 | 412 | MDRV_SCREEN_VISIBLE_AREA(0, ZX81_PIXELS_PER_SCANLINE-1, 0, ZX81_PAL_SCANLINES-1) |
| 413 | MDRV_GFXDECODE(zx80 | |
| 413 | MDRV_GFXDECODE(zx80 | |
| 414 | 414 | MDRV_PALETTE_LENGTH(6) |
| 415 | 415 | MDRV_COLORTABLE_LENGTH(4) |
| 416 | 416 | MDRV_PALETTE_INIT(zx80) |
| r1443 | r1444 | |
| 434 | 434 | |
| 435 | 435 | MDRV_MACHINE_RESET(zx81) |
| 436 | 436 | |
| 437 | MDRV_GFXDECODE(zx81 | |
| 437 | MDRV_GFXDECODE(zx81 | |
| 438 | 438 | MDRV_PALETTE_INIT(zx81) |
| 439 | 439 | MACHINE_DRIVER_END |
| 440 | 440 | |
| r1443 | r1444 | |
| 455 | 455 | MDRV_CPU_PROGRAM_MAP(pc8300_map, 0) |
| 456 | 456 | |
| 457 | 457 | MDRV_MACHINE_RESET(pc8300) |
| 458 | MDRV_GFXDECODE(pc8300 | |
| 458 | MDRV_GFXDECODE(pc8300 | |
| 459 | 459 | MDRV_PALETTE_INIT(zx81) |
| 460 | 460 | MACHINE_DRIVER_END |
| 461 | 461 | |
| r1443 | r1444 | |
| 466 | 466 | MDRV_CPU_PROGRAM_MAP(pc8300_map, 0) |
| 467 | 467 | |
| 468 | 468 | MDRV_MACHINE_RESET(pc8300) |
| 469 | MDRV_GFXDECODE(pow3000 | |
| 469 | MDRV_GFXDECODE(pow3000 | |
| 470 | 470 | MDRV_PALETTE_INIT(zx81) |
| 471 | 471 | MACHINE_DRIVER_END |
| 472 | 472 |
| r1443 | r1444 | |
|---|---|---|
| 283 | 283 | 8*8 /* every char takes 8 consecutive bytes */ |
| 284 | 284 | }; |
| 285 | 285 | |
| 286 | static GFXDECODE_START( | |
| 286 | static GFXDECODE_START( p | |
| 287 | 287 | GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, 0, 3 ) |
| 288 | 288 | GFXDECODE_END |
| 289 | 289 | |
| r1443 | r1444 | |
| 412 | 412 | MDRV_SCREEN_SIZE(virtual_width, virtual_height) |
| 413 | 413 | MDRV_SCREEN_VISIBLE_AREA(0, virtual_width-1, 0, virtual_height-1) |
| 414 | 414 | |
| 415 | MDRV_GFXDECODE( | |
| 415 | MDRV_GFXDECODE(p | |
| 416 | 416 | MDRV_PALETTE_LENGTH(pen_crt_num_levels + (sizeof(palette) / sizeof(palette[0]) / 3)) |
| 417 | 417 | MDRV_COLORTABLE_LENGTH(sizeof(pdp1_colortable) / sizeof(pdp1_colortable[0])) |
| 418 | 418 |
| r1443 | r1444 | |
|---|---|---|
| 76 | 76 | 8*8 /* every char takes 8 bytes */ |
| 77 | 77 | }; |
| 78 | 78 | |
| 79 | static GFXDECODE_START( apple2gs | |
| 79 | static GFXDECODE_START( apple2gs | |
| 80 | 80 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, apple2gs_text_layout, 0, 2 ) |
| 81 | 81 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, apple2gs_dbltext_layout, 0, 2 ) |
| 82 | 82 | GFXDECODE_END |
| r1443 | r1444 | |
| 155 | 155 | MDRV_SCREEN_SIZE(704, 262) // 640+32+32 for the borders |
| 156 | 156 | MDRV_SCREEN_VISIBLE_AREA(0,703,0,230) |
| 157 | 157 | MDRV_PALETTE_LENGTH( 16+256 ) |
| 158 | MDRV_GFXDECODE( apple2gs | |
| 158 | MDRV_GFXDECODE( apple2gs | |
| 159 | 159 | |
| 160 | 160 | MDRV_MACHINE_START( apple2gs ) |
| 161 | 161 | MDRV_MACHINE_RESET( apple2gs ) |
| r1443 | r1444 | |
|---|---|---|
| 160 | 160 | 1*8 |
| 161 | 161 | }; |
| 162 | 162 | |
| 163 | static GFXDECODE_START( hp48 | |
| 163 | static GFXDECODE_START( hp48 | |
| 164 | 164 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, hp48_charlayout, 0, 8 ) |
| 165 | 165 | GFXDECODE_END |
| 166 | 166 | |
| r1443 | r1444 | |
| 188 | 188 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 189 | 189 | MDRV_SCREEN_SIZE(339, 775) |
| 190 | 190 | MDRV_SCREEN_VISIBLE_AREA(0, 339-1, 0, 775-1) |
| 191 | MDRV_GFXDECODE( hp48 | |
| 191 | MDRV_GFXDECODE( hp48 | |
| 192 | 192 | MDRV_PALETTE_LENGTH( 248 ) |
| 193 | 193 | MDRV_COLORTABLE_LENGTH( sizeof (hp48_colortable) / sizeof(hp48_colortable[0][0]) ) |
| 194 | 194 | MDRV_PALETTE_INIT( hp48 ) |
| r1443 | r1444 | |
|---|---|---|
| 457 | 457 | 8*16 |
| 458 | 458 | }; |
| 459 | 459 | |
| 460 | static GFXDECODE_START( cbm600 | |
| 460 | static GFXDECODE_START( cbm600 | |
| 461 | 461 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, cbm600_charlayout, 0, 1 ) |
| 462 | 462 | GFXDECODE_ENTRY( REGION_GFX1, 0x1000, cbm600_charlayout, 0, 1 ) |
| 463 | 463 | GFXDECODE_END |
| 464 | 464 | |
| 465 | static GFXDECODE_START( cbm700 | |
| 465 | static GFXDECODE_START( cbm700 | |
| 466 | 466 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, cbm700_charlayout, 0, 1 ) |
| 467 | 467 | GFXDECODE_ENTRY( REGION_GFX1, 0x1000, cbm700_charlayout, 0, 1 ) |
| 468 | 468 | GFXDECODE_END |
| r1443 | r1444 | |
| 618 | 618 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 619 | 619 | MDRV_SCREEN_SIZE(640, 200) |
| 620 | 620 | MDRV_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 200 - 1) |
| 621 | MDRV_GFXDECODE( cbm600 | |
| 621 | MDRV_GFXDECODE( cbm600 | |
| 622 | 622 | MDRV_PALETTE_LENGTH(sizeof (cbm700_palette) / sizeof (cbm700_palette[0]) / 3) |
| 623 | 623 | MDRV_COLORTABLE_LENGTH(sizeof (cbmb_colortable) / sizeof(cbmb_colortable[0])) |
| 624 | 624 | MDRV_PALETTE_INIT( cbm700 ) |
| r1443 | r1444 | |
| 643 | 643 | MDRV_IMPORT_FROM( cbm600pal ) |
| 644 | 644 | MDRV_SCREEN_SIZE(720, 350) |
| 645 | 645 | MDRV_SCREEN_VISIBLE_AREA(0, 720 - 1, 0, 350 - 1) |
| 646 | MDRV_GFXDECODE( cbm700 | |
| 646 | MDRV_GFXDECODE( cbm700 | |
| 647 | 647 | |
| 648 | 648 | MDRV_VIDEO_START( cbm700 ) |
| 649 | 649 | MACHINE_DRIVER_END |
| r1443 | r1444 | |
|---|---|---|
| 188 | 188 | 8*16 /* every char takes 16 bytes */ |
| 189 | 189 | }; |
| 190 | 190 | |
| 191 | static GFXDECODE_START( mbee | |
| 191 | static GFXDECODE_START( mbee | |
| 192 | 192 | GFXDECODE_ENTRY( REGION_CPU1, 0xf000, mbee_charlayout, 0, 256 ) |
| 193 | 193 | GFXDECODE_END |
| 194 | 194 | |
| r1443 | r1444 | |
| 261 | 261 | MDRV_MACHINE_RESET( mbee ) |
| 262 | 262 | MDRV_MACHINE_START( mbee ) |
| 263 | 263 | |
| 264 | MDRV_GFXDECODE(mbee | |
| 264 | MDRV_GFXDECODE(mbee | |
| 265 | 265 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 266 | 266 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 267 | 267 | MDRV_SCREEN_SIZE(70*8, 310) |
| r1443 | r1444 | |
|---|---|---|
| 490 | 490 | 1*8 |
| 491 | 491 | }; |
| 492 | 492 | |
| 493 | static GFXDECODE_START( pc1401 | |
| 493 | static GFXDECODE_START( pc1401 | |
| 494 | 494 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, pc1401_charlayout, 0, 8 ) |
| 495 | 495 | GFXDECODE_END |
| 496 | 496 | |
| 497 | static GFXDECODE_START( pc1251 | |
| 497 | static GFXDECODE_START( pc1251 | |
| 498 | 498 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, pc1251_charlayout, 0, 8 ) |
| 499 | 499 | GFXDECODE_END |
| 500 | 500 | |
| r1443 | r1444 | |
| 529 | 529 | MDRV_SCREEN_VISIBLE_AREA(0, 594-1, 0, 273-1) |
| 530 | 530 | // MDRV_SCREEN_SIZE(640, 273) |
| 531 | 531 | // MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 273-1) |
| 532 | MDRV_GFXDECODE( pc1401 | |
| 532 | MDRV_GFXDECODE( pc1401 | |
| 533 | 533 | MDRV_PALETTE_LENGTH(248 + 32768) |
| 534 | 534 | MDRV_COLORTABLE_LENGTH( 16 ) |
| 535 | 535 | MDRV_PALETTE_INIT( pocketc ) |
| r1443 | r1444 | |
| 563 | 563 | MDRV_SCREEN_VISIBLE_AREA(0, 608-1, 0, 300-1) |
| 564 | 564 | // MDRV_SCREEN_SIZE(640, 334) |
| 565 | 565 | // MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 334-1) |
| 566 | MDRV_GFXDECODE( pc1251 | |
| 566 | MDRV_GFXDECODE( pc1251 | |
| 567 | 567 | |
| 568 | 568 | MDRV_VIDEO_UPDATE( pc1251 ) |
| 569 | 569 | MACHINE_DRIVER_END |
| r1443 | r1444 | |
|---|---|---|
| 528 | 528 | AM_RANGE(0xffff, 0xffff) AM_READWRITE( gb_ie_r, gb_ie_w ) /* interrupt enable register */ |
| 529 | 529 | ADDRESS_MAP_END |
| 530 | 530 | |
| 531 | static GFXDECODE_START( gb | |
| 531 | static GFXDECODE_START( gb | |
| 532 | 532 | GFXDECODE_END |
| 533 | 533 | |
| 534 | 534 | static INPUT_PORTS_START( gameboy ) |
| r1443 | r1444 | |
| 570 | 570 | // MDRV_SCREEN_SIZE(20*8, 18*8) |
| 571 | 571 | MDRV_SCREEN_SIZE( 458, 154 ) |
| 572 | 572 | MDRV_SCREEN_VISIBLE_AREA(0*8, 20*8-1, 0*8, 18*8-1) |
| 573 | MDRV_GFXDECODE(gb | |
| 573 | MDRV_GFXDECODE(gb | |
| 574 | 574 | MDRV_PALETTE_LENGTH(4) |
| 575 | 575 | MDRV_COLORTABLE_LENGTH(4) |
| 576 | 576 | MDRV_PALETTE_INIT(gb) |
| r1443 | r1444 | |
| 686 | 686 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 687 | 687 | MDRV_SCREEN_SIZE(20*8, 18*8) |
| 688 | 688 | MDRV_SCREEN_VISIBLE_AREA(0*8, 20*8-1, 0*8, 18*8-1) |
| 689 | MDRV_GFXDECODE(gb | |
| 689 | MDRV_GFXDECODE(gb | |
| 690 | 690 | MDRV_PALETTE_LENGTH(4) |
| 691 | 691 | MDRV_COLORTABLE_LENGTH(4) |
| 692 | 692 | MDRV_PALETTE_INIT(megaduck) |
| r1443 | r1444 | |
|---|---|---|
| 245 | 245 | #endif |
| 246 | 246 | |
| 247 | 247 | #if VIDEO_911 |
| 248 | MDRV_GFXDECODE(vdt911 | |
| 248 | MDRV_GFXDECODE(vdt911 | |
| 249 | 249 | MDRV_PALETTE_LENGTH(vdt911_palette_size) |
| 250 | 250 | MDRV_COLORTABLE_LENGTH(vdt911_colortable_size) |
| 251 | 251 | #else |
| 252 | MDRV_GFXDECODE(asr733 | |
| 252 | MDRV_GFXDECODE(asr733 | |
| 253 | 253 | MDRV_PALETTE_LENGTH(asr733_palette_size) |
| 254 | 254 | MDRV_COLORTABLE_LENGTH(asr733_colortable_size) |
| 255 | 255 | #endif |
| r1443 | r1444 | |
|---|---|---|
| 162 | 162 | 18 * 24 * 2, /* every icon takes 18 rows of 24 * 2 bits */ |
| 163 | 163 | }; |
| 164 | 164 | |
| 165 | static GFXDECODE_START( | |
| 165 | static GFXDECODE_START( k | |
| 166 | 166 | GFXDECODE_ENTRY( REGION_GFX1, 0, led_layout, 0, 16 ) |
| 167 | 167 | GFXDECODE_ENTRY( REGION_GFX2, 0, key_layout, 16*2, 2 ) |
| 168 | 168 | GFXDECODE_END |
| r1443 | r1444 | |
| 184 | 184 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 185 | 185 | MDRV_SCREEN_SIZE(600, 768) |
| 186 | 186 | MDRV_SCREEN_VISIBLE_AREA(0, 600 - 1, 0, 768 - 1) |
| 187 | MDRV_GFXDECODE( | |
| 187 | MDRV_GFXDECODE( k | |
| 188 | 188 | MDRV_PALETTE_LENGTH(32768+21) |
| 189 | 189 | MDRV_COLORTABLE_LENGTH(256) |
| 190 | 190 | MDRV_PALETTE_INIT( kim1 ) |
| r1443 | r1444 | |
|---|---|---|
| 33 | 33 | AM_RANGE( 0xE000, 0xFFFF ) AM_RAM /* Extended I/O, Extended RAM */ |
| 34 | 34 | ADDRESS_MAP_END |
| 35 | 35 | |
| 36 | static GFXDECODE_START( gamecom | |
| 36 | static GFXDECODE_START( gamecom | |
| 37 | 37 | GFXDECODE_END |
| 38 | 38 | |
| 39 | 39 | static const SM8500_CONFIG gamecom_cpu_config = { |
| r1443 | r1444 | |
| 110 | 110 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 111 | 111 | MDRV_SCREEN_SIZE( 200, 200 ) |
| 112 | 112 | MDRV_SCREEN_VISIBLE_AREA( 0, 199, 0, 159 ) |
| 113 | MDRV_GFXDECODE( gamecom | |
| 113 | MDRV_GFXDECODE( gamecom | |
| 114 | 114 | MDRV_PALETTE_LENGTH( GAMECOM_PALETTE_LENGTH ) |
| 115 | 115 | MDRV_COLORTABLE_LENGTH( GAMECOM_PALETTE_LENGTH ) |
| 116 | 116 | MDRV_PALETTE_INIT( gamecom ) |
| r1443 | r1444 | |
|---|---|---|
| 248 | 248 | 8 * 8 /* code takes 8 times 8 bits */ |
| 249 | 249 | }; |
| 250 | 250 | |
| 251 | static GFXDECODE_START( | |
| 251 | static GFXDECODE_START( mz700 | |
| 252 | 252 | GFXDECODE_ENTRY( REGION_GFX1, 0, char_layout, 0, 256 ) |
| 253 | 253 | GFXDECODE_END |
| 254 | 254 | |
| r1443 | r1444 | |
| 278 | 278 | MDRV_SCREEN_SIZE(40*8, 25*8) |
| 279 | 279 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8 - 1, 0*8, 25*8 - 1) |
| 280 | 280 | |
| 281 | MDRV_GFXDECODE( | |
| 281 | MDRV_GFXDECODE(mz700 | |
| 282 | 282 | MDRV_PALETTE_LENGTH(8) |
| 283 | 283 | MDRV_COLORTABLE_LENGTH(2*256) |
| 284 | 284 | |
| r1443 | r1444 | |
| 313 | 313 | MDRV_SCREEN_SIZE(40*8, 25*8) |
| 314 | 314 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8 - 1, 0*8, 25*8 - 1) |
| 315 | 315 | |
| 316 | MDRV_GFXDECODE( | |
| 316 | MDRV_GFXDECODE(mz700 | |
| 317 | 317 | MDRV_PALETTE_LENGTH(8) |
| 318 | 318 | MDRV_COLORTABLE_LENGTH(2*256) |
| 319 | 319 |
| r1443 | r1444 | |
|---|---|---|
| 313 | 313 | |
| 314 | 314 | static VIDEO_UPDATE( tm990_189 ) |
| 315 | 315 | { |
| 316 | update_common(bitmap, 580, 150, 110, 508, 387, 456, 507, 478, | |
| 316 | update_common(bitmap, 580, 150, 110, 508, 387, 456, 507, 478, machine->pens[1], machine->pens[0]); | |
| 317 | 317 | return 0; |
| 318 | 318 | } |
| 319 | 319 | |
| r1443 | r1444 | |
| 321 | 321 | { |
| 322 | 322 | video_update_tms9928a(machine, screen, bitmap, cliprect); |
| 323 | 323 | |
| 324 | plot_box(bitmap, LED_display_window_left, LED_display_window_top, LED_display_window_width, LED_display_window_height, | |
| 324 | plot_box(bitmap, LED_display_window_left, LED_display_window_top, LED_display_window_width, LED_display_window_height, machine->pens[1]); | |
| 325 | 325 | update_common(bitmap, |
| 326 | 326 | LED_display_window_left, LED_display_window_top, |
| 327 | 327 | LED_display_window_left, LED_display_window_top+16, |
| 328 | 328 | LED_display_window_left+80, LED_display_window_top+16, |
| 329 | 329 | LED_display_window_left+128, LED_display_window_top+16, |
| 330 | | |
| 330 | machine->pens[6], machine->pens[1]); | |
| 331 | 331 | return 0; |
| 332 | 332 | } |
| 333 | 333 | |
| r1443 | r1444 | |
| 793 | 793 | MDRV_SCREEN_SIZE(750, 532) |
| 794 | 794 | MDRV_SCREEN_VISIBLE_AREA(0, 750-1, 0, 532-1) |
| 795 | 795 | |
| 796 | /*MDRV_GFXDECODE(tm990_189 | |
| 796 | /*MDRV_GFXDECODE(tm990_189 | |
| 797 | 797 | MDRV_PALETTE_LENGTH(tm990_189_palette_size) |
| 798 | 798 | MDRV_COLORTABLE_LENGTH(/*tm990_189_colortable_size*/0) |
| 799 | 799 |
| r1443 | r1444 | |
|---|---|---|
| 306 | 306 | 1*8 |
| 307 | 307 | }; |
| 308 | 308 | |
| 309 | static GFXDECODE_START( arcadia | |
| 309 | static GFXDECODE_START( arcadia | |
| 310 | 310 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, arcadia_charlayout, 0, 128 ) |
| 311 | 311 | GFXDECODE_END |
| 312 | 312 | |
| r1443 | r1444 | |
| 348 | 348 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 349 | 349 | MDRV_SCREEN_SIZE(128+2*XPOS, 262) |
| 350 | 350 | MDRV_SCREEN_VISIBLE_AREA(0, 2*XPOS+128-1, 0, 262-1) |
| 351 | MDRV_GFXDECODE( arcadia | |
| 351 | MDRV_GFXDECODE( arcadia | |
| 352 | 352 | MDRV_PALETTE_LENGTH(ARRAY_LENGTH(arcadia_palette)) |
| 353 | 353 | MDRV_COLORTABLE_LENGTH(sizeof (arcadia_colortable) / sizeof(arcadia_colortable[0][0])) |
| 354 | 354 | MDRV_PALETTE_INIT( arcadia ) |
| r1443 | r1444 | |
|---|---|---|
| 66 | 66 | 8 * 8 |
| 67 | 67 | }; |
| 68 | 68 | |
| 69 | static GFXDECODE_START( aquarius | |
| 69 | static GFXDECODE_START( aquarius | |
| 70 | 70 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, aquarius_charlayout, 0, 256 ) |
| 71 | 71 | GFXDECODE_END |
| 72 | 72 | |
| r1443 | r1444 | |
| 229 | 229 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 230 | 230 | MDRV_SCREEN_SIZE(40 * 8, 24 * 8) |
| 231 | 231 | MDRV_SCREEN_VISIBLE_AREA(0, 40 * 8 - 1, 0, 24 * 8 - 1) |
| 232 | MDRV_GFXDECODE( aquarius | |
| 232 | MDRV_GFXDECODE( aquarius | |
| 233 | 233 | MDRV_PALETTE_LENGTH(ARRAY_LENGTH(aquarius_palette)) |
| 234 | 234 | MDRV_COLORTABLE_LENGTH(sizeof (aquarius_colortable)) |
| 235 | 235 | MDRV_PALETTE_INIT( aquarius ) |
| r1443 | r1444 | |
|---|---|---|
| 265 | 265 | 8*8 /* every char takes 8 bytes */ |
| 266 | 266 | }; |
| 267 | 267 | |
| 268 | static GFXDECODE_START( cgenie | |
| 268 | static GFXDECODE_START( cgenie | |
| 269 | 269 | GFXDECODE_ENTRY( REGION_GFX1, 0, cgenie_charlayout, 0, 3*16 ) |
| 270 | 270 | GFXDECODE_ENTRY( REGION_GFX2, 0, cgenie_gfxlayout, 3*16*2, 3*4 ) |
| 271 | 271 | GFXDECODE_END |
| r1443 | r1444 | |
| 387 | 387 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 388 | 388 | MDRV_SCREEN_SIZE(48*8, (32)*8) |
| 389 | 389 | MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1,0*8,32*8-1) |
| 390 | MDRV_GFXDECODE( cgenie | |
| 390 | MDRV_GFXDECODE( cgenie | |
| 391 | 391 | MDRV_PALETTE_LENGTH(sizeof(cgenie_palette) / sizeof(cgenie_palette[0]) / 3) |
| 392 | 392 | MDRV_COLORTABLE_LENGTH(sizeof(cgenie_colortable) / sizeof(cgenie_colortable[0])) |
| 393 | 393 | MDRV_PALETTE_INIT( cgenie ) |
| r1443 | r1444 | |
|---|---|---|
| 366 | 366 | |
| 367 | 367 | /* Graphics Decode Information */ |
| 368 | 368 | |
| 369 | static GFXDECODE_START( | |
| 369 | static GFXDECODE_START( | |
| 370 | 370 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout_abc80, 0, 2 ) // normal characters |
| 371 | 371 | GFXDECODE_ENTRY( REGION_GFX1, 0x500, charlayout_abc80, 0, 2 ) // graphics characters |
| 372 | 372 | GFXDECODE_END |
| r1443 | r1444 | |
| 463 | 463 | |
| 464 | 464 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 465 | 465 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 466 | MDRV_GFXDECODE( | |
| 466 | MDRV_GFXDECODE( | |
| 467 | 467 | MDRV_COLORTABLE_LENGTH(2*2) |
| 468 | 468 | MDRV_PALETTE_LENGTH(2) |
| 469 | 469 |
| r1443 | r1444 | |
|---|---|---|
| 490 | 490 | |
| 491 | 491 | static VIDEO_START( apexc ) |
| 492 | 492 | { |
| 493 | apexc_bitmap = auto_bitmap_alloc(Machine->screen[0].width, Machine->screen[0].height, BITMAP_FORMAT_INDEXED16); | |
| 494 | fillbitmap(apexc_bitmap, Machine->pens[0], &/*Machine->visible_area*/teletyper_window); | |
| 493 | apexc_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); | |
| 494 | fillbitmap(apexc_bitmap, machine->pens[0], &/*machine->visible_area*/teletyper_window); | |
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | /* draw a small 8*8 LED (well, there were no LEDs at the time, so let's call this a lamp ;-) ) */ |
| r1443 | r1444 | |
| 532 | 532 | |
| 533 | 533 | /*if (full_refresh)*/ |
| 534 | 534 | { |
| 535 | fillbitmap(bitmap, | |
| 535 | fillbitmap(bitmap, machine->pens[0], &/*machine->visible_area*/panel_window); | |
| 536 | 536 | apexc_draw_string(bitmap, "power", 8, 0, 0); |
| 537 | 537 | apexc_draw_string(bitmap, "running", 8, 8, 0); |
| 538 | 538 | apexc_draw_string(bitmap, "data :", 0, 24, 0); |
| r1443 | r1444 | |
| 774 | 774 | 8*8 /* every char takes 8 consecutive bytes */ |
| 775 | 775 | }; |
| 776 | 776 | |
| 777 | static GFXDECODE_START( | |
| 777 | static GFXDECODE_START( ap | |
| 778 | 778 | GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, 0, 1 ) |
| 779 | 779 | GFXDECODE_END |
| 780 | 780 | |
| r1443 | r1444 | |
| 818 | 818 | MDRV_SCREEN_SIZE(256, 192) |
| 819 | 819 | MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, 192-1) |
| 820 | 820 | |
| 821 | MDRV_GFXDECODE( | |
| 821 | MDRV_GFXDECODE(ap | |
| 822 | 822 | MDRV_PALETTE_LENGTH(APEXC_PALETTE_SIZE) |
| 823 | 823 | MDRV_COLORTABLE_LENGTH(APEXC_COLORTABLE_SIZE) |
| 824 | 824 |
| r1443 | r1444 | |
|---|---|---|
| 1990 | 1990 | |
| 1991 | 1991 | /* video hardware */ |
| 1992 | 1992 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 1993 | // MDRV_GFXDECODE(x68k | |
| 1993 | // MDRV_GFXDECODE(x68k | |
| 1994 | 1994 | MDRV_SCREEN_SIZE(1096, 568) // inital setting |
| 1995 | 1995 | MDRV_SCREEN_VISIBLE_AREA(0, 767, 0, 511) |
| 1996 | 1996 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| r1443 | r1444 | |
|---|---|---|
| 1778 | 1778 | 8 /* every char takes 1 consecutive byte */ |
| 1779 | 1779 | }; |
| 1780 | 1780 | |
| 1781 | static GFXDECODE_START( spectrum | |
| 1781 | static GFXDECODE_START( spectrum | |
| 1782 | 1782 | GFXDECODE_ENTRY( 0, 0x0, spectrum_charlayout, 0, 0x80 ) |
| 1783 | 1783 | GFXDECODE_ENTRY( 0, 0x0, spectrum_charlayout, 0, 0x80 ) |
| 1784 | 1784 | GFXDECODE_ENTRY( 0, 0x0, spectrum_charlayout, 0, 0x80 ) |
| r1443 | r1444 | |
| 1976 | 1976 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1977 | 1977 | MDRV_SCREEN_SIZE(SPEC_SCREEN_WIDTH, SPEC_SCREEN_HEIGHT) |
| 1978 | 1978 | MDRV_SCREEN_VISIBLE_AREA(0, SPEC_SCREEN_WIDTH-1, 0, SPEC_SCREEN_HEIGHT-1) |
| 1979 | MDRV_GFXDECODE( spectrum | |
| 1979 | MDRV_GFXDECODE( spectrum | |
| 1980 | 1980 | MDRV_PALETTE_LENGTH(16) |
| 1981 | 1981 | MDRV_COLORTABLE_LENGTH(256) |
| 1982 | 1982 | MDRV_PALETTE_INIT( spectrum ) |
| r1443 | r1444 | |
|---|---|---|
| 191 | 191 | FW * FH /* every char takes 16 bytes */ |
| 192 | 192 | }; |
| 193 | 193 | |
| 194 | static GFXDECODE_START( | |
| 194 | static GFXDECODE_START( kaypr | |
| 195 | 195 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 4 ) |
| 196 | 196 | GFXDECODE_END |
| 197 | 197 | |
| r1443 | r1444 | |
| 242 | 242 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 243 | 243 | MDRV_SCREEN_SIZE(80*KAYPRO_FONT_W, 25*KAYPRO_FONT_H) |
| 244 | 244 | MDRV_SCREEN_VISIBLE_AREA(0*KAYPRO_FONT_W, 80*KAYPRO_FONT_W-1, 0*KAYPRO_FONT_H, 25*KAYPRO_FONT_H-1) |
| 245 | MDRV_GFXDECODE( | |
| 245 | MDRV_GFXDECODE( kaypr | |
| 246 | 246 | MDRV_PALETTE_LENGTH(sizeof(kaypro_palette) / 3) |
| 247 | 247 | MDRV_COLORTABLE_LENGTH(sizeof(kaypro_colortable) / sizeof(kaypro_colortable[0])) |
| 248 | 248 | MDRV_PALETTE_INIT( kaypro ) |
| r1443 | r1444 | |
|---|---|---|
| 95 | 95 | } |
| 96 | 96 | else |
| 97 | 97 | col = 0; |
| 98 | drawgfx(bitmap, Machine->gfx[charset], chr, col, 0, 0, x*8, y*10, | |
| 99 | &Machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 98 | drawgfx(bitmap, machine->gfx[charset], chr, col, 0, 0, x*8, y*10, | |
| 99 | &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 100 | 100 | } |
| 101 | 101 | return 0; |
| 102 | 102 | } |
| r1443 | r1444 | |
| 277 | 277 | 8*16 /* every char takes 16 bytes */ |
| 278 | 278 | }; |
| 279 | 279 | |
| 280 | static gfx_decode super80 | |
| 280 | static gfx_decode super80 | |
| 281 | 281 | { |
| 282 | 282 | { REGION_GFX1, 0x0000, &super80_elg4_charlayout, 0, 2}, |
| 283 | 283 | { REGION_GFX1, 0x1000, &super80_dslc_charlayout, 0, 2}, |
| r1443 | r1444 | |
| 323 | 323 | |
| 324 | 324 | MDRV_MACHINE_RESET( super80 ) |
| 325 | 325 | |
| 326 | MDRV_GFXDECODE(super80 | |
| 326 | MDRV_GFXDECODE(super80 | |
| 327 | 327 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 328 | 328 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 329 | 329 | MDRV_SCREEN_SIZE(32*8, 16*10) |
| r1443 | r1444 | |
|---|---|---|
| 216 | 216 | 8*8 /* every char takes 8 consecutive bytes */ |
| 217 | 217 | }; |
| 218 | 218 | |
| 219 | static GFXDECODE_START( | |
| 219 | static GFXDECODE_START( t | |
| 220 | 220 | GFXDECODE_ENTRY( REGION_GFX1, 0, fontlayout, 0, 3 ) |
| 221 | 221 | GFXDECODE_END |
| 222 | 222 | |
| r1443 | r1444 | |
| 350 | 350 | MDRV_SCREEN_SIZE(virtual_width, virtual_height) |
| 351 | 351 | MDRV_SCREEN_VISIBLE_AREA(0, virtual_width-1, 0, virtual_height-1) |
| 352 | 352 | |
| 353 | MDRV_GFXDECODE( | |
| 353 | MDRV_GFXDECODE(t | |
| 354 | 354 | MDRV_PALETTE_LENGTH(pen_crt_num_levels + (sizeof(palette) / sizeof(palette[0]) / 3)) |
| 355 | 355 | MDRV_COLORTABLE_LENGTH(sizeof(tx0_colortable) / sizeof(tx0_colortable[0])) |
| 356 | 356 | |
| r1443 | r1444 | |
| 388 | 388 | MDRV_SCREEN_SIZE(virtual_width, virtual_height) |
| 389 | 389 | MDRV_SCREEN_VISIBLE_AREA(0, virtual_width-1, 0, virtual_height-1) |
| 390 | 390 | |
| 391 | MDRV_GFXDECODE( | |
| 391 | MDRV_GFXDECODE(t | |
| 392 | 392 | MDRV_PALETTE_LENGTH(pen_crt_num_levels + (sizeof(palette) / sizeof(palette[0]) / 3)) |
| 393 | 393 | MDRV_COLORTABLE_LENGTH(sizeof(tx0_colortable) / sizeof(tx0_colortable[0])) |
| 394 | 394 |
| r1443 | r1444 | |
|---|---|---|
| 967 | 967 | 8 |
| 968 | 968 | }; |
| 969 | 969 | |
| 970 | static GFXDECODE_START( c128 | |
| 970 | static GFXDECODE_START( c128 | |
| 971 | 971 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, c128_charlayout, 0, 0x100 ) |
| 972 | 972 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, c128graphic_charlayout, 0, 0x100 ) |
| 973 | 973 | GFXDECODE_END |
| r1443 | r1444 | |
| 1192 | 1192 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1193 | 1193 | MDRV_SCREEN_SIZE(656, 216) |
| 1194 | 1194 | MDRV_SCREEN_VISIBLE_AREA(0, 656 - 1, 0, 216 - 1) |
| 1195 | MDRV_GFXDECODE( c128 | |
| 1195 | MDRV_GFXDECODE( c128 | |
| 1196 | 1196 | MDRV_PALETTE_LENGTH((sizeof (vic2_palette) +sizeof(vdc8563_palette))/ sizeof (vic2_palette[0]) / 3 ) |
| 1197 | 1197 | MDRV_COLORTABLE_LENGTH( 0x100*2 ) |
| 1198 | 1198 | MDRV_PALETTE_INIT( c128 ) |
| r1443 | r1444 | |
|---|---|---|
| 81 | 81 | 8 * 2 /* code takes 8 times 8 bits */ |
| 82 | 82 | }; |
| 83 | 83 | |
| 84 | static GFXDECODE_START( | |
| 84 | static GFXDECODE_START( p | |
| 85 | 85 | GFXDECODE_ENTRY( REGION_GFX1, 0, char_layout_80_l, 0, 16 ) |
| 86 | 86 | GFXDECODE_ENTRY( REGION_GFX1, 0, char_layout_40L_l, 0, 16 ) |
| 87 | 87 | GFXDECODE_ENTRY( REGION_GFX1, 0, char_layout_40R_l, 0, 16 ) |
| r1443 | r1444 | |
| 529 | 529 | /*MDRV_ASPECT_RATIO(8,5)*/ |
| 530 | 530 | MDRV_SCREEN_SIZE(640, 220) |
| 531 | 531 | MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1) |
| 532 | MDRV_GFXDECODE( | |
| 532 | MDRV_GFXDECODE( p | |
| 533 | 533 | MDRV_PALETTE_LENGTH(18) |
| 534 | 534 | MDRV_COLORTABLE_LENGTH(32) |
| 535 | 535 | MDRV_PALETTE_INIT( pc8801 ) |
| r1443 | r1444 | |
|---|---|---|
| 80 | 80 | 8 * 10 |
| 81 | 81 | }; |
| 82 | 82 | |
| 83 | static GFXDECODE_START( p2000m | |
| 83 | static GFXDECODE_START( p2000m | |
| 84 | 84 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, p2000m_charlayout, 0, 128 ) |
| 85 | 85 | GFXDECODE_END |
| 86 | 86 | |
| r1443 | r1444 | |
| 237 | 237 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 238 | 238 | MDRV_SCREEN_SIZE(80 * 6, 24 * 10) |
| 239 | 239 | MDRV_SCREEN_VISIBLE_AREA(0, 80 * 6 - 1, 0, 24 * 10 - 1) |
| 240 | MDRV_GFXDECODE( p2000m | |
| 240 | MDRV_GFXDECODE( p2000m | |
| 241 | 241 | MDRV_PALETTE_LENGTH(2) |
| 242 | 242 | MDRV_COLORTABLE_LENGTH(4) |
| 243 | 243 | MDRV_PALETTE_INIT(p2000m) |
| r1443 | r1444 | |
|---|---|---|
| 513 | 513 | 8*16 |
| 514 | 514 | }; |
| 515 | 515 | |
| 516 | static GFXDECODE_START( pet | |
| 516 | static GFXDECODE_START( pet | |
| 517 | 517 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, pet_charlayout, 0, 1 ) |
| 518 | 518 | GFXDECODE_ENTRY( REGION_GFX1, 0x0800, pet_charlayout, 0, 1 ) |
| 519 | 519 | GFXDECODE_END |
| 520 | 520 | |
| 521 | static GFXDECODE_START( pet80 | |
| 521 | static GFXDECODE_START( pet80 | |
| 522 | 522 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, pet80_charlayout, 0, 1 ) |
| 523 | 523 | GFXDECODE_ENTRY( REGION_GFX1, 0x1000, pet80_charlayout, 0, 1 ) |
| 524 | 524 | GFXDECODE_END |
| 525 | 525 | |
| 526 | static GFXDECODE_START( superpet | |
| 526 | static GFXDECODE_START( superpet | |
| 527 | 527 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, pet80_charlayout, 0, 1 ) |
| 528 | 528 | GFXDECODE_ENTRY( REGION_GFX1, 0x1000, pet80_charlayout, 0, 1 ) |
| 529 | 529 | GFXDECODE_ENTRY( REGION_GFX1, 0x2000, pet80_charlayout, 0, 1 ) |
| r1443 | r1444 | |
| 805 | 805 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 806 | 806 | MDRV_SCREEN_SIZE(320, 200) |
| 807 | 807 | MDRV_SCREEN_VISIBLE_AREA(0, 320 - 1, 0, 200 - 1) |
| 808 | MDRV_GFXDECODE( pet | |
| 808 | MDRV_GFXDECODE( pet | |
| 809 | 809 | MDRV_PALETTE_LENGTH(sizeof (pet_palette) / sizeof (pet_palette[0]) / 3) |
| 810 | 810 | MDRV_COLORTABLE_LENGTH(sizeof (pet_colortable) / sizeof(pet_colortable[0][0])) |
| 811 | 811 | MDRV_PALETTE_INIT( pet ) |
| r1443 | r1444 | |
| 839 | 839 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 840 | 840 | MDRV_SCREEN_SIZE(640, 250) |
| 841 | 841 | MDRV_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 250 - 1) |
| 842 | MDRV_GFXDECODE( pet80 | |
| 842 | MDRV_GFXDECODE( pet80 | |
| 843 | 843 | MDRV_VIDEO_UPDATE( crtc6845 ) |
| 844 | 844 | MACHINE_DRIVER_END |
| 845 | 845 | |
| r1443 | r1444 | |
| 863 | 863 | MDRV_SCREEN_REFRESH_RATE(50) |
| 864 | 864 | |
| 865 | 865 | /* video hardware */ |
| 866 | MDRV_GFXDECODE( superpet | |
| 866 | MDRV_GFXDECODE( superpet | |
| 867 | 867 | MACHINE_DRIVER_END |
| 868 | 868 | |
| 869 | 869 | #define rom_cbm30 rom_pet2 |
| r1443 | r1444 | |
|---|---|---|
| 167 | 167 | |
| 168 | 168 | /* Graphics Decode Information */ |
| 169 | 169 | |
| 170 | static GFXDECODE_START( sb2m600 | |
| 170 | static GFXDECODE_START( sb2m600 | |
| 171 | 171 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, sb2m600_charlayout, 0, 1 ) |
| 172 | 172 | GFXDECODE_END |
| 173 | 173 | |
| 174 | static GFXDECODE_START( uk101 | |
| 174 | static GFXDECODE_START( uk101 | |
| 175 | 175 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, uk101_charlayout, 0, 1 ) |
| 176 | 176 | GFXDECODE_END |
| 177 | 177 | |
| r1443 | r1444 | |
| 190 | 190 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 191 | 191 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 192 | 192 | MDRV_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 32*8-1) |
| 193 | MDRV_GFXDECODE(sb2m600 | |
| 193 | MDRV_GFXDECODE(sb2m600 | |
| 194 | 194 | MDRV_PALETTE_LENGTH(2) |
| 195 | 195 | MDRV_COLORTABLE_LENGTH(2) |
| 196 | 196 | |
| r1443 | r1444 | |
| 218 | 218 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 219 | 219 | MDRV_SCREEN_SIZE(32*8, 32*16) |
| 220 | 220 | MDRV_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 32*16-1) |
| 221 | MDRV_GFXDECODE(uk101 | |
| 221 | MDRV_GFXDECODE(uk101 | |
| 222 | 222 | MDRV_PALETTE_LENGTH(2) |
| 223 | 223 | MDRV_COLORTABLE_LENGTH(2) |
| 224 | 224 |
| r1443 | r1444 | |
|---|---|---|
| 146 | 146 | 18 * 24 * 2, /* every icon takes 18 rows of 24 * 2 bits */ |
| 147 | 147 | }; |
| 148 | 148 | |
| 149 | static GFXDECODE_START( | |
| 149 | static GFXDECODE_START( m | |
| 150 | 150 | GFXDECODE_ENTRY( 1, 0, led_layout, 0, 16 ) |
| 151 | 151 | GFXDECODE_ENTRY( 2, 0, key_layout, 16*2, 2 ) |
| 152 | 152 | GFXDECODE_END |
| r1443 | r1444 | |
| 166 | 166 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 167 | 167 | MDRV_SCREEN_SIZE(600, 768) |
| 168 | 168 | MDRV_SCREEN_VISIBLE_AREA(0, 600-1, 0, 768-1) |
| 169 | MDRV_GFXDECODE( | |
| 169 | MDRV_GFXDECODE( m | |
| 170 | 170 | MDRV_PALETTE_LENGTH(21 + 32768) |
| 171 | 171 | MDRV_COLORTABLE_LENGTH(256) |
| 172 | 172 | MDRV_PALETTE_INIT( mekd2 ) |
| r1443 | r1444 | |
|---|---|---|
| 159 | 159 | static const struct CustomSound_interface snes_sound_interface = |
| 160 | 160 | { snes_sh_start, 0, 0 }; |
| 161 | 161 | |
| 162 | static GFXDECODE_START( | |
| 162 | static GFXDECODE_START( s | |
| 163 | 163 | GFXDECODE_END |
| 164 | 164 | |
| 165 | 165 | static PALETTE_INIT( snes ) |
| r1443 | r1444 | |
| 482 | 482 | |
| 483 | 483 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 484 | 484 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 485 | MDRV_GFXDECODE( | |
| 485 | MDRV_GFXDECODE(s | |
| 486 | 486 | MDRV_PALETTE_LENGTH(32768) |
| 487 | 487 | MDRV_COLORTABLE_LENGTH(257) |
| 488 | 488 | MDRV_PALETTE_INIT( snes ) |
| r1443 | r1444 | |
|---|---|---|
| 2230 | 2230 | |
| 2231 | 2231 | |
| 2232 | 2232 | |
| 2233 | static GFXDECODE_START( | |
| 2233 | static GFXDECODE_START( satur | |
| 2234 | 2234 | GFXDECODE_ENTRY( REGION_GFX1, 0, tiles8x8x4_layout, 0x00, (0x80*(2+1)) ) |
| 2235 | 2235 | GFXDECODE_ENTRY( REGION_GFX1, 0, tiles16x16x4_layout, 0x00, (0x80*(2+1)) ) |
| 2236 | 2236 | GFXDECODE_ENTRY( REGION_GFX1, 0, tiles8x8x8_layout, 0x00, (0x08*(2+1)) ) |
| r1443 | r1444 | |
| 2305 | 2305 | MDRV_SCREEN_SIZE(1024, 1024) |
| 2306 | 2306 | MDRV_SCREEN_VISIBLE_AREA(0*8, 703, 0*8, 512) // we need to use a resolution as high as the max size it can change to |
| 2307 | 2307 | MDRV_PALETTE_LENGTH(2048+(2048*2))//standard palette + extra memory for rgb brightness. |
| 2308 | MDRV_GFXDECODE( | |
| 2308 | MDRV_GFXDECODE(satur | |
| 2309 | 2309 | |
| 2310 | 2310 | MDRV_VIDEO_START(stv_vdp2) |
| 2311 | 2311 | MDRV_VIDEO_UPDATE(stv_vdp2) |
| r1443 | r1444 | |
|---|---|---|
| 216 | 216 | MDRV_SCREEN_SIZE(560, 280) |
| 217 | 217 | MDRV_SCREEN_VISIBLE_AREA(0, 560-1, 0, /*250*/280-1) |
| 218 | 218 | |
| 219 | MDRV_GFXDECODE(vdt911 | |
| 219 | MDRV_GFXDECODE(vdt911 | |
| 220 | 220 | MDRV_PALETTE_LENGTH(vdt911_palette_size) |
| 221 | 221 | MDRV_COLORTABLE_LENGTH(vdt911_colortable_size) |
| 222 | 222 |
| r1443 | r1444 | |
|---|---|---|
| 125 | 125 | 8 * 8 /* 8 8-bit pixel rows per character */ |
| 126 | 126 | }; |
| 127 | 127 | |
| 128 | static GFXDECODE_START( apple1 | |
| 128 | static GFXDECODE_START( apple1 | |
| 129 | 129 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, apple1_charlayout, 0, 1 ) |
| 130 | 130 | GFXDECODE_END |
| 131 | 131 | |
| r1443 | r1444 | |
| 253 | 253 | overscan here. */ |
| 254 | 254 | MDRV_SCREEN_SIZE(40 * 7, 24 * 8) |
| 255 | 255 | MDRV_SCREEN_VISIBLE_AREA(0, 40 * 7 - 1, 0, 24 * 8 - 1) |
| 256 | MDRV_GFXDECODE(apple1 | |
| 256 | MDRV_GFXDECODE(apple1 | |
| 257 | 257 | MDRV_PALETTE_LENGTH(ARRAY_LENGTH(apple1_palette)) |
| 258 | 258 | MDRV_COLORTABLE_LENGTH(sizeof(apple1_colortable)/sizeof(unsigned short)) |
| 259 | 259 | MDRV_PALETTE_INIT(apple1) |
| r1443 | r1444 | |
|---|---|---|
| 535 | 535 | |
| 536 | 536 | /* Graphics Decode Info */ |
| 537 | 537 | |
| 538 | static GFXDECODE_START( | |
| 538 | static GFXDECODE_START( | |
| 539 | 539 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout_abc800m, 0, 2 ) |
| 540 | 540 | GFXDECODE_END |
| 541 | 541 | |
| 542 | static GFXDECODE_START( | |
| 542 | static GFXDECODE_START( | |
| 543 | 543 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout_abc802_40, 0, 8 ) |
| 544 | 544 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout_abc802_80, 0, 8 ) |
| 545 | 545 | GFXDECODE_END |
| r1443 | r1444 | |
| 716 | 716 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 717 | 717 | MDRV_SCREEN_SIZE(80*6, 24*10) |
| 718 | 718 | MDRV_SCREEN_VISIBLE_AREA(0, 80*6-1, 0, 24*10-1) |
| 719 | MDRV_GFXDECODE( | |
| 719 | MDRV_GFXDECODE( | |
| 720 | 720 | MDRV_PALETTE_LENGTH(2) |
| 721 | 721 | |
| 722 | 722 | MDRV_PALETTE_INIT(abc800m) |
| r1443 | r1444 | |
| 745 | 745 | MDRV_MACHINE_START(abc802) |
| 746 | 746 | MDRV_MACHINE_RESET(abc802) |
| 747 | 747 | |
| 748 | MDRV_GFXDECODE( | |
| 748 | MDRV_GFXDECODE( | |
| 749 | 749 | MDRV_PALETTE_INIT(abc800m) |
| 750 | 750 | MDRV_VIDEO_START(abc802) |
| 751 | 751 | MDRV_VIDEO_UPDATE(abc802) |
| r1443 | r1444 | |
|---|---|---|
| 89 | 89 | 8 * 16 |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | static GFXDECODE_START( nascom1 | |
| 92 | static GFXDECODE_START( nascom1 | |
| 93 | 93 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, nascom1_charlayout, 0, 1 ) |
| 94 | 94 | GFXDECODE_END |
| 95 | 95 | |
| r1443 | r1444 | |
| 105 | 105 | 8 * 16 |
| 106 | 106 | }; |
| 107 | 107 | |
| 108 | static GFXDECODE_START( nascom2 | |
| 108 | static GFXDECODE_START( nascom2 | |
| 109 | 109 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, nascom2_charlayout, 0, 1 ) |
| 110 | 110 | GFXDECODE_END |
| 111 | 111 | |
| r1443 | r1444 | |
| 236 | 236 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 237 | 237 | MDRV_SCREEN_SIZE(48 * 8, 16 * 16) |
| 238 | 238 | MDRV_SCREEN_VISIBLE_AREA(0, 48 * 8 - 1, 0, 16 * 16 - 1) |
| 239 | MDRV_GFXDECODE( nascom1 | |
| 239 | MDRV_GFXDECODE( nascom1 | |
| 240 | 240 | MDRV_PALETTE_LENGTH( sizeof (nascom1_palette) / 3 ) |
| 241 | 241 | MDRV_COLORTABLE_LENGTH( sizeof (nascom1_colortable) ) |
| 242 | 242 | MDRV_PALETTE_INIT( nascom1 ) |
| r1443 | r1444 | |
| 251 | 251 | MDRV_CPU_REPLACE( "main", Z80, 2000000 ) |
| 252 | 252 | MDRV_SCREEN_SIZE(48 * 8, 16 * 14) |
| 253 | 253 | MDRV_SCREEN_VISIBLE_AREA(0, 48 * 8 - 1, 0, 16 * 14 - 1) |
| 254 | MDRV_GFXDECODE( nascom2 | |
| 254 | MDRV_GFXDECODE( nascom2 | |
| 255 | 255 | MDRV_VIDEO_UPDATE( nascom2 ) |
| 256 | 256 | MACHINE_DRIVER_END |
| 257 | 257 |
| r1443 | r1444 | |
|---|---|---|
| 186 | 186 | 8 * 16 /* code takes 8 times 16 bits */ |
| 187 | 187 | }; |
| 188 | 188 | |
| 189 | static GFXDECODE_START( | |
| 189 | static GFXDECODE_START( mi | |
| 190 | 190 | GFXDECODE_ENTRY( REGION_GFX1, 0, char_layout, 0, 1 ) |
| 191 | 191 | GFXDECODE_ENTRY( REGION_GFX2, 0, chunky_layout, 0, 1 ) |
| 192 | 192 | GFXDECODE_END |
| r1443 | r1444 | |
| 214 | 214 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 215 | 215 | MDRV_SCREEN_SIZE(32*8, 16*16) |
| 216 | 216 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*16, 16*16-1) |
| 217 | MDRV_GFXDECODE( | |
| 217 | MDRV_GFXDECODE(mi | |
| 218 | 218 | MDRV_PALETTE_LENGTH(2) |
| 219 | 219 | MDRV_COLORTABLE_LENGTH(2) |
| 220 | 220 |
| r1443 | r1444 | |
|---|---|---|
| 170 | 170 | dirtybuffer[i] = 0; |
| 171 | 171 | |
| 172 | 172 | /* Is the char code masked or not ??? */ |
| 173 | drawgfx(tmpbitmap, Machine->gfx[0], videoram[i] & 0x7F, 0, | |
| 174 | 0, 0, sx, sy, &Machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 173 | drawgfx(tmpbitmap, machine->gfx[0], videoram[i] & 0x7F, 0, | |
| 174 | 0, 0, sx, sy, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | sx += 8; |
| r1443 | r1444 | |
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | copybitmap(bitmap, tmpbitmap, 0, 0, 0, 0, & | |
| 185 | copybitmap(bitmap, tmpbitmap, 0, 0, 0, 0, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); | |
| 186 | 186 | return 0; |
| 187 | 187 | } |
| 188 | 188 | |
| r1443 | r1444 | |
| 199 | 199 | 8*8 /* every char takes 8 bytes */ |
| 200 | 200 | }; |
| 201 | 201 | |
| 202 | static GFXDECODE_START( | |
| 202 | static GFXDECODE_START( t | |
| 203 | 203 | GFXDECODE_ENTRY( REGION_CPU1, 0x1c00, ti99_2_charlayout, 0, 0 ) |
| 204 | 204 | GFXDECODE_END |
| 205 | 205 | |
| r1443 | r1444 | |
| 408 | 408 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 409 | 409 | MDRV_SCREEN_SIZE(256, 192) |
| 410 | 410 | MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, 192-1) |
| 411 | MDRV_GFXDECODE( | |
| 411 | MDRV_GFXDECODE(t | |
| 412 | 412 | MDRV_PALETTE_LENGTH(TI99_2_PALETTE_SIZE) |
| 413 | 413 | MDRV_COLORTABLE_LENGTH(TI99_2_COLORTABLE_SIZE) |
| 414 | 414 | MDRV_PALETTE_INIT(ti99_2) |
| r1443 | r1444 | |
|---|---|---|
| 127 | 127 | 8 * 8 |
| 128 | 128 | }; |
| 129 | 129 | |
| 130 | static GFXDECODE_START( intv | |
| 130 | static GFXDECODE_START( intv | |
| 131 | 131 | GFXDECODE_ENTRY( REGION_CPU1, 0x3000<<1, intv_gromlayout, 0, 256 ) |
| 132 | 132 | GFXDECODE_ENTRY( 0, 0, intv_gramlayout, 0, 256 ) /* Dynamically decoded from RAM */ |
| 133 | 133 | GFXDECODE_END |
| 134 | 134 | |
| 135 | static GFXDECODE_START( intvkbd | |
| 135 | static GFXDECODE_START( intvkbd | |
| 136 | 136 | GFXDECODE_ENTRY( REGION_CPU1, 0x3000<<1, intv_gromlayout, 0, 256 ) |
| 137 | 137 | GFXDECODE_ENTRY( 0, 0, intv_gramlayout, 0, 256 ) /* Dynamically decoded from RAM */ |
| 138 | 138 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, intvkbd_charlayout, 0, 256 ) |
| r1443 | r1444 | |
| 358 | 358 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 359 | 359 | MDRV_SCREEN_SIZE(40*8, 24*8) |
| 360 | 360 | MDRV_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 24*8-1) |
| 361 | MDRV_GFXDECODE( intv | |
| 361 | MDRV_GFXDECODE( intv | |
| 362 | 362 | MDRV_PALETTE_LENGTH(32) |
| 363 | 363 | MDRV_COLORTABLE_LENGTH(2 * 2 * 16 * 16) |
| 364 | 364 | MDRV_PALETTE_INIT( intv ) |
| r1443 | r1444 | |
| 386 | 386 | MDRV_INTERLEAVE(100) |
| 387 | 387 | |
| 388 | 388 | /* video hardware */ |
| 389 | MDRV_GFXDECODE( intvkbd | |
| 389 | MDRV_GFXDECODE( intvkbd | |
| 390 | 390 | MDRV_VIDEO_START( intvkbd ) |
| 391 | 391 | MDRV_VIDEO_UPDATE( intvkbd ) |
| 392 | 392 | MACHINE_DRIVER_END |
| r1443 | r1444 | |
|---|---|---|
| 77 | 77 | 8*8 /* each character takes 8 consecutive bytes */ |
| 78 | 78 | }; |
| 79 | 79 | |
| 80 | static GFXDECODE_START( jupiter | |
| 80 | static GFXDECODE_START( jupiter | |
| 81 | 81 | GFXDECODE_ENTRY( REGION_CPU1, 0x2c00, jupiter_charlayout, 0, 2 ) |
| 82 | 82 | GFXDECODE_END |
| 83 | 83 | |
| r1443 | r1444 | |
| 189 | 189 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 190 | 190 | MDRV_SCREEN_SIZE(32 * 8, 24 * 8) |
| 191 | 191 | MDRV_SCREEN_VISIBLE_AREA(0, 32 * 8 - 1, 0, 24 * 8 - 1) |
| 192 | MDRV_GFXDECODE( jupiter | |
| 192 | MDRV_GFXDECODE( jupiter | |
| 193 | 193 | MDRV_PALETTE_LENGTH(sizeof(jupiter_palette) / 3) |
| 194 | 194 | MDRV_COLORTABLE_LENGTH(sizeof (jupiter_colortable)) |
| 195 | 195 | MDRV_PALETTE_INIT( jupiter ) |
| r1443 | r1444 | |
|---|---|---|
| 2410 | 2410 | 16*16*8 |
| 2411 | 2411 | }; |
| 2412 | 2412 | |
| 2413 | static GFXDECODE_START( asic_sprite | |
| 2413 | static GFXDECODE_START( asic_sprite | |
| 2414 | 2414 | GFXDECODE_ENTRY( REGION_USER1, 0, asic_sprite_layout, 32, 1 ) |
| 2415 | 2415 | GFXDECODE_END |
| 2416 | 2416 | |
| r1443 | r1444 | |
| 2482 | 2482 | static MACHINE_DRIVER_START( cpcplus ) |
| 2483 | 2483 | MDRV_IMPORT_FROM( amstrad ) |
| 2484 | 2484 | MDRV_SCREEN_REFRESH_RATE( AMSTRAD_FPS ) |
| 2485 | MDRV_GFXDECODE( asic_sprite | |
| 2485 | MDRV_GFXDECODE( asic_sprite | |
| 2486 | 2486 | MDRV_MACHINE_START( plus ) |
| 2487 | 2487 | MDRV_MACHINE_RESET( plus ) |
| 2488 | 2488 | MDRV_SCREEN_SIZE(800, 312) |
| r1443 | r1444 | |
|---|---|---|
| 303 | 303 | 8*FH /* every char takes FH bytes */ |
| 304 | 304 | }; |
| 305 | 305 | |
| 306 | static GFXDECODE_START( trs80 | |
| 306 | static GFXDECODE_START( trs80 | |
| 307 | 307 | GFXDECODE_ENTRY( REGION_GFX1, 0, trs80_charlayout_normal_width, 0, 4 ) |
| 308 | 308 | GFXDECODE_ENTRY( REGION_GFX1, 0, trs80_charlayout_double_width, 0, 4 ) |
| 309 | 309 | GFXDECODE_END |
| r1443 | r1444 | |
| 355 | 355 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 356 | 356 | MDRV_SCREEN_SIZE(64*FW, 16*FH) |
| 357 | 357 | MDRV_SCREEN_VISIBLE_AREA(0*FW,64*FW-1,0*FH,16*FH-1) |
| 358 | MDRV_GFXDECODE( trs80 | |
| 358 | MDRV_GFXDECODE( trs80 | |
| 359 | 359 | MDRV_PALETTE_LENGTH(sizeof(trs80_palette)/sizeof(trs80_palette[0])/3) |
| 360 | 360 | MDRV_COLORTABLE_LENGTH(sizeof(trs80_colortable)/sizeof(trs80_colortable[0])) |
| 361 | 361 | MDRV_PALETTE_INIT( trs80 ) |
| r1443 | r1444 | |
|---|---|---|
| 136 | 136 | 1*8 |
| 137 | 137 | }; |
| 138 | 138 | |
| 139 | static GFXDECODE_START( odyssey2 | |
| 139 | static GFXDECODE_START( odyssey2 | |
| 140 | 140 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, odyssey2_graphicslayout, 0, 2 ) |
| 141 | 141 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, odyssey2_spritelayout, 0, 2 ) |
| 142 | 142 | GFXDECODE_END |
| r1443 | r1444 | |
| 159 | 159 | |
| 160 | 160 | MDRV_SCREEN_SIZE(320,300) |
| 161 | 161 | MDRV_SCREEN_VISIBLE_AREA(0,160-1,0,240-1) |
| 162 | MDRV_GFXDECODE( odyssey2 | |
| 162 | MDRV_GFXDECODE( odyssey2 | |
| 163 | 163 | MDRV_PALETTE_LENGTH(24) |
| 164 | 164 | MDRV_COLORTABLE_LENGTH(2) |
| 165 | 165 | MDRV_PALETTE_INIT( odyssey2 ) |
| r1443 | r1444 | |
|---|---|---|
| 550 | 550 | 8*8 /* every char takes 8 bytes */ |
| 551 | 551 | }; |
| 552 | 552 | |
| 553 | static GFXDECODE_START( apple2 | |
| 553 | static GFXDECODE_START( apple2 | |
| 554 | 554 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, apple2_text_layout, 0, 2 ) |
| 555 | 555 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, apple2_dbltext_layout, 0, 2 ) |
| 556 | 556 | GFXDECODE_END |
| r1443 | r1444 | |
| 577 | 577 | 8*8 /* every char takes 8 bytes */ |
| 578 | 578 | }; |
| 579 | 579 | |
| 580 | static GFXDECODE_START( apple2e | |
| 580 | static GFXDECODE_START( apple2e | |
| 581 | 581 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, apple2e_text_layout, 0, 2 ) |
| 582 | 582 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, apple2e_dbltext_layout, 0, 2 ) |
| 583 | 583 | GFXDECODE_END |
| r1443 | r1444 | |
| 667 | 667 | |
| 668 | 668 | static MACHINE_DRIVER_START( apple2 ) |
| 669 | 669 | MDRV_IMPORT_FROM( apple2_common ) |
| 670 | MDRV_GFXDECODE(apple2 | |
| 670 | MDRV_GFXDECODE(apple2 | |
| 671 | 671 | MACHINE_DRIVER_END |
| 672 | 672 | |
| 673 | 673 | static MACHINE_DRIVER_START( apple2p ) |
| 674 | 674 | MDRV_IMPORT_FROM( apple2_common ) |
| 675 | 675 | MDRV_VIDEO_START(apple2p) |
| 676 | MDRV_GFXDECODE(apple2 | |
| 676 | MDRV_GFXDECODE(apple2 | |
| 677 | 677 | MACHINE_DRIVER_END |
| 678 | 678 | |
| 679 | 679 | #ifdef UNUSED_FUNCTION |
| 680 | 680 | static MACHINE_DRIVER_START( ace100 ) |
| 681 | 681 | MDRV_IMPORT_FROM( apple2_common ) |
| 682 | 682 | MDRV_VIDEO_START(apple2p) |
| 683 | MDRV_GFXDECODE(apple2 | |
| 683 | MDRV_GFXDECODE(apple2 | |
| 684 | 684 | MACHINE_DRIVER_END |
| 685 | 685 | #endif |
| 686 | 686 | |
| r1443 | r1444 | |
| 696 | 696 | MACHINE_DRIVER_START( apple2e ) |
| 697 | 697 | MDRV_IMPORT_FROM( apple2_common ) |
| 698 | 698 | MDRV_VIDEO_START(apple2e) |
| 699 | MDRV_GFXDECODE(apple2e | |
| 699 | MDRV_GFXDECODE(apple2e | |
| 700 | 700 | MACHINE_DRIVER_END |
| 701 | 701 | |
| 702 | 702 | static MACHINE_DRIVER_START( apple2ee ) |
| r1443 | r1444 | |
|---|---|---|
| 381 | 381 | } |
| 382 | 382 | else |
| 383 | 383 | { |
| 384 | plot_box(bitmap, 3, 0, 162, 159, | |
| 384 | plot_box(bitmap, 3, 0, 162, 159, machine->pens[PALETTE_START]); | |
| 385 | 385 | } |
| 386 | 386 | return 0; |
| 387 | 387 | } |
| r1443 | r1444 | |
| 412 | 412 | } |
| 413 | 413 | else |
| 414 | 414 | { |
| 415 | plot_box(bitmap, 3, 0, 162, 159, | |
| 415 | plot_box(bitmap, 3, 0, 162, 159, machine->pens[PALETTE_START]); | |
| 416 | 416 | } |
| 417 | 417 | return 0; |
| 418 | 418 | } |
| r1443 | r1444 | |
| 444 | 444 | svision.timer1 = timer_alloc(svision_timer, NULL); |
| 445 | 445 | svision_pet.on = TRUE; |
| 446 | 446 | svision_pet.timer = timer_alloc(svision_pet_timer, NULL); |
| 447 | timer_pulse(attotime_mul(ATTOTIME_IN_SEC(8), 256/ | |
| 447 | timer_pulse(attotime_mul(ATTOTIME_IN_SEC(8), 256/machine->drv->cpu[0].clock), NULL, 0, svision_pet_timer); | |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | static MACHINE_RESET( svision ) |
| r1443 | r1444 | |
|---|---|---|
| 216 | 216 | INPUT_PORTS_END |
| 217 | 217 | |
| 218 | 218 | |
| 219 | static GFXDECODE_START( | |
| 219 | static GFXDECODE_START( t | |
| 220 | 220 | GFXDECODE_END |
| 221 | 221 | |
| 222 | 222 | static const struct TMS5220interface tms5220interface = |
| r1443 | r1444 | |
|---|---|---|
| 1165 | 1165 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1166 | 1166 | MDRV_SCREEN_SIZE(80*9, 25*14) |
| 1167 | 1167 | MDRV_SCREEN_VISIBLE_AREA(0,80*9-1, 0,25*14-1) |
| 1168 | MDRV_GFXDECODE(pc_mda | |
| 1168 | MDRV_GFXDECODE(pc_mda | |
| 1169 | 1169 | MDRV_PALETTE_LENGTH(sizeof(cga_palette) / sizeof(cga_palette[0])) |
| 1170 | 1170 | MDRV_COLORTABLE_LENGTH(sizeof(mda_colortable) / sizeof(mda_colortable[0])) |
| 1171 | 1171 | MDRV_PALETTE_INIT(pc_mda) |
| r1443 | r1444 | |
| 1235 | 1235 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1236 | 1236 | MDRV_SCREEN_SIZE(80*9, 25*14) |
| 1237 | 1237 | MDRV_SCREEN_VISIBLE_AREA(0,80*9-1, 0,25*14-1) |
| 1238 | MDRV_GFXDECODE(europc | |
| 1238 | MDRV_GFXDECODE(europc | |
| 1239 | 1239 | MDRV_PALETTE_LENGTH(sizeof(cga_palette) / sizeof(cga_palette[0])) |
| 1240 | 1240 | MDRV_COLORTABLE_LENGTH((sizeof(cga_colortable)+sizeof(mda_colortable) )/sizeof(cga_colortable[0])) |
| 1241 | 1241 | MDRV_PALETTE_INIT(pc_aga) |
| r1443 | r1444 | |
| 1301 | 1301 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1302 | 1302 | MDRV_SCREEN_SIZE(80*8, 25*14) |
| 1303 | 1303 | MDRV_SCREEN_VISIBLE_AREA(0,80*8-1, 0,25*14-1) |
| 1304 | MDRV_GFXDECODE(aga | |
| 1304 | MDRV_GFXDECODE(aga | |
| 1305 | 1305 | MDRV_PALETTE_LENGTH(sizeof(cga_palette) / sizeof(cga_palette[0])) |
| 1306 | 1306 | MDRV_COLORTABLE_LENGTH((sizeof(cga_colortable)+sizeof(mda_colortable) )/sizeof(cga_colortable[0])) |
| 1307 | 1307 | MDRV_PALETTE_INIT(pc_aga) |
| r1443 | r1444 | |
|---|---|---|
| 155 | 155 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 156 | 156 | MDRV_SCREEN_ADD("main",0) |
| 157 | 157 | MDRV_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, VDC_WPF, 70, 70 + 512 + 32, VDC_LPF, 14, 14+242) |
| 158 | /* MDRV_GFXDECODE( pce | |
| 158 | /* MDRV_GFXDECODE( pce | |
| 159 | 159 | MDRV_PALETTE_LENGTH(1024) |
| 160 | 160 | MDRV_PALETTE_INIT( vce ) |
| 161 | 161 | MDRV_COLORTABLE_LENGTH(1024) |
| r1443 | r1444 | |
|---|---|---|
| 132 | 132 | 1*8 |
| 133 | 133 | }; |
| 134 | 134 | |
| 135 | static GFXDECODE_START( vc4000 | |
| 135 | static GFXDECODE_START( vc4000 | |
| 136 | 136 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, vc4000_charlayout, 0, 2 ) |
| 137 | 137 | GFXDECODE_END |
| 138 | 138 | |
| r1443 | r1444 | |
| 192 | 192 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 193 | 193 | MDRV_SCREEN_SIZE(226, 312) |
| 194 | 194 | MDRV_SCREEN_VISIBLE_AREA(10, 182, 0, 269) |
| 195 | MDRV_GFXDECODE( vc4000 | |
| 195 | MDRV_GFXDECODE( vc4000 | |
| 196 | 196 | MDRV_PALETTE_LENGTH(sizeof(vc4000_palette) / 3) |
| 197 | 197 | MDRV_COLORTABLE_LENGTH(sizeof (vc4000_colortable) / sizeof(vc4000_colortable[0][0])) |
| 198 | 198 | MDRV_PALETTE_INIT( vc4000 ) |
| r1443 | r1444 | |
|---|---|---|
| 44 | 44 | ADDRESS_MAP_END |
| 45 | 45 | |
| 46 | 46 | |
| 47 | static GFXDECODE_START( galaxy | |
| 47 | static GFXDECODE_START( galaxy | |
| 48 | 48 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, galaxy_charlayout, 0, 2 ) |
| 49 | 49 | GFXDECODE_END |
| 50 | 50 | |
| r1443 | r1444 | |
| 136 | 136 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 137 | 137 | MDRV_SCREEN_SIZE(256, 218) |
| 138 | 138 | MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, 218-1) |
| 139 | MDRV_GFXDECODE( galaxy | |
| 139 | MDRV_GFXDECODE( galaxy | |
| 140 | 140 | MDRV_PALETTE_LENGTH(sizeof (galaxy_palette) / 3) |
| 141 | 141 | MDRV_COLORTABLE_LENGTH(sizeof (galaxy_colortable)) |
| 142 | 142 | MDRV_PALETTE_INIT( galaxy ) |
| r1443 | r1444 | |
|---|---|---|
| 408 | 408 | 2*4 /* one byte per code */ |
| 409 | 409 | }; |
| 410 | 410 | |
| 411 | static GFXDECODE_START( | |
| 411 | static GFXDECODE_START( vt | |
| 412 | 412 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout_80, 0, 256 ) |
| 413 | 413 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout_40, 0, 256 ) |
| 414 | 414 | GFXDECODE_ENTRY( REGION_GFX2, 0, gfxlayout_1bpp, 0, 256 ) |
| r1443 | r1444 | |
| 478 | 478 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 479 | 479 | MDRV_SCREEN_SIZE(88*8, 24*8+32) |
| 480 | 480 | MDRV_SCREEN_VISIBLE_AREA(0*8, 88*8-1, 0*8, 24*8+32-1) |
| 481 | MDRV_GFXDECODE( | |
| 481 | MDRV_GFXDECODE( vt | |
| 482 | 482 | MDRV_PALETTE_LENGTH(ARRAY_LENGTH(vt_palette)) |
| 483 | 483 | MDRV_COLORTABLE_LENGTH(256*2+16) |
| 484 | 484 | MDRV_PALETTE_INIT(vtech2) |
| r1443 | r1444 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | - Fixed M65C02 optimization. [Peter Trauner] |
| 73 | 73 | |
| 74 | - Staticization, constification and header file cleanups. [Atari Ace] | |
| 74 | - Staticization, constification, header file, "Machine variable" and gfxdecode | |
| 75 | cleanups. [Atari Ace] | |
| 75 | 76 | |
| 76 | 77 | |
| 77 | 78 |
| Previous | 15994 Revisions | Next |