src/mess/machine/mz700.c
| r9140 | r9141 | |
| 86 | 86 | mz->mz700 = TRUE; |
| 87 | 87 | mz->mz700_mode = TRUE; |
| 88 | 88 | |
| 89 | | machine->generic.videoram_size = 0x800; |
| 90 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, machine->generic.videoram_size); |
| 89 | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x800); |
| 91 | 90 | mz->colorram = auto_alloc_array(machine, UINT8, 0x800); |
| 92 | 91 | } |
| 93 | 92 | |
| r9140 | r9141 | |
| 98 | 97 | mz->mz700_mode = FALSE; |
| 99 | 98 | |
| 100 | 99 | /* video ram */ |
| 101 | | machine->generic.videoram_size = 0x4000; |
| 102 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, machine->generic.videoram_size); |
| 100 | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x4000); |
| 103 | 101 | mz->colorram = machine->generic.videoram.u8 + 0x800; |
| 104 | 102 | |
| 105 | 103 | /* character generator ram */ |
| r9140 | r9141 | |
| 149 | 147 | |
| 150 | 148 | READ8_HANDLER( mz800_bank_0_r ) |
| 151 | 149 | { |
| 150 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 152 | 151 | address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 153 | 152 | mz_state *mz = space->machine->driver_data<mz_state>(); |
| 154 | 153 | |
| r9140 | r9141 | |
| 170 | 169 | { |
| 171 | 170 | /* vram from 0x8000 to 0xbfff */ |
| 172 | 171 | memory_install_readwrite_bank(spc, 0x8000, 0xbfff, 0, 0, "bank4"); |
| 173 | | memory_set_bankptr(space->machine, "bank4", space->machine->generic.videoram.u8); |
| 172 | memory_set_bankptr(space->machine, "bank4", videoram); |
| 174 | 173 | } |
| 175 | 174 | else |
| 176 | 175 | { |
| 177 | 176 | /* vram from 0x8000 to 0x9fff */ |
| 178 | 177 | memory_install_readwrite_bank(spc, 0x8000, 0x9fff, 0, 0, "bank4"); |
| 179 | | memory_set_bankptr(space->machine, "bank4", space->machine->generic.videoram.u8); |
| 178 | memory_set_bankptr(space->machine, "bank4", videoram); |
| 180 | 179 | |
| 181 | 180 | /* ram from 0xa000 to 0xbfff */ |
| 182 | 181 | memory_install_readwrite_bank(spc, 0xa000, 0xbfff, 0, 0, "bank5"); |
| r9140 | r9141 | |
| 266 | 265 | |
| 267 | 266 | WRITE8_HANDLER( mz700_bank_3_w ) |
| 268 | 267 | { |
| 268 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 269 | 269 | address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 270 | 270 | mz_state *mz = space->machine->driver_data<mz_state>(); |
| 271 | 271 | |
| r9140 | r9141 | |
| 275 | 275 | { |
| 276 | 276 | /* switch in videoram */ |
| 277 | 277 | memory_install_readwrite_bank(spc, 0xd000, 0xd7ff, 0, 0, "bank7"); |
| 278 | | memory_set_bankptr(space->machine, "bank7", space->machine->generic.videoram.u8); |
| 278 | memory_set_bankptr(space->machine, "bank7", videoram); |
| 279 | 279 | |
| 280 | 280 | /* switch in colorram */ |
| 281 | 281 | memory_install_readwrite_bank(spc, 0xd800, 0xdfff, 0, 0, "bank9"); |
| r9140 | r9141 | |
| 313 | 313 | |
| 314 | 314 | WRITE8_HANDLER( mz700_bank_4_w ) |
| 315 | 315 | { |
| 316 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 316 | 317 | address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 317 | 318 | mz_state *mz = space->machine->driver_data<mz_state>(); |
| 318 | 319 | |
| r9140 | r9141 | |
| 341 | 342 | { |
| 342 | 343 | /* vram from 0x8000 to 0xbfff */ |
| 343 | 344 | memory_install_readwrite_bank(spc, 0x8000, 0xbfff, 0, 0, "bank4"); |
| 344 | | memory_set_bankptr(space->machine, "bank4", space->machine->generic.videoram.u8); |
| 345 | memory_set_bankptr(space->machine, "bank4", videoram); |
| 345 | 346 | } |
| 346 | 347 | else |
| 347 | 348 | { |
| 348 | 349 | /* vram from 0x8000 to 0x9fff */ |
| 349 | 350 | memory_install_readwrite_bank(spc, 0x8000, 0x9fff, 0, 0, "bank4"); |
| 350 | | memory_set_bankptr(space->machine, "bank4", space->machine->generic.videoram.u8); |
| 351 | memory_set_bankptr(space->machine, "bank4", videoram); |
| 351 | 352 | |
| 352 | 353 | /* ram from 0xa000 to 0xbfff */ |
| 353 | 354 | memory_install_readwrite_bank(spc, 0xa000, 0xbfff, 0, 0, "bank5"); |
src/mess/video/dgn_beta.c
| r9140 | r9141 | |
| 308 | 308 | /* Video init */ |
| 309 | 309 | void dgnbeta_init_video(running_machine *machine) |
| 310 | 310 | { |
| 311 | UINT8 *videoram = machine->generic.videoram.u8; |
| 311 | 312 | /* initialise 6845 */ |
| 312 | 313 | m6845_config(&beta_m6845_interface); |
| 313 | 314 | m6845_set_personality(M6845_PERSONALITY_HD6845S); |
| 314 | 315 | |
| 315 | 316 | GCtrl=0; |
| 316 | 317 | |
| 317 | | machine->generic.videoram.u8=messram_get_ptr(machine->device("messram")); |
| 318 | videoram=messram_get_ptr(machine->device("messram")); |
| 318 | 319 | |
| 319 | 320 | ClkMax=65000; |
| 320 | 321 | FlashCount=0; |
| r9140 | r9141 | |
| 390 | 391 | |
| 391 | 392 | static void beta_plot_char_line(running_machine *machine, int x,int y, bitmap_t *bitmap) |
| 392 | 393 | { |
| 394 | UINT8 *videoram = machine->generic.videoram.u8; |
| 393 | 395 | int CharsPerLine = m6845_get_register(H_DISPLAYED); // Get chars per line. |
| 394 | 396 | unsigned char *data = memory_region(machine, "gfx1"); // ptr to char rom |
| 395 | 397 | int Dot; |
| r9140 | r9141 | |
| 417 | 419 | Offset=0; |
| 418 | 420 | |
| 419 | 421 | /* Get the character to display */ |
| 420 | | char_code = machine->generic.videoram.u8[Offset]; |
| 422 | char_code = videoram[Offset]; |
| 421 | 423 | |
| 422 | 424 | /* Extract non-colour attributes, in character set 1, undeline is used */ |
| 423 | 425 | /* We will extract the colours below, when we have decoded inverse */ |
| 424 | 426 | /* to indicate a double height character */ |
| 425 | | UnderLine=(machine->generic.videoram.u8[Offset+1] & 0x40) >> 6; |
| 426 | | FlashChar=(machine->generic.videoram.u8[Offset+1] & 0x80) >> 7; |
| 427 | UnderLine=(videoram[Offset+1] & 0x40) >> 6; |
| 428 | FlashChar=(videoram[Offset+1] & 0x80) >> 7; |
| 427 | 429 | |
| 428 | 430 | // underline is active for character set 0, on character row 9 |
| 429 | 431 | ULActive=(UnderLine && (beta_6845_RA==9) && ~SWChar); |
| r9140 | r9141 | |
| 447 | 449 | /* Invert colours if invert is true */ |
| 448 | 450 | if(!Invert) |
| 449 | 451 | { |
| 450 | | FgColour = (machine->generic.videoram.u8[Offset+1] & 0x38) >> 3; |
| 451 | | BgColour = (machine->generic.videoram.u8[Offset+1] & 0x07); |
| 452 | FgColour = (videoram[Offset+1] & 0x38) >> 3; |
| 453 | BgColour = (videoram[Offset+1] & 0x07); |
| 452 | 454 | } |
| 453 | 455 | else |
| 454 | 456 | { |
| 455 | | BgColour = (machine->generic.videoram.u8[Offset+1] & 0x38) >> 3; |
| 456 | | FgColour = (machine->generic.videoram.u8[Offset+1] & 0x07); |
| 457 | BgColour = (videoram[Offset+1] & 0x38) >> 3; |
| 458 | FgColour = (videoram[Offset+1] & 0x07); |
| 457 | 459 | } |
| 458 | 460 | |
| 459 | 461 | /* The beta Character ROM has characters of 8x10, each aligned to a 16 byte boundry */ |
| r9140 | r9141 | |
| 537 | 539 | |
| 538 | 540 | static void beta_plot_gfx_line(running_machine *machine,int x,int y, bitmap_t *bitmap) |
| 539 | 541 | { |
| 542 | UINT8 *videoram = machine->generic.videoram.u8; |
| 540 | 543 | int crtcAddr; |
| 541 | 544 | int Addr; |
| 542 | 545 | int Red; |
| r9140 | r9141 | |
| 575 | 578 | if(y>MaxY) MaxY=y; |
| 576 | 579 | if(y<MinY) MinY=y; |
| 577 | 580 | |
| 578 | | Lo = machine->generic.videoram.u8[Addr]; |
| 579 | | Hi = machine->generic.videoram.u8[Addr+1]; |
| 581 | Lo = videoram[Addr]; |
| 582 | Hi = videoram[Addr+1]; |
| 580 | 583 | Word = (Hi<<8) | Lo; |
| 581 | 584 | |
| 582 | 585 | /* If contol is low then we are plotting 4 bit per pixel, 16 colour mode */ |
src/mess/video/cgenie.c
| r9140 | r9141 | |
| 30 | 30 | int width = screen->width(); |
| 31 | 31 | int height = screen->height(); |
| 32 | 32 | |
| 33 | | machine->generic.videoram_size = 0x4000; |
| 34 | | |
| 35 | 33 | VIDEO_START_CALL(generic_bitmapped); |
| 36 | 34 | |
| 37 | | dlybitmap = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16); |
| 35 | dlybitmap = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16); |
| 38 | 36 | } |
| 39 | 37 | |
| 40 | 38 | /*************************************************************************** |
| r9140 | r9141 | |
| 243 | 241 | |
| 244 | 242 | static void cgenie_refresh_monitor(running_machine *machine, bitmap_t * bitmap, const rectangle *cliprect) |
| 245 | 243 | { |
| 244 | UINT8 *videoram = machine->generic.videoram.u8; |
| 246 | 245 | int i, address, offset, cursor, size, code, x, y; |
| 247 | 246 | rectangle r; |
| 248 | 247 | |
| r9140 | r9141 | |
| 272 | 271 | if( graphics ) |
| 273 | 272 | { |
| 274 | 273 | /* get graphics code */ |
| 275 | | code = machine->generic.videoram.u8[i]; |
| 274 | code = videoram[i]; |
| 276 | 275 | drawgfx_opaque(bitmap, &r, machine->gfx[1], code, 0, |
| 277 | 276 | 0, 0, r.min_x, r.min_y); |
| 278 | 277 | } |
| 279 | 278 | else |
| 280 | 279 | { |
| 281 | 280 | /* get character code */ |
| 282 | | code = machine->generic.videoram.u8[i]; |
| 281 | code = videoram[i]; |
| 283 | 282 | |
| 284 | 283 | /* translate defined character sets */ |
| 285 | 284 | code += cgenie_font_offset[(code >> 6) & 3]; |
| r9140 | r9141 | |
| 321 | 320 | |
| 322 | 321 | static void cgenie_refresh_tv_set(running_machine *machine, bitmap_t * bitmap, const rectangle *cliprect) |
| 323 | 322 | { |
| 323 | UINT8 *videoram = machine->generic.videoram.u8; |
| 324 | 324 | int i, address, offset, cursor, size, code, x, y; |
| 325 | 325 | rectangle r; |
| 326 | 326 | |
| r9140 | r9141 | |
| 351 | 351 | if( graphics ) |
| 352 | 352 | { |
| 353 | 353 | /* get graphics code */ |
| 354 | | code = machine->generic.videoram.u8[i]; |
| 354 | code = videoram[i]; |
| 355 | 355 | drawgfx_opaque(machine->generic.tmpbitmap, &r, machine->gfx[1], code, 1, |
| 356 | 356 | 0, 0, r.min_x, r.min_y); |
| 357 | 357 | drawgfx_opaque(dlybitmap, &r, machine->gfx[1], code, 2, |
| r9140 | r9141 | |
| 360 | 360 | else |
| 361 | 361 | { |
| 362 | 362 | /* get character code */ |
| 363 | | code = machine->generic.videoram.u8[i]; |
| 363 | code = videoram[i]; |
| 364 | 364 | |
| 365 | 365 | /* translate defined character sets */ |
| 366 | 366 | code += cgenie_font_offset[(code >> 6) & 3]; |
src/mess/video/pet.c
| r9140 | r9141 | |
| 68 | 68 | // commodore pet discrete video circuit |
| 69 | 69 | VIDEO_UPDATE( pet ) |
| 70 | 70 | { |
| 71 | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 71 | 72 | int x, y, i; |
| 72 | 73 | |
| 73 | 74 | for (y=0, i=0; y<25;y++) |
| r9140 | r9141 | |
| 75 | 76 | for (x=0;x<40;x++, i++) |
| 76 | 77 | { |
| 77 | 78 | drawgfx_opaque(bitmap, NULL,screen->machine->gfx[pet_font], |
| 78 | | screen->machine->generic.videoram.u8[i], 0, 0, 0, 8*x,8*y); |
| 79 | videoram[i], 0, 0, 0, 8*x,8*y); |
| 79 | 80 | } |
| 80 | 81 | } |
| 81 | 82 | return 0; |
| r9140 | r9141 | |
| 84 | 85 | |
| 85 | 86 | MC6845_UPDATE_ROW( pet40_update_row ) |
| 86 | 87 | { |
| 88 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 87 | 89 | int i; |
| 88 | 90 | |
| 89 | 91 | for( i = 0; i < x_count; i++ ) { |
| 90 | | drawgfx_opaque( bitmap, cliprect, device->machine->gfx[pet_font], device->machine->generic.videoram.u8[(ma+i)&0x3ff], 0, 0, 0, 8 * i, y-ra ); |
| 92 | drawgfx_opaque( bitmap, cliprect, device->machine->gfx[pet_font], videoram[(ma+i)&0x3ff], 0, 0, 0, 8 * i, y-ra ); |
| 91 | 93 | } |
| 92 | 94 | } |
| 93 | 95 | |
| 94 | 96 | MC6845_UPDATE_ROW( pet80_update_row ) |
| 95 | 97 | { |
| 98 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 96 | 99 | int i; |
| 97 | 100 | |
| 98 | 101 | for( i = 0; i < x_count; i++ ) { |
| 99 | | drawgfx_opaque( bitmap, cliprect, device->machine->gfx[pet_font], device->machine->generic.videoram.u8[((ma+i)<<1)&0x7ff], 0, 0, 0, 16 * i, y-ra ); |
| 100 | | drawgfx_opaque( bitmap, cliprect, device->machine->gfx[pet_font], device->machine->generic.videoram.u8[(((ma+i)<<1)+1)&0x7ff], 0, 0, 0, 16 * i + 8, y-ra ); |
| 102 | drawgfx_opaque( bitmap, cliprect, device->machine->gfx[pet_font], videoram[((ma+i)<<1)&0x7ff], 0, 0, 0, 16 * i, y-ra ); |
| 103 | drawgfx_opaque( bitmap, cliprect, device->machine->gfx[pet_font], videoram[(((ma+i)<<1)+1)&0x7ff], 0, 0, 0, 16 * i + 8, y-ra ); |
| 101 | 104 | } |
| 102 | 105 | } |
| 103 | 106 | |
src/mess/video/pc_mda.c
| r9140 | r9141 | |
| 122 | 122 | mda.update_row = NULL; |
| 123 | 123 | mda.chr_gen = memory_region( machine, "gfx1" ); |
| 124 | 124 | |
| 125 | | machine->generic.videoram_size = 0x1000; /* This is actually 0x1000 in reality */ |
| 126 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, machine->generic.videoram_size); |
| 125 | pc_videoram_size = 0x1000; /* This is actually 0x1000 in reality */ |
| 126 | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x1000); |
| 127 | 127 | memory_set_bankptr(machine,"bank11", machine->generic.videoram.u8); |
| 128 | 128 | } |
| 129 | 129 | |
| r9140 | r9141 | |
| 144 | 144 | |
| 145 | 145 | static MC6845_UPDATE_ROW( mda_text_inten_update_row ) |
| 146 | 146 | { |
| 147 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 147 | 148 | UINT16 *p = BITMAP_ADDR16( bitmap, y, 0 ); |
| 148 | 149 | UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; |
| 149 | 150 | int i; |
| r9140 | r9141 | |
| 153 | 154 | for ( i = 0; i < x_count; i++ ) |
| 154 | 155 | { |
| 155 | 156 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x0FFF; |
| 156 | | UINT8 chr = machine->generic.videoram.u8[ offset ]; |
| 157 | | UINT8 attr = machine->generic.videoram.u8[ offset + 1 ]; |
| 157 | UINT8 chr = videoram[ offset ]; |
| 158 | UINT8 attr = videoram[ offset + 1 ]; |
| 158 | 159 | UINT8 data = mda.chr_gen[ chr_base + chr * 8 ]; |
| 159 | 160 | UINT8 fg = ( attr & 0x08 ) ? 3 : 2; |
| 160 | 161 | UINT8 bg = 0; |
| r9140 | r9141 | |
| 217 | 218 | |
| 218 | 219 | static MC6845_UPDATE_ROW( mda_text_blink_update_row ) |
| 219 | 220 | { |
| 221 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 220 | 222 | UINT16 *p = BITMAP_ADDR16( bitmap, y, 0 ); |
| 221 | 223 | UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; |
| 222 | 224 | int i; |
| r9140 | r9141 | |
| 226 | 228 | for ( i = 0; i < x_count; i++ ) |
| 227 | 229 | { |
| 228 | 230 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x0FFF; |
| 229 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 230 | | UINT8 attr = device->machine->generic.videoram.u8[ offset + 1 ]; |
| 231 | UINT8 chr = videoram[ offset ]; |
| 232 | UINT8 attr = videoram[ offset + 1 ]; |
| 231 | 233 | UINT8 data = mda.chr_gen[ chr_base + chr * 8 ]; |
| 232 | 234 | UINT8 fg = ( attr & 0x08 ) ? 3 : 2; |
| 233 | 235 | UINT8 bg = 0; |
| r9140 | r9141 | |
| 474 | 476 | mda.update_row = NULL; |
| 475 | 477 | mda.chr_gen = memory_region( machine, "gfx1" ); |
| 476 | 478 | |
| 477 | | machine->generic.videoram_size = 0x10000; |
| 478 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, machine->generic.videoram_size); |
| 479 | pc_videoram_size = 0x10000; |
| 480 | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x10000); |
| 479 | 481 | memory_set_bankptr(machine,"bank11", machine->generic.videoram.u8); |
| 480 | 482 | } |
| 481 | 483 | |
| r9140 | r9141 | |
| 489 | 491 | |
| 490 | 492 | static MC6845_UPDATE_ROW( hercules_gfx_update_row ) |
| 491 | 493 | { |
| 494 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 492 | 495 | UINT16 *p = BITMAP_ADDR16( bitmap, y, 0 ); |
| 493 | 496 | UINT16 gfx_base = ( ( mda.mode_control & 0x80 ) ? 0x8000 : 0x0000 ) | ( ( ra & 0x03 ) << 13 ); |
| 494 | 497 | int i; |
| r9140 | r9141 | |
| 497 | 500 | if ( y == 0 ) MDA_LOG(1,"hercules_gfx_update_row",("\n")); |
| 498 | 501 | for ( i = 0; i < x_count; i++ ) |
| 499 | 502 | { |
| 500 | | UINT8 data = device->machine->generic.videoram.u8[ gfx_base + ( ( ma + i ) << 1 ) ]; |
| 503 | UINT8 data = videoram[ gfx_base + ( ( ma + i ) << 1 ) ]; |
| 501 | 504 | |
| 502 | 505 | *p = ( data & 0x80 ) ? 2 : 0; p++; |
| 503 | 506 | *p = ( data & 0x40 ) ? 2 : 0; p++; |
| r9140 | r9141 | |
| 508 | 511 | *p = ( data & 0x02 ) ? 2 : 0; p++; |
| 509 | 512 | *p = ( data & 0x01 ) ? 2 : 0; p++; |
| 510 | 513 | |
| 511 | | data = device->machine->generic.videoram.u8[ gfx_base + ( ( ma + i ) << 1 ) + 1 ]; |
| 514 | data = videoram[ gfx_base + ( ( ma + i ) << 1 ) + 1 ]; |
| 512 | 515 | |
| 513 | 516 | *p = ( data & 0x80 ) ? 2 : 0; p++; |
| 514 | 517 | *p = ( data & 0x40 ) ? 2 : 0; p++; |
src/mess/video/pc_aga.c
| r9140 | r9141 | |
| 124 | 124 | |
| 125 | 125 | /* colors need fixing in the mda_text_* functions ! */ |
| 126 | 126 | static MC6845_UPDATE_ROW( mda_text_inten_update_row ) { |
| 127 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 127 | 128 | UINT16 *p = BITMAP_ADDR16( bitmap, y, 0 ); |
| 128 | 129 | UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; |
| 129 | 130 | int i; |
| r9140 | r9141 | |
| 131 | 132 | if ( y == 0 ) logerror("mda_text_inten_update_row\n"); |
| 132 | 133 | for ( i = 0; i < x_count; i++ ) { |
| 133 | 134 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x0FFF; |
| 134 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 135 | | UINT8 attr = device->machine->generic.videoram.u8[ offset + 1 ]; |
| 135 | UINT8 chr = videoram[ offset ]; |
| 136 | UINT8 attr = videoram[ offset + 1 ]; |
| 136 | 137 | UINT8 data = aga.mda_chr_gen[ chr_base + chr * 8 ]; |
| 137 | 138 | UINT8 fg = ( attr & 0x08 ) ? 3 : 2; |
| 138 | 139 | UINT8 bg = 0; |
| r9140 | r9141 | |
| 182 | 183 | |
| 183 | 184 | |
| 184 | 185 | static MC6845_UPDATE_ROW( mda_text_blink_update_row ) { |
| 186 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 185 | 187 | UINT16 *p = BITMAP_ADDR16( bitmap, y, 0 ); |
| 186 | 188 | UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; |
| 187 | 189 | int i; |
| r9140 | r9141 | |
| 189 | 191 | if ( y == 0 ) logerror("mda_text_blink_update_row\n"); |
| 190 | 192 | for ( i = 0; i < x_count; i++ ) { |
| 191 | 193 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x0FFF; |
| 192 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 193 | | UINT8 attr = device->machine->generic.videoram.u8[ offset + 1 ]; |
| 194 | UINT8 chr = videoram[ offset ]; |
| 195 | UINT8 attr = videoram[ offset + 1 ]; |
| 194 | 196 | UINT8 data = aga.mda_chr_gen[ chr_base + chr * 8 ]; |
| 195 | 197 | UINT8 fg = ( attr & 0x08 ) ? 3 : 2; |
| 196 | 198 | UINT8 bg = 0; |
| r9140 | r9141 | |
| 241 | 243 | |
| 242 | 244 | |
| 243 | 245 | static MC6845_UPDATE_ROW( cga_text_inten_update_row ) { |
| 246 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 244 | 247 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 245 | 248 | int i; |
| 246 | 249 | |
| 247 | 250 | if ( y == 0 ) logerror("cga_text_inten_update_row\n"); |
| 248 | 251 | for ( i = 0; i < x_count; i++ ) { |
| 249 | 252 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff; |
| 250 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 251 | | UINT8 attr = device->machine->generic.videoram.u8[ offset +1 ]; |
| 253 | UINT8 chr = videoram[ offset ]; |
| 254 | UINT8 attr = videoram[ offset +1 ]; |
| 252 | 255 | UINT8 data = aga.cga_chr_gen[ chr * 16 + ra ]; |
| 253 | 256 | UINT16 fg = attr & 0x0F; |
| 254 | 257 | UINT16 bg = ( attr >> 4 ) & 0x07; |
| r9140 | r9141 | |
| 269 | 272 | } |
| 270 | 273 | |
| 271 | 274 | static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) { |
| 275 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 272 | 276 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 273 | 277 | int i; |
| 274 | 278 | |
| 275 | 279 | if ( y == 0 ) logerror("cga_text_inten_alt_update_row\n"); |
| 276 | 280 | for ( i = 0; i < x_count; i++ ) { |
| 277 | 281 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff; |
| 278 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 279 | | UINT8 attr = device->machine->generic.videoram.u8[ offset +1 ]; |
| 282 | UINT8 chr = videoram[ offset ]; |
| 283 | UINT8 attr = videoram[ offset +1 ]; |
| 280 | 284 | UINT8 data = aga.cga_chr_gen[ chr * 16 + ra ]; |
| 281 | 285 | UINT16 fg = attr & 0x0F; |
| 282 | 286 | |
| r9140 | r9141 | |
| 296 | 300 | } |
| 297 | 301 | |
| 298 | 302 | static MC6845_UPDATE_ROW( cga_text_blink_update_row ) { |
| 303 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 299 | 304 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 300 | 305 | int i; |
| 301 | 306 | |
| 302 | 307 | for ( i = 0; i < x_count; i++ ) { |
| 303 | 308 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff; |
| 304 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 305 | | UINT8 attr = device->machine->generic.videoram.u8[ offset +1 ]; |
| 309 | UINT8 chr = videoram[ offset ]; |
| 310 | UINT8 attr = videoram[ offset +1 ]; |
| 306 | 311 | UINT8 data = aga.cga_chr_gen[ chr * 16 + ra ]; |
| 307 | 312 | UINT16 fg = attr & 0x0F; |
| 308 | 313 | UINT16 bg = attr >> 4; |
| r9140 | r9141 | |
| 327 | 332 | } |
| 328 | 333 | |
| 329 | 334 | static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) { |
| 335 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 330 | 336 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 331 | 337 | int i; |
| 332 | 338 | |
| 333 | 339 | if ( y == 0 ) logerror("cga_text_blink_alt_update_row\n"); |
| 334 | 340 | for ( i = 0; i < x_count; i++ ) { |
| 335 | 341 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff; |
| 336 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 337 | | UINT8 attr = device->machine->generic.videoram.u8[ offset +1 ]; |
| 342 | UINT8 chr = videoram[ offset ]; |
| 343 | UINT8 attr = videoram[ offset +1 ]; |
| 338 | 344 | UINT8 data = aga.cga_chr_gen[ chr * 16 + ra ]; |
| 339 | 345 | UINT16 fg = attr & 0x07; |
| 340 | 346 | UINT16 bg = 0; |
| r9140 | r9141 | |
| 360 | 366 | } |
| 361 | 367 | |
| 362 | 368 | static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) { |
| 369 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 363 | 370 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 364 | 371 | int i; |
| 365 | 372 | |
| 366 | 373 | if ( y == 0 ) logerror("cga_gfx_4bppl_update_row\n"); |
| 367 | 374 | for ( i = 0; i < x_count; i++ ) { |
| 368 | 375 | UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 ); |
| 369 | | UINT8 data = device->machine->generic.videoram.u8[ offset ]; |
| 376 | UINT8 data = videoram[ offset ]; |
| 370 | 377 | |
| 371 | 378 | *p = data >> 4; p++; |
| 372 | 379 | *p = data >> 4; p++; |
| 373 | 380 | *p = data & 0x0F; p++; |
| 374 | 381 | *p = data & 0x0F; p++; |
| 375 | 382 | |
| 376 | | data = device->machine->generic.videoram.u8[ offset + 1 ]; |
| 383 | data = videoram[ offset + 1 ]; |
| 377 | 384 | |
| 378 | 385 | *p = data >> 4; p++; |
| 379 | 386 | *p = data >> 4; p++; |
| r9140 | r9141 | |
| 383 | 390 | } |
| 384 | 391 | |
| 385 | 392 | static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) { |
| 393 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 386 | 394 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 387 | 395 | int i; |
| 388 | 396 | |
| 389 | 397 | if ( y == 0 ) logerror("cga_gfx_4bpph_update_row\n"); |
| 390 | 398 | for ( i = 0; i < x_count; i++ ) { |
| 391 | 399 | UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 ); |
| 392 | | UINT8 data = device->machine->generic.videoram.u8[ offset ]; |
| 400 | UINT8 data = videoram[ offset ]; |
| 393 | 401 | |
| 394 | 402 | *p = data >> 4; p++; |
| 395 | 403 | *p = data >> 4; p++; |
| r9140 | r9141 | |
| 400 | 408 | *p = data & 0x0F; p++; |
| 401 | 409 | *p = data & 0x0F; p++; |
| 402 | 410 | |
| 403 | | data = device->machine->generic.videoram.u8[ offset + 1 ]; |
| 411 | data = videoram[ offset + 1 ]; |
| 404 | 412 | |
| 405 | 413 | *p = data >> 4; p++; |
| 406 | 414 | *p = data >> 4; p++; |
| r9140 | r9141 | |
| 414 | 422 | } |
| 415 | 423 | |
| 416 | 424 | static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) { |
| 425 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 417 | 426 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 418 | 427 | int i; |
| 419 | 428 | |
| 420 | 429 | // if ( y == 0 ) logerror("cga_gfx_2bpp_update_row\n"); |
| 421 | 430 | for ( i = 0; i < x_count; i++ ) { |
| 422 | 431 | UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 ); |
| 423 | | UINT8 data = device->machine->generic.videoram.u8[ offset ]; |
| 432 | UINT8 data = videoram[ offset ]; |
| 424 | 433 | |
| 425 | 434 | *p = aga.cga_palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]; p++; |
| 426 | 435 | *p = aga.cga_palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]; p++; |
| 427 | 436 | *p = aga.cga_palette_lut_2bpp[ ( data >> 2 ) & 0x03 ]; p++; |
| 428 | 437 | *p = aga.cga_palette_lut_2bpp[ data & 0x03 ]; p++; |
| 429 | 438 | |
| 430 | | data = device->machine->generic.videoram.u8[ offset+1 ]; |
| 439 | data = videoram[ offset+1 ]; |
| 431 | 440 | |
| 432 | 441 | *p = aga.cga_palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]; p++; |
| 433 | 442 | *p = aga.cga_palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]; p++; |
| r9140 | r9141 | |
| 437 | 446 | } |
| 438 | 447 | |
| 439 | 448 | static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row ) { |
| 449 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 440 | 450 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 441 | 451 | UINT8 fg = aga.cga_color_select & 0x0F; |
| 442 | 452 | int i; |
| r9140 | r9141 | |
| 444 | 454 | if ( y == 0 ) logerror("cga_gfx_1bpp_update_row\n"); |
| 445 | 455 | for ( i = 0; i < x_count; i++ ) { |
| 446 | 456 | UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( ra & 1 ) << 13 ); |
| 447 | | UINT8 data = device->machine->generic.videoram.u8[ offset ]; |
| 457 | UINT8 data = videoram[ offset ]; |
| 448 | 458 | |
| 449 | 459 | *p = ( data & 0x80 ) ? fg : 0; p++; |
| 450 | 460 | *p = ( data & 0x40 ) ? fg : 0; p++; |
| r9140 | r9141 | |
| 455 | 465 | *p = ( data & 0x02 ) ? fg : 0; p++; |
| 456 | 466 | *p = ( data & 0x01 ) ? fg : 0; p++; |
| 457 | 467 | |
| 458 | | data = device->machine->generic.videoram.u8[ offset + 1 ]; |
| 468 | data = videoram[ offset + 1 ]; |
| 459 | 469 | |
| 460 | 470 | *p = ( data & 0x80 ) ? fg : 0; p++; |
| 461 | 471 | *p = ( data & 0x40 ) ? fg : 0; p++; |
| r9140 | r9141 | |
| 767 | 777 | |
| 768 | 778 | READ8_HANDLER( pc_aga_videoram_r ) |
| 769 | 779 | { |
| 780 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 770 | 781 | switch (aga.mode) { |
| 771 | 782 | case AGA_COLOR: |
| 772 | | if (offset>=0x8000) return space->machine->generic.videoram.u8[offset-0x8000]; |
| 783 | if (offset>=0x8000) return videoram[offset-0x8000]; |
| 773 | 784 | return 0; |
| 774 | 785 | case AGA_MONO: |
| 775 | | return space->machine->generic.videoram.u8[offset]; |
| 786 | return videoram[offset]; |
| 776 | 787 | case AGA_OFF: break; |
| 777 | 788 | } |
| 778 | 789 | return 0; |
| r9140 | r9141 | |
| 780 | 791 | |
| 781 | 792 | READ8_HANDLER( pc200_videoram_r ) |
| 782 | 793 | { |
| 794 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 783 | 795 | switch (aga.mode) |
| 784 | 796 | { |
| 785 | 797 | default: |
| 786 | | if (offset>=0x8000) return space->machine->generic.videoram.u8[offset-0x8000]; |
| 798 | if (offset>=0x8000) return videoram[offset-0x8000]; |
| 787 | 799 | return 0; |
| 788 | 800 | case AGA_MONO: |
| 789 | | return space->machine->generic.videoram.u8[offset]; |
| 801 | return videoram[offset]; |
| 790 | 802 | } |
| 791 | 803 | return 0; |
| 792 | 804 | } |
src/mess/video/pc_cga.c
| r9140 | r9141 | |
| 494 | 494 | break; |
| 495 | 495 | } |
| 496 | 496 | |
| 497 | | machine->generic.videoram_size = 0x4000; |
| 497 | pc_videoram_size = 0x4000; |
| 498 | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x4000); |
| 498 | 499 | |
| 499 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, machine->generic.videoram_size); |
| 500 | | |
| 501 | 500 | memory_set_bankptr(machine,"bank11", machine->generic.videoram.u8); |
| 502 | 501 | |
| 503 | 502 | internal_pc_cga_video_start(machine, M6845_PERSONALITY_GENUINE); |
| r9140 | r9141 | |
| 559 | 558 | |
| 560 | 559 | static MC6845_UPDATE_ROW( cga_text_inten_update_row ) |
| 561 | 560 | { |
| 561 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 562 | 562 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 563 | 563 | int i; |
| 564 | 564 | running_machine *machine = device->machine; |
| r9140 | r9141 | |
| 567 | 567 | for ( i = 0; i < x_count; i++ ) |
| 568 | 568 | { |
| 569 | 569 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff; |
| 570 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 571 | | UINT8 attr = device->machine->generic.videoram.u8[ offset +1 ]; |
| 570 | UINT8 chr = videoram[ offset ]; |
| 571 | UINT8 attr = videoram[ offset +1 ]; |
| 572 | 572 | UINT8 data = cga.chr_gen[ chr * 8 + ra ]; |
| 573 | 573 | UINT16 fg = attr & 0x0F; |
| 574 | 574 | UINT16 bg = attr >> 4; |
| r9140 | r9141 | |
| 597 | 597 | |
| 598 | 598 | static MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row ) |
| 599 | 599 | { |
| 600 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 600 | 601 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 601 | 602 | int i; |
| 602 | 603 | running_machine *machine = device->machine; |
| r9140 | r9141 | |
| 605 | 606 | for ( i = 0; i < x_count; i++ ) |
| 606 | 607 | { |
| 607 | 608 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff; |
| 608 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 609 | | UINT8 attr = device->machine->generic.videoram.u8[ offset +1 ]; |
| 609 | UINT8 chr = videoram[ offset ]; |
| 610 | UINT8 attr = videoram[ offset +1 ]; |
| 610 | 611 | UINT8 data = cga.chr_gen[ chr * 8 + ra ]; |
| 611 | 612 | UINT16 fg = 0x10 + ( attr & 0x0F ); |
| 612 | 613 | UINT16 bg = 0x10 + ( ( attr >> 4 ) & 0x07 ); |
| r9140 | r9141 | |
| 634 | 635 | |
| 635 | 636 | static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) |
| 636 | 637 | { |
| 638 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 637 | 639 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 638 | 640 | int i; |
| 639 | 641 | running_machine *machine = device->machine; |
| r9140 | r9141 | |
| 642 | 644 | for ( i = 0; i < x_count; i++ ) |
| 643 | 645 | { |
| 644 | 646 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff; |
| 645 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 646 | | UINT8 attr = device->machine->generic.videoram.u8[ offset +1 ]; |
| 647 | UINT8 chr = videoram[ offset ]; |
| 648 | UINT8 attr = videoram[ offset +1 ]; |
| 647 | 649 | UINT8 data = cga.chr_gen[ chr * 8 + ra ]; |
| 648 | 650 | UINT16 fg = attr & 0x0F; |
| 649 | 651 | |
| r9140 | r9141 | |
| 671 | 673 | |
| 672 | 674 | static MC6845_UPDATE_ROW( cga_text_blink_update_row ) |
| 673 | 675 | { |
| 676 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 674 | 677 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 675 | 678 | int i; |
| 676 | 679 | running_machine *machine = device->machine; |
| r9140 | r9141 | |
| 679 | 682 | for ( i = 0; i < x_count; i++ ) |
| 680 | 683 | { |
| 681 | 684 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff; |
| 682 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 683 | | UINT8 attr = device->machine->generic.videoram.u8[ offset +1 ]; |
| 685 | UINT8 chr = videoram[ offset ]; |
| 686 | UINT8 attr = videoram[ offset +1 ]; |
| 684 | 687 | UINT8 data = cga.chr_gen[ chr * 8 + ra ]; |
| 685 | 688 | UINT16 fg = attr & 0x0F; |
| 686 | 689 | UINT16 bg = attr >> 4; |
| r9140 | r9141 | |
| 719 | 722 | |
| 720 | 723 | static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) |
| 721 | 724 | { |
| 725 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 722 | 726 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 723 | 727 | int i; |
| 724 | 728 | running_machine *machine = device->machine; |
| r9140 | r9141 | |
| 727 | 731 | for ( i = 0; i < x_count; i++ ) |
| 728 | 732 | { |
| 729 | 733 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff; |
| 730 | | UINT8 chr = device->machine->generic.videoram.u8[ offset ]; |
| 731 | | UINT8 attr = device->machine->generic.videoram.u8[ offset +1 ]; |
| 734 | UINT8 chr = videoram[ offset ]; |
| 735 | UINT8 attr = videoram[ offset +1 ]; |
| 732 | 736 | UINT8 data = cga.chr_gen[ chr * 8 + ra ]; |
| 733 | 737 | UINT16 fg = attr & 0x07; |
| 734 | 738 | UINT16 bg = 0; |
| r9140 | r9141 | |
| 765 | 769 | |
| 766 | 770 | static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) |
| 767 | 771 | { |
| 772 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 768 | 773 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 769 | 774 | int i; |
| 770 | 775 | running_machine *machine = device->machine; |
| r9140 | r9141 | |
| 773 | 778 | for ( i = 0; i < x_count; i++ ) |
| 774 | 779 | { |
| 775 | 780 | UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 ); |
| 776 | | UINT8 data = device->machine->generic.videoram.u8[ offset ]; |
| 781 | UINT8 data = videoram[ offset ]; |
| 777 | 782 | |
| 778 | 783 | *p = data >> 4; p++; |
| 779 | 784 | *p = data >> 4; p++; |
| 780 | 785 | *p = data & 0x0F; p++; |
| 781 | 786 | *p = data & 0x0F; p++; |
| 782 | 787 | |
| 783 | | data = device->machine->generic.videoram.u8[ offset + 1 ]; |
| 788 | data = videoram[ offset + 1 ]; |
| 784 | 789 | |
| 785 | 790 | *p = data >> 4; p++; |
| 786 | 791 | *p = data >> 4; p++; |
| r9140 | r9141 | |
| 821 | 826 | |
| 822 | 827 | static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) |
| 823 | 828 | { |
| 829 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 824 | 830 | UINT8 samples[1280]; |
| 825 | 831 | UINT8 ntsc_decoded[3*1280]; |
| 826 | 832 | int samp_index = 0; |
| r9140 | r9141 | |
| 837 | 843 | for ( i = 0; i < x_count; i++ ) |
| 838 | 844 | { |
| 839 | 845 | UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 ); |
| 840 | | UINT8 data = device->machine->generic.videoram.u8[ offset ]; |
| 846 | UINT8 data = videoram[ offset ]; |
| 841 | 847 | |
| 842 | 848 | if ( NTSC_FILTER ) |
| 843 | 849 | { |
| r9140 | r9141 | |
| 869 | 875 | *p = data & 0x0F; p++; |
| 870 | 876 | *p = data & 0x0F; p++; |
| 871 | 877 | |
| 872 | | data = device->machine->generic.videoram.u8[ offset + 1 ]; |
| 878 | data = videoram[ offset + 1 ]; |
| 873 | 879 | |
| 874 | 880 | if ( NTSC_FILTER ) |
| 875 | 881 | { |
| r9140 | r9141 | |
| 927 | 933 | |
| 928 | 934 | static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) |
| 929 | 935 | { |
| 936 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 930 | 937 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 931 | 938 | int i; |
| 932 | 939 | running_machine *machine = device->machine; |
| r9140 | r9141 | |
| 935 | 942 | for ( i = 0; i < x_count; i++ ) |
| 936 | 943 | { |
| 937 | 944 | UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 ); |
| 938 | | UINT8 data = device->machine->generic.videoram.u8[ offset ]; |
| 945 | UINT8 data = videoram[ offset ]; |
| 939 | 946 | |
| 940 | 947 | *p = cga.palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]; p++; |
| 941 | 948 | *p = cga.palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]; p++; |
| 942 | 949 | *p = cga.palette_lut_2bpp[ ( data >> 2 ) & 0x03 ]; p++; |
| 943 | 950 | *p = cga.palette_lut_2bpp[ data & 0x03 ]; p++; |
| 944 | 951 | |
| 945 | | data = device->machine->generic.videoram.u8[ offset+1 ]; |
| 952 | data = videoram[ offset+1 ]; |
| 946 | 953 | |
| 947 | 954 | *p = cga.palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]; p++; |
| 948 | 955 | *p = cga.palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]; p++; |
| r9140 | r9141 | |
| 961 | 968 | |
| 962 | 969 | static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row ) |
| 963 | 970 | { |
| 971 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 964 | 972 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 965 | 973 | UINT8 fg = cga.color_select & 0x0F; |
| 966 | 974 | int i; |
| r9140 | r9141 | |
| 970 | 978 | for ( i = 0; i < x_count; i++ ) |
| 971 | 979 | { |
| 972 | 980 | UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( ra & 1 ) << 13 ); |
| 973 | | UINT8 data = device->machine->generic.videoram.u8[ offset ]; |
| 981 | UINT8 data = videoram[ offset ]; |
| 974 | 982 | |
| 975 | 983 | *p = ( data & 0x80 ) ? fg : 0; p++; |
| 976 | 984 | *p = ( data & 0x40 ) ? fg : 0; p++; |
| r9140 | r9141 | |
| 981 | 989 | *p = ( data & 0x02 ) ? fg : 0; p++; |
| 982 | 990 | *p = ( data & 0x01 ) ? fg : 0; p++; |
| 983 | 991 | |
| 984 | | data = device->machine->generic.videoram.u8[ offset + 1 ]; |
| 992 | data = videoram[ offset + 1 ]; |
| 985 | 993 | |
| 986 | 994 | *p = ( data & 0x80 ) ? fg : 0; p++; |
| 987 | 995 | *p = ( data & 0x40 ) ? fg : 0; p++; |
| r9140 | r9141 | |
| 1551 | 1559 | |
| 1552 | 1560 | static MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row ) |
| 1553 | 1561 | { |
| 1562 | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 1554 | 1563 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 1555 | 1564 | UINT16 offset_base = ra << 13; |
| 1556 | 1565 | int j; |
| r9140 | r9141 | |
| 1560 | 1569 | for ( j = 0; j < x_count; j++ ) |
| 1561 | 1570 | { |
| 1562 | 1571 | UINT16 offset = offset_base | ( ( ma + j ) & 0x1FFF ); |
| 1563 | | UINT16 i = ( cga.color_select & 8 ) ? device->machine->generic.videoram.u8[ videoram_offset[3] | offset ] << 3 : 0; |
| 1564 | | UINT16 r = ( cga.color_select & 4 ) ? device->machine->generic.videoram.u8[ videoram_offset[2] | offset ] << 2 : 0; |
| 1565 | | UINT16 g = ( cga.color_select & 2 ) ? device->machine->generic.videoram.u8[ videoram_offset[1] | offset ] << 1 : 0; |
| 1566 | | UINT16 b = ( cga.color_select & 1 ) ? device->machine->generic.videoram.u8[ videoram_offset[0] | offset ] : 0; |
| 1572 | UINT16 i = ( cga.color_select & 8 ) ? videoram[ videoram_offset[3] | offset ] << 3 : 0; |
| 1573 | UINT16 r = ( cga.color_select & 4 ) ? videoram[ videoram_offset[2] | offset ] << 2 : 0; |
| 1574 | UINT16 g = ( cga.color_select & 2 ) ? videoram[ videoram_offset[1] | offset ] << 1 : 0; |
| 1575 | UINT16 b = ( cga.color_select & 1 ) ? videoram[ videoram_offset[0] | offset ] : 0; |
| 1567 | 1576 | |
| 1568 | 1577 | *p = ( ( i & 0x400 ) | ( r & 0x200 ) | ( g & 0x100 ) | ( b & 0x80 ) ) >> 7; p++; |
| 1569 | 1578 | *p = ( ( i & 0x200 ) | ( r & 0x100 ) | ( g & 0x080 ) | ( b & 0x40 ) ) >> 6; p++; |
| r9140 | r9141 | |
| 1579 | 1588 | |
| 1580 | 1589 | static WRITE8_HANDLER ( pc1512_w ) |
| 1581 | 1590 | { |
| 1591 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1582 | 1592 | running_device *devconf = space->machine->device(CGA_MC6845_NAME); |
| 1583 | 1593 | |
| 1584 | 1594 | switch (offset) |
| r9140 | r9141 | |
| 1608 | 1618 | } |
| 1609 | 1619 | else |
| 1610 | 1620 | { |
| 1611 | | memory_set_bankptr(space->machine,"bank1", space->machine->generic.videoram.u8 + videoram_offset[0]); |
| 1621 | memory_set_bankptr(space->machine,"bank1", videoram + videoram_offset[0]); |
| 1612 | 1622 | } |
| 1613 | 1623 | cga.mode_control = data; |
| 1614 | 1624 | switch( cga.mode_control & 0x3F ) |
| r9140 | r9141 | |
| 1666 | 1676 | pc1512.read = data; |
| 1667 | 1677 | if ( ( cga.mode_control & 0x12 ) == 0x12 ) |
| 1668 | 1678 | { |
| 1669 | | memory_set_bankptr(space->machine,"bank1", space->machine->generic.videoram.u8 + videoram_offset[data & 3]); |
| 1679 | memory_set_bankptr(space->machine,"bank1", videoram + videoram_offset[data & 3]); |
| 1670 | 1680 | } |
| 1671 | 1681 | break; |
| 1672 | 1682 | |
| r9140 | r9141 | |
| 1700 | 1710 | |
| 1701 | 1711 | static WRITE8_HANDLER ( pc1512_videoram_w ) |
| 1702 | 1712 | { |
| 1713 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1703 | 1714 | if ( ( cga.mode_control & 0x12 ) == 0x12 ) |
| 1704 | 1715 | { |
| 1705 | 1716 | if (pc1512.write & 1) |
| 1706 | | space->machine->generic.videoram.u8[offset+videoram_offset[0]] = data; /* blue plane */ |
| 1717 | videoram[offset+videoram_offset[0]] = data; /* blue plane */ |
| 1707 | 1718 | if (pc1512.write & 2) |
| 1708 | | space->machine->generic.videoram.u8[offset+videoram_offset[1]] = data; /* green */ |
| 1719 | videoram[offset+videoram_offset[1]] = data; /* green */ |
| 1709 | 1720 | if (pc1512.write & 4) |
| 1710 | | space->machine->generic.videoram.u8[offset+videoram_offset[2]] = data; /* red */ |
| 1721 | videoram[offset+videoram_offset[2]] = data; /* red */ |
| 1711 | 1722 | if (pc1512.write & 8) |
| 1712 | | space->machine->generic.videoram.u8[offset+videoram_offset[3]] = data; /* intensity (text, 4color) */ |
| 1723 | videoram[offset+videoram_offset[3]] = data; /* intensity (text, 4color) */ |
| 1713 | 1724 | } |
| 1714 | 1725 | else |
| 1715 | 1726 | { |
| 1716 | | space->machine->generic.videoram.u8[offset + videoram_offset[0]] = data; |
| 1727 | videoram[offset + videoram_offset[0]] = data; |
| 1717 | 1728 | } |
| 1718 | 1729 | } |
| 1719 | 1730 | |
| r9140 | r9141 | |
| 1727 | 1738 | |
| 1728 | 1739 | static VIDEO_START( pc1512 ) |
| 1729 | 1740 | { |
| 1730 | | machine->generic.videoram_size = 0x10000; |
| 1731 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, machine->generic.videoram_size ); |
| 1732 | | memory_set_bankptr(machine,"bank1",machine->generic.videoram.u8 + videoram_offset[0]); |
| 1741 | pc_videoram_size = 0x10000; |
| 1742 | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x10000 ); |
| 1743 | memory_set_bankptr(machine, "bank1", machine->generic.videoram.u8 + videoram_offset[0]); |
| 1733 | 1744 | |
| 1734 | 1745 | memset( &pc1512, 0, sizeof ( pc1512 ) ); |
| 1735 | 1746 | pc1512.write = 0xf; |
src/mess/video/samcoupe.c
| r9140 | r9141 | |
| 28 | 28 | |
| 29 | 29 | static void draw_mode4_line(running_machine *machine, int y, int hpos) |
| 30 | 30 | { |
| 31 | UINT8 *videoram = machine->generic.videoram.u8; |
| 31 | 32 | samcoupe_state *asic = machine->driver_data<samcoupe_state>(); |
| 32 | 33 | |
| 33 | 34 | /* get start address */ |
| 34 | | UINT8 *vram = machine->generic.videoram.u8 + ((y - SAM_BORDER_TOP) * 128) + ((hpos - SAM_BORDER_LEFT) / 4); |
| 35 | UINT8 *vram = videoram + ((y - SAM_BORDER_TOP) * 128) + ((hpos - SAM_BORDER_LEFT) / 4); |
| 35 | 36 | |
| 36 | 37 | for (int i = 0; i < (SAM_BLOCK*2)/4; i++) |
| 37 | 38 | { |
| r9140 | r9141 | |
| 52 | 53 | |
| 53 | 54 | static void draw_mode3_line(running_machine *machine, int y, int hpos) |
| 54 | 55 | { |
| 56 | UINT8 *videoram = machine->generic.videoram.u8; |
| 55 | 57 | samcoupe_state *asic = machine->driver_data<samcoupe_state>(); |
| 56 | 58 | |
| 57 | 59 | /* get start address */ |
| 58 | | UINT8 *vram = machine->generic.videoram.u8 + ((y - SAM_BORDER_TOP) * 128) + ((hpos - SAM_BORDER_LEFT) / 4); |
| 60 | UINT8 *vram = videoram + ((y - SAM_BORDER_TOP) * 128) + ((hpos - SAM_BORDER_LEFT) / 4); |
| 59 | 61 | |
| 60 | 62 | for (int i = 0; i < (SAM_BLOCK*2)/4; i++) |
| 61 | 63 | { |
| r9140 | r9141 | |
| 90 | 92 | |
| 91 | 93 | static void draw_mode2_line(running_machine *machine, int y, int hpos) |
| 92 | 94 | { |
| 95 | UINT8 *videoram = machine->generic.videoram.u8; |
| 93 | 96 | samcoupe_state *asic = machine->driver_data<samcoupe_state>(); |
| 94 | 97 | |
| 95 | 98 | int cell = (y - SAM_BORDER_TOP) * 32 + (hpos - SAM_BORDER_LEFT) / SAM_BLOCK / 2; |
| 96 | 99 | |
| 97 | | UINT8 mask = machine->generic.videoram.u8[cell]; |
| 98 | | asic->attribute = machine->generic.videoram.u8[cell + 0x2000]; |
| 100 | UINT8 mask = videoram[cell]; |
| 101 | asic->attribute = videoram[cell + 0x2000]; |
| 99 | 102 | |
| 100 | 103 | draw_mode12_block(asic, machine->generic.tmpbitmap, y, hpos, mask); |
| 101 | 104 | } |
| 102 | 105 | |
| 103 | 106 | static void draw_mode1_line(running_machine *machine, int y, int hpos) |
| 104 | 107 | { |
| 108 | UINT8 *videoram = machine->generic.videoram.u8; |
| 105 | 109 | samcoupe_state *asic = machine->driver_data<samcoupe_state>(); |
| 106 | 110 | |
| 107 | | UINT8 mask = machine->generic.videoram.u8[((((y - SAM_BORDER_TOP) & 0xc0) << 5) | (((y - SAM_BORDER_TOP) & 0x07) << 8) | (((y - SAM_BORDER_TOP) & 0x38) << 2)) + (hpos - SAM_BORDER_LEFT) / SAM_BLOCK / 2]; |
| 108 | | asic->attribute = machine->generic.videoram.u8[32*192 + (((y - SAM_BORDER_TOP) & 0xf8) << 2) + (hpos - SAM_BORDER_LEFT) / SAM_BLOCK / 2]; |
| 111 | UINT8 mask = videoram[((((y - SAM_BORDER_TOP) & 0xc0) << 5) | (((y - SAM_BORDER_TOP) & 0x07) << 8) | (((y - SAM_BORDER_TOP) & 0x38) << 2)) + (hpos - SAM_BORDER_LEFT) / SAM_BLOCK / 2]; |
| 112 | asic->attribute = videoram[32*192 + (((y - SAM_BORDER_TOP) & 0xf8) << 2) + (hpos - SAM_BORDER_LEFT) / SAM_BLOCK / 2]; |
| 109 | 113 | |
| 110 | 114 | draw_mode12_block(asic, machine->generic.tmpbitmap, y, hpos, mask); |
| 111 | 115 | } |
src/mess/video/trs80.c
| r9140 | r9141 | |
| 55 | 55 | /* 7 or 8-bit video, 32/64 characters per line = trs80, trs80l2, sys80 */ |
| 56 | 56 | VIDEO_UPDATE( trs80 ) |
| 57 | 57 | { |
| 58 | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 58 | 59 | UINT8 y,ra,chr,gfx,gfxbit; |
| 59 | 60 | UINT16 sy=0,ma=0,x; |
| 60 | 61 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| r9140 | r9141 | |
| 75 | 76 | |
| 76 | 77 | for (x = ma; x < ma + 64; x+=skip) |
| 77 | 78 | { |
| 78 | | chr = screen->machine->generic.videoram.u8[x]; |
| 79 | chr = videoram[x]; |
| 79 | 80 | |
| 80 | 81 | if (chr & 0x80) |
| 81 | 82 | { |
| r9140 | r9141 | |
| 117 | 118 | /* 8-bit video, 32/64/40/80 characters per line = trs80m3, trs80m4. */ |
| 118 | 119 | VIDEO_UPDATE( trs80m4 ) |
| 119 | 120 | { |
| 121 | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 120 | 122 | UINT8 y,ra,chr,gfx,gfxbit; |
| 121 | 123 | UINT16 sy=0,ma=0,x; |
| 122 | 124 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| r9140 | r9141 | |
| 147 | 149 | |
| 148 | 150 | for (x = ma; x < ma + cols; x+=skip) |
| 149 | 151 | { |
| 150 | | chr = screen->machine->generic.videoram.u8[x+start_address]; |
| 152 | chr = videoram[x+start_address]; |
| 151 | 153 | |
| 152 | 154 | if (((chr & 0xc0) == 0xc0) && (~trs80_mode & 8)) |
| 153 | 155 | { |
| r9140 | r9141 | |
| 212 | 214 | /* 7 or 8-bit video, 64/32 characters per line = ht1080z, ht1080z2, ht108064 */ |
| 213 | 215 | VIDEO_UPDATE( ht1080z ) |
| 214 | 216 | { |
| 217 | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 215 | 218 | UINT8 y,ra,chr,gfx,gfxbit; |
| 216 | 219 | UINT16 sy=0,ma=0,x; |
| 217 | 220 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| r9140 | r9141 | |
| 232 | 235 | |
| 233 | 236 | for (x = ma; x < ma + 64; x+=skip) |
| 234 | 237 | { |
| 235 | | chr = screen->machine->generic.videoram.u8[x]; |
| 238 | chr = videoram[x]; |
| 236 | 239 | |
| 237 | 240 | if (chr & 0x80) |
| 238 | 241 | { |
| r9140 | r9141 | |
| 271 | 274 | /* 8-bit video, 64/80 characters per line = lnw80 */ |
| 272 | 275 | VIDEO_UPDATE( lnw80 ) |
| 273 | 276 | { |
| 277 | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 274 | 278 | const UINT16 rows[] = { 0, 0x200, 0x100, 0x300, 1, 0x201, 0x101, 0x301 }; |
| 275 | 279 | UINT8 chr,gfx,gfxbit,bg=7,fg=0; |
| 276 | 280 | UINT16 sy=0,ma=0,x,y,ra; |
| r9140 | r9141 | |
| 301 | 305 | |
| 302 | 306 | for (x = ma; x < ma + 64; x++) |
| 303 | 307 | { |
| 304 | | chr = screen->machine->generic.videoram.u8[x]; |
| 308 | chr = videoram[x]; |
| 305 | 309 | |
| 306 | 310 | if (chr & 0x80) |
| 307 | 311 | { |
| r9140 | r9141 | |
| 410 | 414 | for (x = 0; x < 0x40; x++) |
| 411 | 415 | { |
| 412 | 416 | gfx = trs80_gfxram[ y | x | ra]; |
| 413 | | fg = (screen->machine->generic.videoram.u8[ 0x3c00 | x | y ] & 0x38) >> 3; |
| 417 | fg = (videoram[ 0x3c00 | x | y ] & 0x38) >> 3; |
| 414 | 418 | /* Display 6 pixels in normal region */ |
| 415 | 419 | *p++ = ( gfx & 0x01 ) ? fg : bg; |
| 416 | 420 | *p++ = ( gfx & 0x02 ) ? fg : bg; |
| 417 | 421 | *p++ = ( gfx & 0x04 ) ? fg : bg; |
| 418 | | fg = screen->machine->generic.videoram.u8[ 0x3c00 | x | y ] & 0x07; |
| 422 | fg = videoram[ 0x3c00 | x | y ] & 0x07; |
| 419 | 423 | *p++ = ( gfx & 0x08 ) ? fg : bg; |
| 420 | 424 | *p++ = ( gfx & 0x10 ) ? fg : bg; |
| 421 | 425 | *p++ = ( gfx & 0x20 ) ? fg : bg; |
| r9140 | r9141 | |
| 444 | 448 | /* lores characters are in the character generator. Each character is 8x16. */ |
| 445 | 449 | VIDEO_UPDATE( radionic ) |
| 446 | 450 | { |
| 451 | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 447 | 452 | UINT8 y,ra,chr,gfx; |
| 448 | 453 | UINT16 sy=0,ma=0,x; |
| 449 | 454 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| r9140 | r9141 | |
| 464 | 469 | |
| 465 | 470 | for (x = ma; x < ma + 64; x+=skip) |
| 466 | 471 | { |
| 467 | | chr = screen->machine->generic.videoram.u8[x]; |
| 472 | chr = videoram[x]; |
| 468 | 473 | |
| 469 | 474 | /* get pattern of pixels for that character scanline */ |
| 470 | 475 | gfx = FNT[(chr<<3) | (ra & 7) | (ra & 8) << 8]; |
| r9140 | r9141 | |
| 492 | 497 | |
| 493 | 498 | READ8_HANDLER( trs80_videoram_r ) |
| 494 | 499 | { |
| 500 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 495 | 501 | if ((trs80_mode & 0x80) && (~trs80_model4 & 1)) offset |= 0x400; |
| 496 | | return space->machine->generic.videoram.u8[offset]; |
| 502 | return videoram[offset]; |
| 497 | 503 | } |
| 498 | 504 | |
| 499 | 505 | WRITE8_HANDLER( trs80_videoram_w ) |
| 500 | 506 | { |
| 507 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 501 | 508 | if ((trs80_mode & 0x80) && (~trs80_model4 & 1)) offset |= 0x400; |
| 502 | | space->machine->generic.videoram.u8[offset] = data; |
| 509 | videoram[offset] = data; |
| 503 | 510 | } |
| 504 | 511 | |
| 505 | 512 | |
src/mess/video/vtech2.c
| r9140 | r9141 | |
| 49 | 49 | |
| 50 | 50 | VIDEO_START( laser ) |
| 51 | 51 | { |
| 52 | | machine->generic.videoram_size = 0x04000; |
| 53 | 52 | } |
| 54 | 53 | |
| 55 | 54 | static const int offs_2[192] = { |
| r9140 | r9141 | |
| 123 | 122 | |
| 124 | 123 | VIDEO_UPDATE( laser ) |
| 125 | 124 | { |
| 125 | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 126 | 126 | int offs, x, y; |
| 127 | 127 | int full_refresh = 1; |
| 128 | 128 | |
| r9140 | r9141 | |
| 148 | 148 | int sx, sy, code, color = laser_two_color; |
| 149 | 149 | sy = BORDER_V/2 + y; |
| 150 | 150 | sx = BORDER_H/2 + x * 8; |
| 151 | | code = screen->machine->generic.videoram.u8[offs]; |
| 151 | code = videoram[offs]; |
| 152 | 152 | drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[2],code,color,0,0,sx,sy); |
| 153 | 153 | } |
| 154 | 154 | } |
| r9140 | r9141 | |
| 167 | 167 | int sx, sy, code, color; |
| 168 | 168 | sy = BORDER_V/2 + y; |
| 169 | 169 | sx = BORDER_H/2 + x * 16; |
| 170 | | code = screen->machine->generic.videoram.u8[offs]; |
| 171 | | color = screen->machine->generic.videoram.u8[offs+1]; |
| 170 | code = videoram[offs]; |
| 171 | color = videoram[offs+1]; |
| 172 | 172 | drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[3],code,color,0,0,sx,sy); |
| 173 | 173 | } |
| 174 | 174 | } |
| r9140 | r9141 | |
| 187 | 187 | int sx, sy, code; |
| 188 | 188 | sy = BORDER_V/2 + y; |
| 189 | 189 | sx = BORDER_H/2 + x * 8; |
| 190 | | code = screen->machine->generic.videoram.u8[offs]; |
| 190 | code = videoram[offs]; |
| 191 | 191 | drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[5],code,0,0,0,sx,sy); |
| 192 | 192 | } |
| 193 | 193 | } |
| r9140 | r9141 | |
| 207 | 207 | int sx, sy, code; |
| 208 | 208 | sy = BORDER_V/2 + y * 2; |
| 209 | 209 | sx = BORDER_H/2 + x * 8; |
| 210 | | code = screen->machine->generic.videoram.u8[offs]; |
| 210 | code = videoram[offs]; |
| 211 | 211 | drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[6],code,0,0,0,sx,sy); |
| 212 | 212 | } |
| 213 | 213 | } |
| r9140 | r9141 | |
| 226 | 226 | int sx, sy, code, color = laser_two_color; |
| 227 | 227 | sy = BORDER_V/2 + y; |
| 228 | 228 | sx = BORDER_H/2 + x * 16; |
| 229 | | code = screen->machine->generic.videoram.u8[offs]; |
| 229 | code = videoram[offs]; |
| 230 | 230 | drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[3],code,color,0,0,sx,sy); |
| 231 | 231 | } |
| 232 | 232 | } |
| r9140 | r9141 | |
| 245 | 245 | int sx, sy, code, color; |
| 246 | 246 | sy = BORDER_V/2 + y; |
| 247 | 247 | sx = BORDER_H/2 + x * 32; |
| 248 | | code = screen->machine->generic.videoram.u8[offs]; |
| 249 | | color = screen->machine->generic.videoram.u8[offs+1]; |
| 248 | code = videoram[offs]; |
| 249 | color = videoram[offs+1]; |
| 250 | 250 | drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[4],code,color,0,0,sx,sy); |
| 251 | 251 | } |
| 252 | 252 | } |
| r9140 | r9141 | |
| 267 | 267 | int sx, sy, code, color = laser_two_color; |
| 268 | 268 | sy = BORDER_V/2 + y * 8; |
| 269 | 269 | sx = BORDER_H/2 + x * 8; |
| 270 | | code = screen->machine->generic.videoram.u8[0x3800+offs]; |
| 270 | code = videoram[0x3800+offs]; |
| 271 | 271 | drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],code,color,0,0,sx,sy); |
| 272 | 272 | } |
| 273 | 273 | } |
| r9140 | r9141 | |
| 283 | 283 | int sx, sy, code, color = 0; |
| 284 | 284 | sy = BORDER_V/2 + y * 8; |
| 285 | 285 | sx = BORDER_H/2 + x * 16; |
| 286 | | code = screen->machine->generic.videoram.u8[0x3800+offs]; |
| 287 | | color = screen->machine->generic.videoram.u8[0x3801+offs]; |
| 286 | code = videoram[0x3800+offs]; |
| 287 | color = videoram[0x3801+offs]; |
| 288 | 288 | drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[1],code,color,0,0,sx,sy); |
| 289 | 289 | } |
| 290 | 290 | } |
src/mess/drivers/mbee.c
| r9140 | r9141 | |
| 95 | 95 | AM_RANGE(0x1000, 0x3fff) AM_RAM |
| 96 | 96 | AM_RANGE(0x4000, 0x7fff) AM_WRITENOP /* Needed because quickload to here will crash MESS otherwise */ |
| 97 | 97 | AM_RANGE(0x8000, 0xefff) AM_ROM |
| 98 | | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) AM_SIZE_GENERIC(videoram) |
| 98 | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) |
| 99 | 99 | AM_RANGE(0xf800, 0xffff) AM_READ_BANK("bank3") AM_WRITE(mbee_pcg_w) |
| 100 | 100 | ADDRESS_MAP_END |
| 101 | 101 | |
| r9140 | r9141 | |
| 105 | 105 | AM_RANGE(0x8000, 0xbfff) AM_ROM |
| 106 | 106 | AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("bank4") |
| 107 | 107 | AM_RANGE(0xe000, 0xefff) AM_ROM |
| 108 | | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) AM_SIZE_GENERIC(videoram) |
| 108 | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) |
| 109 | 109 | AM_RANGE(0xf800, 0xffff) AM_READ_BANK("bank3") AM_WRITE(mbee_pcg_color_w) |
| 110 | 110 | ADDRESS_MAP_END |
| 111 | 111 | |
| r9140 | r9141 | |
| 115 | 115 | AM_RANGE(0x8000, 0xbfff) AM_ROM |
| 116 | 116 | AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("bank4") |
| 117 | 117 | AM_RANGE(0xe000, 0xefff) AM_ROMBANK("bank5") |
| 118 | | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) AM_SIZE_GENERIC(videoram) |
| 118 | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) |
| 119 | 119 | AM_RANGE(0xf800, 0xffff) AM_READ_BANK("bank3") AM_WRITE(mbee_pcg_color_w) |
| 120 | 120 | ADDRESS_MAP_END |
| 121 | 121 | |
| r9140 | r9141 | |
| 125 | 125 | AM_RANGE(0x8000, 0xbfff) AM_ROM |
| 126 | 126 | AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("bank4") |
| 127 | 127 | AM_RANGE(0xe000, 0xefff) AM_ROMBANK("bank5") |
| 128 | | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) AM_SIZE_GENERIC(videoram) |
| 128 | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) |
| 129 | 129 | AM_RANGE(0xf800, 0xffff) AM_READ_BANK("bank3") AM_WRITE(mbee_pcg_color_w) |
| 130 | 130 | ADDRESS_MAP_END |
| 131 | 131 | |
| r9140 | r9141 | |
| 136 | 136 | AM_RANGE(0xa000, 0xbfff) AM_ROM |
| 137 | 137 | AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("bank4") |
| 138 | 138 | AM_RANGE(0xe000, 0xefff) AM_ROMBANK("bank5") |
| 139 | | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) AM_SIZE_GENERIC(videoram) |
| 139 | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) |
| 140 | 140 | AM_RANGE(0xf800, 0xffff) AM_READ_BANK("bank3") AM_WRITE(mbee_pcg_color_w) |
| 141 | 141 | ADDRESS_MAP_END |
| 142 | 142 | |
| r9140 | r9141 | |
| 144 | 144 | AM_RANGE(0x0000, 0x0fff) AM_RAMBANK("bank1") |
| 145 | 145 | AM_RANGE(0x1000, 0xdfff) AM_RAM |
| 146 | 146 | AM_RANGE(0xe000, 0xefff) AM_ROM |
| 147 | | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) AM_SIZE_GENERIC(videoram) |
| 147 | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) |
| 148 | 148 | AM_RANGE(0xf800, 0xffff) AM_READ_BANK("bank3") AM_WRITE(mbee_pcg_color_w) |
| 149 | 149 | ADDRESS_MAP_END |
| 150 | 150 | |
| r9140 | r9141 | |
| 152 | 152 | AM_RANGE(0x0000, 0x0fff) AM_RAMBANK("bank1") |
| 153 | 153 | AM_RANGE(0x1000, 0xdfff) AM_RAM |
| 154 | 154 | AM_RANGE(0xe000, 0xefff) AM_ROM |
| 155 | | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) AM_SIZE_GENERIC(videoram) |
| 155 | AM_RANGE(0xf000, 0xf7ff) AM_READ_BANK("bank2") AM_WRITE(mbee_videoram_w) |
| 156 | 156 | AM_RANGE(0xf800, 0xffff) AM_READ_BANK("bank3") AM_WRITE(mbee_pcg_color_w) |
| 157 | 157 | ADDRESS_MAP_END |
| 158 | 158 | |
src/mess/drivers/x1.c
| r9140 | r9141 | |
| 265 | 265 | |
| 266 | 266 | static void draw_fgtilemap(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int w) |
| 267 | 267 | { |
| 268 | UINT8 *videoram = machine->generic.videoram.u8; |
| 268 | 269 | int y,x,res_x,res_y; |
| 269 | 270 | int screen_mask; |
| 270 | 271 | |
| r9140 | r9141 | |
| 274 | 275 | { |
| 275 | 276 | for (x=0;x<40*w;x++) |
| 276 | 277 | { |
| 277 | | int tile = machine->generic.videoram.u8[(x+(y*40*w)+crtc_start_addr) & screen_mask]; |
| 278 | int tile = videoram[(x+(y*40*w)+crtc_start_addr) & screen_mask]; |
| 278 | 279 | int color = x1_colorram[(x+(y*40*w)+crtc_start_addr) & screen_mask] & 0x1f; |
| 279 | 280 | int width = (x1_colorram[(x+(y*40*w)+crtc_start_addr) & screen_mask] & 0x80)>>7; |
| 280 | 281 | int height = (x1_colorram[(x+(y*40*w)+crtc_start_addr) & screen_mask] & 0x40)>>6; |
| r9140 | r9141 | |
| 1022 | 1023 | |
| 1023 | 1024 | static READ8_HANDLER( x1_pcg_r ) |
| 1024 | 1025 | { |
| 1026 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1025 | 1027 | int addr; |
| 1026 | 1028 | int calc_pcg_offset; |
| 1027 | 1029 | static UINT32 kanji_offset; |
| r9140 | r9141 | |
| 1041 | 1043 | if(scrn_reg.pcg_mode) |
| 1042 | 1044 | { |
| 1043 | 1045 | gfx_data = memory_region(space->machine, "kanji"); |
| 1044 | | calc_pcg_offset = (space->machine->generic.videoram.u8[check_chr_addr(space->machine)]+(space->machine->generic.videoram.u8[check_chr_addr(space->machine)+0x800]<<8)) & 0xfff; |
| 1046 | calc_pcg_offset = (videoram[check_chr_addr(space->machine)]+(videoram[check_chr_addr(space->machine)+0x800]<<8)) & 0xfff; |
| 1045 | 1047 | |
| 1046 | 1048 | kanji_offset = calc_pcg_offset*0x20; |
| 1047 | 1049 | |
| r9140 | r9141 | |
| 1080 | 1082 | |
| 1081 | 1083 | static WRITE8_HANDLER( x1_pcg_w ) |
| 1082 | 1084 | { |
| 1085 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1083 | 1086 | int addr,pcg_offset; |
| 1084 | 1087 | UINT8 *PCG_RAM = memory_region(space->machine, "pcg"); |
| 1085 | 1088 | static UINT16 used_pcg_addr; |
| r9140 | r9141 | |
| 1101 | 1104 | { |
| 1102 | 1105 | if(scrn_reg.pcg_mode) |
| 1103 | 1106 | { |
| 1104 | | used_pcg_addr = space->machine->generic.videoram.u8[check_pcg_addr(space->machine)]*8; |
| 1107 | used_pcg_addr = videoram[check_pcg_addr(space->machine)]*8; |
| 1105 | 1108 | pcg_index[addr-1] = (offset & 0xe) >> 1; |
| 1106 | 1109 | pcg_offset = (pcg_index[addr-1]+used_pcg_addr) & 0x7ff; |
| 1107 | 1110 | pcg_offset+=((addr-1)*0x800); |
| r9140 | r9141 | |
| 1330 | 1333 | |
| 1331 | 1334 | static READ8_HANDLER( x1_io_r ) |
| 1332 | 1335 | { |
| 1336 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1333 | 1337 | io_bank_mode = 0; //any read disables the extended mode. |
| 1334 | 1338 | |
| 1335 | 1339 | //if(offset >= 0x0704 && offset <= 0x0707) { return z80ctc_r(space->machine->device("ctc"), offset-0x0704); } |
| r9140 | r9141 | |
| 1347 | 1351 | // else if(offset >= 0x1fd0 && offset <= 0x1fdf) { return x1_scrn_r(space,offset-0x1fd0); } |
| 1348 | 1352 | // else if(offset == 0x1fe0) { return x1_blackclip_r(space,0); } |
| 1349 | 1353 | else if(offset >= 0x2000 && offset <= 0x2fff) { return x1_colorram[offset-0x2000]; } |
| 1350 | | else if(offset >= 0x3000 && offset <= 0x3fff) { return space->machine->generic.videoram.u8[offset-0x3000]; } |
| 1354 | else if(offset >= 0x3000 && offset <= 0x3fff) { return videoram[offset-0x3000]; } |
| 1351 | 1355 | else if(offset >= 0x4000 && offset <= 0xffff) { return gfx_bitmap_ram[offset-0x4000+(scrn_reg.gfx_bank*0xc000)]; } |
| 1352 | 1356 | else |
| 1353 | 1357 | { |
| r9140 | r9141 | |
| 1358 | 1362 | |
| 1359 | 1363 | static WRITE8_HANDLER( x1_io_w ) |
| 1360 | 1364 | { |
| 1365 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1361 | 1366 | if(io_bank_mode == 1) { x1_ex_gfxram_w(space, offset, data); } |
| 1362 | 1367 | // else if(offset >= 0x0704 && offset <= 0x0707) { z80ctc_w(space->machine->device("ctc"), offset-0x0704,data); } |
| 1363 | 1368 | // else if(offset >= 0x0c00 && offset <= 0x0cff) { x1_rs232c_w(space->machine, 0, data); } |
| r9140 | r9141 | |
| 1388 | 1393 | else if(offset >= 0x1fd0 && offset <= 0x1fdf) { x1_scrn_w(space,0,data); } |
| 1389 | 1394 | // else if(offset == 0x1fe0) { x1_blackclip_w(space,0,data); } |
| 1390 | 1395 | else if(offset >= 0x2000 && offset <= 0x2fff) { x1_colorram[offset-0x2000] = data; } |
| 1391 | | else if(offset >= 0x3000 && offset <= 0x3fff) { space->machine->generic.videoram.u8[offset-0x3000] = pcg_write_addr = data; } |
| 1396 | else if(offset >= 0x3000 && offset <= 0x3fff) { videoram[offset-0x3000] = pcg_write_addr = data; } |
| 1392 | 1397 | else if(offset >= 0x4000 && offset <= 0xffff) { gfx_bitmap_ram[offset-0x4000+(scrn_reg.gfx_bank*0xc000)] = data; } |
| 1393 | 1398 | else |
| 1394 | 1399 | { |
| r9140 | r9141 | |
| 1398 | 1403 | |
| 1399 | 1404 | static READ8_HANDLER( x1turbo_io_r ) |
| 1400 | 1405 | { |
| 1406 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1401 | 1407 | io_bank_mode = 0; //any read disables the extended mode. |
| 1402 | 1408 | |
| 1403 | 1409 | if(offset == 0x0700) { return (ym2151_r(space->machine->device("ym"), offset-0x0700) & 0x7f) | (input_port_read(space->machine, "SOUND_SW") & 0x80); } |
| r9140 | r9141 | |
| 1422 | 1428 | // else if(offset >= 0x1fd0 && offset <= 0x1fdf) { return x1_scrn_r(space,offset-0x1fd0); } |
| 1423 | 1429 | else if(offset == 0x1fe0) { return x1_blackclip_r(space,0); } |
| 1424 | 1430 | else if(offset >= 0x2000 && offset <= 0x2fff) { return x1_colorram[offset-0x2000]; } |
| 1425 | | else if(offset >= 0x3000 && offset <= 0x3fff) { return space->machine->generic.videoram.u8[offset-0x3000]; } |
| 1431 | else if(offset >= 0x3000 && offset <= 0x3fff) { return videoram[offset-0x3000]; } |
| 1426 | 1432 | else if(offset >= 0x4000 && offset <= 0xffff) { return gfx_bitmap_ram[offset-0x4000+(scrn_reg.gfx_bank*0xc000)]; } |
| 1427 | 1433 | else |
| 1428 | 1434 | { |
| r9140 | r9141 | |
| 1435 | 1441 | |
| 1436 | 1442 | static WRITE8_HANDLER( x1turbo_io_w ) |
| 1437 | 1443 | { |
| 1444 | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1438 | 1445 | if(io_bank_mode == 1) { x1_ex_gfxram_w(space, offset, data); } |
| 1439 | 1446 | else if(offset == 0x0700 || offset == 0x0701) { ym2151_w(space->machine->device("ym"), offset-0x0700,data); } |
| 1440 | 1447 | else if(offset >= 0x0704 && offset <= 0x0707) { z80ctc_w(space->machine->device("ctc"), offset-0x0704,data); } |
| r9140 | r9141 | |
| 1466 | 1473 | else if(offset >= 0x1fd0 && offset <= 0x1fdf) { x1_scrn_w(space,0,data); } |
| 1467 | 1474 | else if(offset == 0x1fe0) { x1_blackclip_w(space,0,data); } |
| 1468 | 1475 | else if(offset >= 0x2000 && offset <= 0x2fff) { x1_colorram[offset-0x2000] = data; } |
| 1469 | | else if(offset >= 0x3000 && offset <= 0x3fff) { space->machine->generic.videoram.u8[offset-0x3000] = pcg_write_addr = data; } |
| 1476 | else if(offset >= 0x3000 && offset <= 0x3fff) { videoram[offset-0x3000] = pcg_write_addr = data; } |
| 1470 | 1477 | else if(offset >= 0x4000 && offset <= 0xffff) { gfx_bitmap_ram[offset-0x4000+(scrn_reg.gfx_bank*0xc000)] = data; } |
| 1471 | 1478 | else |
| 1472 | 1479 | { |
src/mess/drivers/vtech1.c
| r9140 | r9141 | |
| 167 | 167 | |
| 168 | 168 | UINT8 *ram; |
| 169 | 169 | UINT32 ram_size; |
| 170 | UINT8 *videoram; |
| 171 | size_t videoram_size; |
| 170 | 172 | |
| 171 | 173 | /* floppy */ |
| 172 | 174 | int drive; |
| r9140 | r9141 | |
| 617 | 619 | logerror("vtech1_latch_w $%02X\n", data); |
| 618 | 620 | |
| 619 | 621 | /* bit 1, SHRG mod (if installed) */ |
| 620 | | if (space->machine->generic.videoram_size == 0x2000) |
| 622 | if (vtech1->videoram_size == 0x2000) |
| 621 | 623 | { |
| 622 | 624 | mc6847_gm0_w(vtech1->mc6847, BIT(data, 1)); |
| 623 | 625 | mc6847_gm2_w(vtech1->mc6847, BIT(data, 1)); |
| r9140 | r9141 | |
| 663 | 665 | |
| 664 | 666 | static READ8_DEVICE_HANDLER( vtech1_mc6847_videoram_r ) |
| 665 | 667 | { |
| 666 | | mc6847_inv_w(device, BIT(device->machine->generic.videoram.u8[offset], 6)); |
| 667 | | mc6847_as_w(device, BIT(device->machine->generic.videoram.u8[offset], 7)); |
| 668 | vtech1_state *vtech1 = device->machine->driver_data<vtech1_state>(); |
| 669 | mc6847_inv_w(device, BIT(vtech1->videoram[offset], 6)); |
| 670 | mc6847_as_w(device, BIT(vtech1->videoram[offset], 7)); |
| 668 | 671 | |
| 669 | | return device->machine->generic.videoram.u8[offset]; |
| 672 | return vtech1->videoram[offset]; |
| 670 | 673 | } |
| 671 | 674 | |
| 672 | 675 | static VIDEO_UPDATE( vtech1 ) |
| r9140 | r9141 | |
| 742 | 745 | |
| 743 | 746 | static DRIVER_INIT( vtech1h ) |
| 744 | 747 | { |
| 748 | vtech1_state *vtech1 = machine->driver_data<vtech1_state>(); |
| 745 | 749 | address_space *prg = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 746 | 750 | |
| 747 | 751 | DRIVER_INIT_CALL(vtech1); |
| 748 | 752 | |
| 749 | 753 | /* the SHRG mod replaces the standard videoram chip with an 8k chip */ |
| 750 | | machine->generic.videoram_size = 0x2000; |
| 751 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, machine->generic.videoram_size); |
| 754 | vtech1->videoram_size = 0x2000; |
| 755 | vtech1->videoram = auto_alloc_array(machine, UINT8, vtech1->videoram_size); |
| 752 | 756 | |
| 753 | 757 | memory_install_readwrite_bank(prg, 0x7000, 0x77ff, 0, 0, "bank4"); |
| 754 | | memory_configure_bank(machine, "bank4", 0, 4, machine->generic.videoram.u8, 0x800); |
| 758 | memory_configure_bank(machine, "bank4", 0, 4, vtech1->videoram, 0x800); |
| 755 | 759 | memory_set_bank(machine, "bank4", 0); |
| 756 | 760 | } |
| 757 | 761 | |
| r9140 | r9141 | |
| 764 | 768 | AM_RANGE(0x4000, 0x5fff) AM_ROM /* dos rom or other catridges */ |
| 765 | 769 | AM_RANGE(0x6000, 0x67ff) AM_ROM /* reserved for cartridges */ |
| 766 | 770 | AM_RANGE(0x6800, 0x6fff) AM_READWRITE(vtech1_keyboard_r, vtech1_latch_w) |
| 767 | | AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE_SIZE_GENERIC(videoram) /* (6847) */ |
| 771 | AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE_MEMBER(vtech1_state, videoram) /* (6847) */ |
| 768 | 772 | AM_RANGE(0x7800, 0x7fff) AM_RAMBANK("bank1") /* 2k user ram */ |
| 769 | 773 | AM_RANGE(0x8000, 0xbfff) AM_NOP /* 16k ram expansion */ |
| 770 | 774 | AM_RANGE(0xc000, 0xffff) AM_NOP |
| r9140 | r9141 | |
| 775 | 779 | AM_RANGE(0x4000, 0x5fff) AM_ROM /* dos rom or other catridges */ |
| 776 | 780 | AM_RANGE(0x6000, 0x67ff) AM_ROM /* reserved for cartridges */ |
| 777 | 781 | AM_RANGE(0x6800, 0x6fff) AM_READWRITE(vtech1_keyboard_r, vtech1_latch_w) |
| 778 | | AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE_SIZE_GENERIC(videoram) /* U7 (6847) */ |
| 782 | AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE_MEMBER(vtech1_state, videoram) /* U7 (6847) */ |
| 779 | 783 | AM_RANGE(0x7800, 0x8fff) AM_RAMBANK("bank1") /* 6k user ram */ |
| 780 | 784 | AM_RANGE(0x9000, 0xcfff) AM_NOP /* 16k ram expansion */ |
| 781 | 785 | AM_RANGE(0xd000, 0xffff) AM_NOP |
| r9140 | r9141 | |
| 786 | 790 | AM_RANGE(0x4000, 0x5fff) AM_ROM /* dos rom or other catridges */ |
| 787 | 791 | AM_RANGE(0x6000, 0x67ff) AM_ROM /* reserved for cartridges */ |
| 788 | 792 | AM_RANGE(0x6800, 0x6fff) AM_READWRITE(vtech1_keyboard_r, vtech1_latch_w) |
| 789 | | AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE_SIZE_GENERIC(videoram) /* (6847) */ |
| 793 | AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE_MEMBER(vtech1_state, videoram) /* (6847) */ |
| 790 | 794 | AM_RANGE(0x7800, 0xb7ff) AM_RAMBANK("bank1") /* 16k user ram */ |
| 791 | 795 | AM_RANGE(0xb800, 0xf7ff) AM_NOP /* 16k ram expansion */ |
| 792 | 796 | AM_RANGE(0xf8ff, 0xffff) AM_NOP |