src/mess/machine/dgn_beta.c
| r9143 | r9144 | |
| 357 | 357 | // |
| 358 | 358 | static void SetDefaultTask(running_machine *machine) |
| 359 | 359 | { |
| 360 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 360 | dgn_beta_state *state = machine->driver_data<dgn_beta_state>(); |
| 361 | UINT8 *videoram = state->videoram; |
| 361 | 362 | int Idx; |
| 362 | 363 | |
| 363 | 364 | LOG_DEFAULT_TASK(("SetDefaultTask()\n")); |
| r9143 | r9144 | |
| 1071 | 1072 | /********************************* Machine/Driver Initialization ****************************************/ |
| 1072 | 1073 | static void dgnbeta_reset(running_machine &machine) |
| 1073 | 1074 | { |
| 1075 | dgn_beta_state *state = machine.driver_data<dgn_beta_state>(); |
| 1074 | 1076 | running_device *fdc = machine.device(FDC_TAG); |
| 1075 | 1077 | running_device *pia_0 = machine.device( PIA_0_TAG ); |
| 1076 | 1078 | running_device *pia_1 = machine.device( PIA_1_TAG ); |
| r9143 | r9144 | |
| 1113 | 1115 | wd17xx_dden_w(fdc, CLEAR_LINE); |
| 1114 | 1116 | wd17xx_set_drive(fdc, 0); |
| 1115 | 1117 | |
| 1116 | | machine.generic.videoram.u8 = messram_get_ptr(machine.device("messram")); /* Point video ram at the start of physical ram */ |
| 1118 | state->videoram = messram_get_ptr(machine.device("messram")); /* Point video ram at the start of physical ram */ |
| 1117 | 1119 | |
| 1118 | 1120 | dgnbeta_video_reset(&machine); |
| 1119 | 1121 | wd17xx_reset(fdc); |
src/mess/machine/mz700.c
| r9143 | r9144 | |
| 82 | 82 | |
| 83 | 83 | DRIVER_INIT( mz700 ) |
| 84 | 84 | { |
| 85 | mz_state *state = machine->driver_data<mz_state>(); |
| 85 | 86 | mz_state *mz = machine->driver_data<mz_state>(); |
| 86 | 87 | mz->mz700 = TRUE; |
| 87 | 88 | mz->mz700_mode = TRUE; |
| 88 | 89 | |
| 89 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x800); |
| 90 | state->videoram = auto_alloc_array(machine, UINT8, 0x800); |
| 90 | 91 | mz->colorram = auto_alloc_array(machine, UINT8, 0x800); |
| 91 | 92 | } |
| 92 | 93 | |
| 93 | 94 | DRIVER_INIT( mz800 ) |
| 94 | 95 | { |
| 96 | mz_state *state = machine->driver_data<mz_state>(); |
| 95 | 97 | mz_state *mz = machine->driver_data<mz_state>(); |
| 96 | 98 | mz->mz700 = FALSE; |
| 97 | 99 | mz->mz700_mode = FALSE; |
| 98 | 100 | |
| 99 | 101 | /* video ram */ |
| 100 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x4000); |
| 101 | | mz->colorram = machine->generic.videoram.u8 + 0x800; |
| 102 | state->videoram = auto_alloc_array(machine, UINT8, 0x4000); |
| 103 | mz->colorram = state->videoram + 0x800; |
| 102 | 104 | |
| 103 | 105 | /* character generator ram */ |
| 104 | 106 | mz->cgram = auto_alloc_array(machine, UINT8, 0x1000); |
| r9143 | r9144 | |
| 147 | 149 | |
| 148 | 150 | READ8_HANDLER( mz800_bank_0_r ) |
| 149 | 151 | { |
| 150 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 152 | mz_state *state = space->machine->driver_data<mz_state>(); |
| 153 | UINT8 *videoram = state->videoram; |
| 151 | 154 | address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 152 | 155 | mz_state *mz = space->machine->driver_data<mz_state>(); |
| 153 | 156 | |
| r9143 | r9144 | |
| 265 | 268 | |
| 266 | 269 | WRITE8_HANDLER( mz700_bank_3_w ) |
| 267 | 270 | { |
| 268 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 271 | mz_state *state = space->machine->driver_data<mz_state>(); |
| 272 | UINT8 *videoram = state->videoram; |
| 269 | 273 | address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 270 | 274 | mz_state *mz = space->machine->driver_data<mz_state>(); |
| 271 | 275 | |
| r9143 | r9144 | |
| 313 | 317 | |
| 314 | 318 | WRITE8_HANDLER( mz700_bank_4_w ) |
| 315 | 319 | { |
| 316 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 320 | mz_state *state = space->machine->driver_data<mz_state>(); |
| 321 | UINT8 *videoram = state->videoram; |
| 317 | 322 | address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 318 | 323 | mz_state *mz = space->machine->driver_data<mz_state>(); |
| 319 | 324 | |
src/mess/machine/cgenie.c
| r9143 | r9144 | |
| 132 | 132 | |
| 133 | 133 | MACHINE_START( cgenie ) |
| 134 | 134 | { |
| 135 | cgenie_state *state = machine->driver_data<cgenie_state>(); |
| 135 | 136 | address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 136 | 137 | UINT8 *gfx = memory_region(machine, "gfx2"); |
| 137 | 138 | int i; |
| r9143 | r9144 | |
| 155 | 156 | /* set up RAM */ |
| 156 | 157 | memory_install_read_bank(space, 0x4000, 0x4000 + messram_get_size(machine->device("messram")) - 1, 0, 0, "bank1"); |
| 157 | 158 | memory_install_write8_handler(space, 0x4000, 0x4000 + messram_get_size(machine->device("messram")) - 1, 0, 0, cgenie_videoram_w); |
| 158 | | machine->generic.videoram.u8 = messram_get_ptr(machine->device("messram")); |
| 159 | state->videoram = messram_get_ptr(machine->device("messram")); |
| 159 | 160 | memory_set_bankptr(machine, "bank1", messram_get_ptr(machine->device("messram"))); |
| 160 | 161 | timer_pulse(machine, ATTOTIME_IN_HZ(11025), NULL, 0, handle_cassette_input ); |
| 161 | 162 | } |
| r9143 | r9144 | |
| 520 | 521 | |
| 521 | 522 | int cgenie_videoram_r( running_machine *machine, int offset ) |
| 522 | 523 | { |
| 523 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 524 | cgenie_state *state = machine->driver_data<cgenie_state>(); |
| 525 | UINT8 *videoram = state->videoram; |
| 524 | 526 | return videoram[offset]; |
| 525 | 527 | } |
| 526 | 528 | |
| 527 | 529 | WRITE8_HANDLER( cgenie_videoram_w ) |
| 528 | 530 | { |
| 529 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 531 | cgenie_state *state = space->machine->driver_data<cgenie_state>(); |
| 532 | UINT8 *videoram = state->videoram; |
| 530 | 533 | /* write to video RAM */ |
| 531 | 534 | if( data == videoram[offset] ) |
| 532 | 535 | return; /* no change */ |
src/mess/machine/pc.c
| r9143 | r9144 | |
| 1234 | 1234 | memory_install_read16_handler( space, 0xb0000, 0xbffff, 0, 0, pc200_videoram16le_r ); |
| 1235 | 1235 | memory_install_write16_handler( space, 0xb0000, 0xbffff, 0, 0, pc200_videoram16le_w ); |
| 1236 | 1236 | pc_videoram_size = 0x10000; |
| 1237 | | machine->generic.videoram.u8 = memory_region(machine, "maincpu")+0xb0000; |
| 1237 | pc_videoram = memory_region(machine, "maincpu")+0xb0000; |
| 1238 | 1238 | mess_init_pc_common(machine, PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line); |
| 1239 | 1239 | } |
| 1240 | 1240 | |
| r9143 | r9144 | |
| 1251 | 1251 | memory_install_read16_handler( space, 0xb0000, 0xbffff, 0, 0, pc200_videoram16le_r ); |
| 1252 | 1252 | memory_install_write16_handler( space, 0xb0000, 0xbffff, 0, 0, pc200_videoram16le_w ); |
| 1253 | 1253 | pc_videoram_size = 0x10000; |
| 1254 | | machine->generic.videoram.u8 = memory_region(machine, "maincpu")+0xb0000; |
| 1254 | pc_videoram = memory_region(machine, "maincpu")+0xb0000; |
| 1255 | 1255 | mess_init_pc_common(machine, PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line); |
| 1256 | 1256 | mc146818_init(machine, MC146818_IGNORE_CENTURY); |
| 1257 | 1257 | } |
src/mess/video/dgn_beta.c
| r9143 | r9144 | |
| 308 | 308 | /* Video init */ |
| 309 | 309 | void dgnbeta_init_video(running_machine *machine) |
| 310 | 310 | { |
| 311 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 311 | dgn_beta_state *state = machine->driver_data<dgn_beta_state>(); |
| 312 | UINT8 *videoram = state->videoram; |
| 312 | 313 | /* initialise 6845 */ |
| 313 | 314 | m6845_config(&beta_m6845_interface); |
| 314 | 315 | m6845_set_personality(M6845_PERSONALITY_HD6845S); |
| r9143 | r9144 | |
| 391 | 392 | |
| 392 | 393 | static void beta_plot_char_line(running_machine *machine, int x,int y, bitmap_t *bitmap) |
| 393 | 394 | { |
| 394 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 395 | dgn_beta_state *state = machine->driver_data<dgn_beta_state>(); |
| 396 | UINT8 *videoram = state->videoram; |
| 395 | 397 | int CharsPerLine = m6845_get_register(H_DISPLAYED); // Get chars per line. |
| 396 | 398 | unsigned char *data = memory_region(machine, "gfx1"); // ptr to char rom |
| 397 | 399 | int Dot; |
| r9143 | r9144 | |
| 539 | 541 | |
| 540 | 542 | static void beta_plot_gfx_line(running_machine *machine,int x,int y, bitmap_t *bitmap) |
| 541 | 543 | { |
| 542 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 544 | dgn_beta_state *state = machine->driver_data<dgn_beta_state>(); |
| 545 | UINT8 *videoram = state->videoram; |
| 543 | 546 | int crtcAddr; |
| 544 | 547 | int Addr; |
| 545 | 548 | int Red; |
src/mess/video/mbee.c
| r9143 | r9144 | |
| 88 | 88 | |
| 89 | 89 | WRITE8_HANDLER ( mbee_videoram_w ) |
| 90 | 90 | { |
| 91 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 91 | mbee_state *state = space->machine->driver_data<mbee_state>(); |
| 92 | UINT8 *videoram = state->videoram; |
| 92 | 93 | videoram[offset] = data; |
| 93 | 94 | } |
| 94 | 95 | |
| r9143 | r9144 | |
| 479 | 480 | |
| 480 | 481 | VIDEO_START( mbee ) |
| 481 | 482 | { |
| 483 | mbee_state *state = machine->driver_data<mbee_state>(); |
| 482 | 484 | UINT8 *ram = memory_region(machine, "maincpu"); |
| 483 | | machine->generic.videoram.u8 = ram+0x15000; |
| 485 | state->videoram = ram+0x15000; |
| 484 | 486 | mbee_pcgram = ram+0x11000; |
| 485 | 487 | } |
| 486 | 488 | |
| 487 | 489 | VIDEO_START( mbeeic ) |
| 488 | 490 | { |
| 491 | mbee_state *state = machine->driver_data<mbee_state>(); |
| 489 | 492 | UINT8 *ram = memory_region(machine, "maincpu"); |
| 490 | | machine->generic.videoram.u8 = ram+0x15000; |
| 493 | state->videoram = ram+0x15000; |
| 491 | 494 | colorram = ram+0x15800; |
| 492 | 495 | mbee_pcgram = ram+0x11000; |
| 493 | 496 | } |
| 494 | 497 | |
| 495 | 498 | VIDEO_UPDATE( mbee ) |
| 496 | 499 | { |
| 497 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 500 | mbee_state *state = screen->machine->driver_data<mbee_state>(); |
| 501 | UINT8 *videoram = state->videoram; |
| 498 | 502 | UINT8 y,ra,chr,gfx; |
| 499 | 503 | UINT16 mem,sy=0,ma=0,x; |
| 500 | 504 | UINT8 speed = crt.cursor_top&0x20, flash = crt.cursor_top&0x40; // cursor modes |
| r9143 | r9144 | |
| 551 | 555 | |
| 552 | 556 | VIDEO_UPDATE( mbeeic ) |
| 553 | 557 | { |
| 554 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 558 | mbee_state *state = screen->machine->driver_data<mbee_state>(); |
| 559 | UINT8 *videoram = state->videoram; |
| 555 | 560 | UINT8 y,ra,chr,gfx,fg,bg; |
| 556 | 561 | UINT16 mem,sy=0,ma=0,x,col; |
| 557 | 562 | UINT8 speed = crt.cursor_top&0x20, flash = crt.cursor_top&0x40; // cursor modes |
src/mess/video/cgenie.c
| r9143 | r9144 | |
| 241 | 241 | |
| 242 | 242 | static void cgenie_refresh_monitor(running_machine *machine, bitmap_t * bitmap, const rectangle *cliprect) |
| 243 | 243 | { |
| 244 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 244 | cgenie_state *state = machine->driver_data<cgenie_state>(); |
| 245 | UINT8 *videoram = state->videoram; |
| 245 | 246 | int i, address, offset, cursor, size, code, x, y; |
| 246 | 247 | rectangle r; |
| 247 | 248 | |
| r9143 | r9144 | |
| 320 | 321 | |
| 321 | 322 | static void cgenie_refresh_tv_set(running_machine *machine, bitmap_t * bitmap, const rectangle *cliprect) |
| 322 | 323 | { |
| 323 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 324 | cgenie_state *state = machine->driver_data<cgenie_state>(); |
| 325 | UINT8 *videoram = state->videoram; |
| 324 | 326 | int i, address, offset, cursor, size, code, x, y; |
| 325 | 327 | rectangle r; |
| 326 | 328 | |
src/mess/video/kaypro.c
| r9143 | r9144 | |
| 27 | 27 | |
| 28 | 28 | VIDEO_UPDATE( kayproii ) |
| 29 | 29 | { |
| 30 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 30 | kaypro_state *state = screen->machine->driver_data<kaypro_state>(); |
| 31 | UINT8 *videoram = state->videoram; |
| 31 | 32 | /* The display consists of 80 columns and 24 rows. Each row is allocated 128 bytes of ram, |
| 32 | 33 | but only the first 80 are used. The total video ram therefore is 0x0c00 bytes. |
| 33 | 34 | There is one video attribute: bit 7 causes blinking. The first half of the |
| r9143 | r9144 | |
| 81 | 82 | |
| 82 | 83 | VIDEO_UPDATE( omni2 ) |
| 83 | 84 | { |
| 84 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 85 | kaypro_state *state = screen->machine->driver_data<kaypro_state>(); |
| 86 | UINT8 *videoram = state->videoram; |
| 85 | 87 | static UINT8 framecnt=0; |
| 86 | 88 | UINT8 y,ra,chr,gfx; |
| 87 | 89 | UINT16 sy=0,ma=0,x; |
| r9143 | r9144 | |
| 149 | 151 | |
| 150 | 152 | MC6845_UPDATE_ROW( kaypro2x_update_row ) |
| 151 | 153 | { |
| 152 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 154 | kaypro_state *state = device->machine->driver_data<kaypro_state>(); |
| 155 | UINT8 *videoram = state->videoram; |
| 153 | 156 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 154 | 157 | |
| 155 | 158 | for (x = 0; x < x_count; x++) // for each character |
| r9143 | r9144 | |
| 306 | 309 | |
| 307 | 310 | READ8_HANDLER( kaypro_videoram_r ) |
| 308 | 311 | { |
| 309 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 312 | kaypro_state *state = space->machine->driver_data<kaypro_state>(); |
| 313 | UINT8 *videoram = state->videoram; |
| 310 | 314 | return videoram[offset]; |
| 311 | 315 | } |
| 312 | 316 | |
| 313 | 317 | WRITE8_HANDLER( kaypro_videoram_w ) |
| 314 | 318 | { |
| 315 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 319 | kaypro_state *state = space->machine->driver_data<kaypro_state>(); |
| 320 | UINT8 *videoram = state->videoram; |
| 316 | 321 | videoram[offset] = data; |
| 317 | 322 | } |
| 318 | 323 | |
| 319 | 324 | READ8_HANDLER( kaypro2x_videoram_r ) |
| 320 | 325 | { |
| 321 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 326 | kaypro_state *state = space->machine->driver_data<kaypro_state>(); |
| 327 | UINT8 *videoram = state->videoram; |
| 322 | 328 | return videoram[mc6845_video_address]; |
| 323 | 329 | } |
| 324 | 330 | |
| 325 | 331 | WRITE8_HANDLER( kaypro2x_videoram_w ) |
| 326 | 332 | { |
| 327 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 333 | kaypro_state *state = space->machine->driver_data<kaypro_state>(); |
| 334 | UINT8 *videoram = state->videoram; |
| 328 | 335 | videoram[mc6845_video_address] = data; |
| 329 | 336 | } |
| 330 | 337 | |
src/mess/video/super80.c
| r9143 | r9144 | |
| 302 | 302 | |
| 303 | 303 | READ8_HANDLER( super80v_low_r ) |
| 304 | 304 | { |
| 305 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 305 | super80_state *state = space->machine->driver_data<super80_state>(); |
| 306 | UINT8 *videoram = state->videoram; |
| 306 | 307 | if (super80_shared & 4) |
| 307 | 308 | return videoram[offset]; |
| 308 | 309 | else |
| r9143 | r9144 | |
| 311 | 312 | |
| 312 | 313 | WRITE8_HANDLER( super80v_low_w ) |
| 313 | 314 | { |
| 314 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 315 | super80_state *state = space->machine->driver_data<super80_state>(); |
| 316 | UINT8 *videoram = state->videoram; |
| 315 | 317 | if (super80_shared & 4) |
| 316 | 318 | videoram[offset] = data; |
| 317 | 319 | else |
| r9143 | r9144 | |
| 331 | 333 | |
| 332 | 334 | WRITE8_HANDLER( super80v_high_w ) |
| 333 | 335 | { |
| 334 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 336 | super80_state *state = space->machine->driver_data<super80_state>(); |
| 337 | UINT8 *videoram = state->videoram; |
| 335 | 338 | if (~super80_shared & 4) |
| 336 | 339 | super80_colorram[offset+0x800] = data; |
| 337 | 340 | else |
| r9143 | r9144 | |
| 415 | 418 | |
| 416 | 419 | MC6845_UPDATE_ROW( super80v_update_row ) |
| 417 | 420 | { |
| 418 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 421 | super80_state *state = device->machine->driver_data<super80_state>(); |
| 422 | UINT8 *videoram = state->videoram; |
| 419 | 423 | UINT8 chr,col,gfx,fg,bg=0; |
| 420 | 424 | UINT16 mem,x; |
| 421 | 425 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
src/mess/video/pc_mda.c
| r9143 | r9144 | |
| 123 | 123 | mda.chr_gen = memory_region( machine, "gfx1" ); |
| 124 | 124 | |
| 125 | 125 | pc_videoram_size = 0x1000; /* This is actually 0x1000 in reality */ |
| 126 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x1000); |
| 127 | | memory_set_bankptr(machine,"bank11", machine->generic.videoram.u8); |
| 126 | pc_videoram = auto_alloc_array(machine, UINT8, 0x1000); |
| 127 | memory_set_bankptr(machine,"bank11", pc_videoram); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | |
| r9143 | r9144 | |
| 144 | 144 | |
| 145 | 145 | static MC6845_UPDATE_ROW( mda_text_inten_update_row ) |
| 146 | 146 | { |
| 147 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 147 | UINT8 *videoram = pc_videoram; |
| 148 | 148 | UINT16 *p = BITMAP_ADDR16( bitmap, y, 0 ); |
| 149 | 149 | UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; |
| 150 | 150 | int i; |
| r9143 | r9144 | |
| 218 | 218 | |
| 219 | 219 | static MC6845_UPDATE_ROW( mda_text_blink_update_row ) |
| 220 | 220 | { |
| 221 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 221 | UINT8 *videoram = pc_videoram; |
| 222 | 222 | UINT16 *p = BITMAP_ADDR16( bitmap, y, 0 ); |
| 223 | 223 | UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; |
| 224 | 224 | int i; |
| r9143 | r9144 | |
| 477 | 477 | mda.chr_gen = memory_region( machine, "gfx1" ); |
| 478 | 478 | |
| 479 | 479 | pc_videoram_size = 0x10000; |
| 480 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x10000); |
| 481 | | memory_set_bankptr(machine,"bank11", machine->generic.videoram.u8); |
| 480 | pc_videoram = auto_alloc_array(machine, UINT8, 0x10000); |
| 481 | memory_set_bankptr(machine,"bank11", pc_videoram); |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | 484 | |
| r9143 | r9144 | |
| 491 | 491 | |
| 492 | 492 | static MC6845_UPDATE_ROW( hercules_gfx_update_row ) |
| 493 | 493 | { |
| 494 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 494 | UINT8 *videoram = pc_videoram; |
| 495 | 495 | UINT16 *p = BITMAP_ADDR16( bitmap, y, 0 ); |
| 496 | 496 | UINT16 gfx_base = ( ( mda.mode_control & 0x80 ) ? 0x8000 : 0x0000 ) | ( ( ra & 0x03 ) << 13 ); |
| 497 | 497 | int i; |
src/mess/video/pc_aga.c
| r9143 | r9144 | |
| 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 | UINT8 *videoram = pc_videoram; |
| 128 | 128 | UINT16 *p = BITMAP_ADDR16( bitmap, y, 0 ); |
| 129 | 129 | UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; |
| 130 | 130 | int i; |
| r9143 | r9144 | |
| 183 | 183 | |
| 184 | 184 | |
| 185 | 185 | static MC6845_UPDATE_ROW( mda_text_blink_update_row ) { |
| 186 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 186 | UINT8 *videoram = pc_videoram; |
| 187 | 187 | UINT16 *p = BITMAP_ADDR16( bitmap, y, 0 ); |
| 188 | 188 | UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; |
| 189 | 189 | int i; |
| r9143 | r9144 | |
| 243 | 243 | |
| 244 | 244 | |
| 245 | 245 | static MC6845_UPDATE_ROW( cga_text_inten_update_row ) { |
| 246 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 246 | UINT8 *videoram = pc_videoram; |
| 247 | 247 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 248 | 248 | int i; |
| 249 | 249 | |
| r9143 | r9144 | |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) { |
| 275 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 275 | UINT8 *videoram = pc_videoram; |
| 276 | 276 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 277 | 277 | int i; |
| 278 | 278 | |
| r9143 | r9144 | |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | static MC6845_UPDATE_ROW( cga_text_blink_update_row ) { |
| 303 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 303 | UINT8 *videoram = pc_videoram; |
| 304 | 304 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 305 | 305 | int i; |
| 306 | 306 | |
| r9143 | r9144 | |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) { |
| 335 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 335 | UINT8 *videoram = pc_videoram; |
| 336 | 336 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 337 | 337 | int i; |
| 338 | 338 | |
| r9143 | r9144 | |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) { |
| 369 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 369 | UINT8 *videoram = pc_videoram; |
| 370 | 370 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 371 | 371 | int i; |
| 372 | 372 | |
| r9143 | r9144 | |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) { |
| 393 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 393 | UINT8 *videoram = pc_videoram; |
| 394 | 394 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 395 | 395 | int i; |
| 396 | 396 | |
| r9143 | r9144 | |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) { |
| 425 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 425 | UINT8 *videoram = pc_videoram; |
| 426 | 426 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 427 | 427 | int i; |
| 428 | 428 | |
| r9143 | r9144 | |
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 | static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row ) { |
| 449 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 449 | UINT8 *videoram = pc_videoram; |
| 450 | 450 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 451 | 451 | UINT8 fg = aga.cga_color_select & 0x0F; |
| 452 | 452 | int i; |
| r9143 | r9144 | |
| 777 | 777 | |
| 778 | 778 | READ8_HANDLER( pc_aga_videoram_r ) |
| 779 | 779 | { |
| 780 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 780 | UINT8 *videoram = pc_videoram; |
| 781 | 781 | switch (aga.mode) { |
| 782 | 782 | case AGA_COLOR: |
| 783 | 783 | if (offset>=0x8000) return videoram[offset-0x8000]; |
| r9143 | r9144 | |
| 791 | 791 | |
| 792 | 792 | READ8_HANDLER( pc200_videoram_r ) |
| 793 | 793 | { |
| 794 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 794 | UINT8 *videoram = pc_videoram; |
| 795 | 795 | switch (aga.mode) |
| 796 | 796 | { |
| 797 | 797 | default: |
src/mess/video/pc_cga.c
| r9143 | r9144 | |
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | pc_videoram_size = 0x4000; |
| 498 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x4000); |
| 498 | pc_videoram = auto_alloc_array(machine, UINT8, 0x4000); |
| 499 | 499 | |
| 500 | | memory_set_bankptr(machine,"bank11", machine->generic.videoram.u8); |
| 500 | memory_set_bankptr(machine,"bank11", pc_videoram); |
| 501 | 501 | |
| 502 | 502 | internal_pc_cga_video_start(machine, M6845_PERSONALITY_GENUINE); |
| 503 | 503 | |
| r9143 | r9144 | |
| 558 | 558 | |
| 559 | 559 | static MC6845_UPDATE_ROW( cga_text_inten_update_row ) |
| 560 | 560 | { |
| 561 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 561 | UINT8 *videoram = pc_videoram; |
| 562 | 562 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 563 | 563 | int i; |
| 564 | 564 | running_machine *machine = device->machine; |
| r9143 | r9144 | |
| 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 | UINT8 *videoram = pc_videoram; |
| 601 | 601 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 602 | 602 | int i; |
| 603 | 603 | running_machine *machine = device->machine; |
| r9143 | r9144 | |
| 635 | 635 | |
| 636 | 636 | static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) |
| 637 | 637 | { |
| 638 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 638 | UINT8 *videoram = pc_videoram; |
| 639 | 639 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 640 | 640 | int i; |
| 641 | 641 | running_machine *machine = device->machine; |
| r9143 | r9144 | |
| 673 | 673 | |
| 674 | 674 | static MC6845_UPDATE_ROW( cga_text_blink_update_row ) |
| 675 | 675 | { |
| 676 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 676 | UINT8 *videoram = pc_videoram; |
| 677 | 677 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 678 | 678 | int i; |
| 679 | 679 | running_machine *machine = device->machine; |
| r9143 | r9144 | |
| 722 | 722 | |
| 723 | 723 | static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) |
| 724 | 724 | { |
| 725 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 725 | UINT8 *videoram = pc_videoram; |
| 726 | 726 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 727 | 727 | int i; |
| 728 | 728 | running_machine *machine = device->machine; |
| r9143 | r9144 | |
| 769 | 769 | |
| 770 | 770 | static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) |
| 771 | 771 | { |
| 772 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 772 | UINT8 *videoram = pc_videoram; |
| 773 | 773 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 774 | 774 | int i; |
| 775 | 775 | running_machine *machine = device->machine; |
| r9143 | r9144 | |
| 826 | 826 | |
| 827 | 827 | static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) |
| 828 | 828 | { |
| 829 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 829 | UINT8 *videoram = pc_videoram; |
| 830 | 830 | UINT8 samples[1280]; |
| 831 | 831 | UINT8 ntsc_decoded[3*1280]; |
| 832 | 832 | int samp_index = 0; |
| r9143 | r9144 | |
| 933 | 933 | |
| 934 | 934 | static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) |
| 935 | 935 | { |
| 936 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 936 | UINT8 *videoram = pc_videoram; |
| 937 | 937 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 938 | 938 | int i; |
| 939 | 939 | running_machine *machine = device->machine; |
| r9143 | r9144 | |
| 968 | 968 | |
| 969 | 969 | static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row ) |
| 970 | 970 | { |
| 971 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 971 | UINT8 *videoram = pc_videoram; |
| 972 | 972 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 973 | 973 | UINT8 fg = cga.color_select & 0x0F; |
| 974 | 974 | int i; |
| r9143 | r9144 | |
| 1559 | 1559 | |
| 1560 | 1560 | static MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row ) |
| 1561 | 1561 | { |
| 1562 | | UINT8 *videoram = device->machine->generic.videoram.u8; |
| 1562 | UINT8 *videoram = pc_videoram; |
| 1563 | 1563 | UINT16 *p = BITMAP_ADDR16(bitmap, y, 0); |
| 1564 | 1564 | UINT16 offset_base = ra << 13; |
| 1565 | 1565 | int j; |
| r9143 | r9144 | |
| 1588 | 1588 | |
| 1589 | 1589 | static WRITE8_HANDLER ( pc1512_w ) |
| 1590 | 1590 | { |
| 1591 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1591 | UINT8 *videoram = pc_videoram; |
| 1592 | 1592 | running_device *devconf = space->machine->device(CGA_MC6845_NAME); |
| 1593 | 1593 | |
| 1594 | 1594 | switch (offset) |
| r9143 | r9144 | |
| 1710 | 1710 | |
| 1711 | 1711 | static WRITE8_HANDLER ( pc1512_videoram_w ) |
| 1712 | 1712 | { |
| 1713 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1713 | UINT8 *videoram = pc_videoram; |
| 1714 | 1714 | if ( ( cga.mode_control & 0x12 ) == 0x12 ) |
| 1715 | 1715 | { |
| 1716 | 1716 | if (pc1512.write & 1) |
| r9143 | r9144 | |
| 1739 | 1739 | static VIDEO_START( pc1512 ) |
| 1740 | 1740 | { |
| 1741 | 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]); |
| 1742 | pc_videoram = auto_alloc_array(machine, UINT8, 0x10000 ); |
| 1743 | memory_set_bankptr(machine, "bank1", pc_videoram + videoram_offset[0]); |
| 1744 | 1744 | |
| 1745 | 1745 | memset( &pc1512, 0, sizeof ( pc1512 ) ); |
| 1746 | 1746 | pc1512.write = 0xf; |
src/mess/video/samcoupe.c
| r9143 | r9144 | |
| 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 | samcoupe_state *state = machine->driver_data<samcoupe_state>(); |
| 32 | UINT8 *videoram = state->videoram; |
| 32 | 33 | samcoupe_state *asic = machine->driver_data<samcoupe_state>(); |
| 33 | 34 | |
| 34 | 35 | /* get start address */ |
| r9143 | r9144 | |
| 53 | 54 | |
| 54 | 55 | static void draw_mode3_line(running_machine *machine, int y, int hpos) |
| 55 | 56 | { |
| 56 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 57 | samcoupe_state *state = machine->driver_data<samcoupe_state>(); |
| 58 | UINT8 *videoram = state->videoram; |
| 57 | 59 | samcoupe_state *asic = machine->driver_data<samcoupe_state>(); |
| 58 | 60 | |
| 59 | 61 | /* get start address */ |
| r9143 | r9144 | |
| 92 | 94 | |
| 93 | 95 | static void draw_mode2_line(running_machine *machine, int y, int hpos) |
| 94 | 96 | { |
| 95 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 97 | samcoupe_state *state = machine->driver_data<samcoupe_state>(); |
| 98 | UINT8 *videoram = state->videoram; |
| 96 | 99 | samcoupe_state *asic = machine->driver_data<samcoupe_state>(); |
| 97 | 100 | |
| 98 | 101 | int cell = (y - SAM_BORDER_TOP) * 32 + (hpos - SAM_BORDER_LEFT) / SAM_BLOCK / 2; |
| r9143 | r9144 | |
| 105 | 108 | |
| 106 | 109 | static void draw_mode1_line(running_machine *machine, int y, int hpos) |
| 107 | 110 | { |
| 108 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 111 | samcoupe_state *state = machine->driver_data<samcoupe_state>(); |
| 112 | UINT8 *videoram = state->videoram; |
| 109 | 113 | samcoupe_state *asic = machine->driver_data<samcoupe_state>(); |
| 110 | 114 | |
| 111 | 115 | 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]; |
src/mess/video/trs80.c
| r9143 | r9144 | |
| 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 | trs80_state *state = screen->machine->driver_data<trs80_state>(); |
| 59 | UINT8 *videoram = state->videoram; |
| 59 | 60 | UINT8 y,ra,chr,gfx,gfxbit; |
| 60 | 61 | UINT16 sy=0,ma=0,x; |
| 61 | 62 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| r9143 | r9144 | |
| 118 | 119 | /* 8-bit video, 32/64/40/80 characters per line = trs80m3, trs80m4. */ |
| 119 | 120 | VIDEO_UPDATE( trs80m4 ) |
| 120 | 121 | { |
| 121 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 122 | trs80_state *state = screen->machine->driver_data<trs80_state>(); |
| 123 | UINT8 *videoram = state->videoram; |
| 122 | 124 | UINT8 y,ra,chr,gfx,gfxbit; |
| 123 | 125 | UINT16 sy=0,ma=0,x; |
| 124 | 126 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| r9143 | r9144 | |
| 214 | 216 | /* 7 or 8-bit video, 64/32 characters per line = ht1080z, ht1080z2, ht108064 */ |
| 215 | 217 | VIDEO_UPDATE( ht1080z ) |
| 216 | 218 | { |
| 217 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 219 | trs80_state *state = screen->machine->driver_data<trs80_state>(); |
| 220 | UINT8 *videoram = state->videoram; |
| 218 | 221 | UINT8 y,ra,chr,gfx,gfxbit; |
| 219 | 222 | UINT16 sy=0,ma=0,x; |
| 220 | 223 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| r9143 | r9144 | |
| 274 | 277 | /* 8-bit video, 64/80 characters per line = lnw80 */ |
| 275 | 278 | VIDEO_UPDATE( lnw80 ) |
| 276 | 279 | { |
| 277 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 280 | trs80_state *state = screen->machine->driver_data<trs80_state>(); |
| 281 | UINT8 *videoram = state->videoram; |
| 278 | 282 | const UINT16 rows[] = { 0, 0x200, 0x100, 0x300, 1, 0x201, 0x101, 0x301 }; |
| 279 | 283 | UINT8 chr,gfx,gfxbit,bg=7,fg=0; |
| 280 | 284 | UINT16 sy=0,ma=0,x,y,ra; |
| r9143 | r9144 | |
| 448 | 452 | /* lores characters are in the character generator. Each character is 8x16. */ |
| 449 | 453 | VIDEO_UPDATE( radionic ) |
| 450 | 454 | { |
| 451 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 455 | trs80_state *state = screen->machine->driver_data<trs80_state>(); |
| 456 | UINT8 *videoram = state->videoram; |
| 452 | 457 | UINT8 y,ra,chr,gfx; |
| 453 | 458 | UINT16 sy=0,ma=0,x; |
| 454 | 459 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| r9143 | r9144 | |
| 497 | 502 | |
| 498 | 503 | READ8_HANDLER( trs80_videoram_r ) |
| 499 | 504 | { |
| 500 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 505 | trs80_state *state = space->machine->driver_data<trs80_state>(); |
| 506 | UINT8 *videoram = state->videoram; |
| 501 | 507 | if ((trs80_mode & 0x80) && (~trs80_model4 & 1)) offset |= 0x400; |
| 502 | 508 | return videoram[offset]; |
| 503 | 509 | } |
| 504 | 510 | |
| 505 | 511 | WRITE8_HANDLER( trs80_videoram_w ) |
| 506 | 512 | { |
| 507 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 513 | trs80_state *state = space->machine->driver_data<trs80_state>(); |
| 514 | UINT8 *videoram = state->videoram; |
| 508 | 515 | if ((trs80_mode & 0x80) && (~trs80_model4 & 1)) offset |= 0x400; |
| 509 | 516 | videoram[offset] = data; |
| 510 | 517 | } |
src/mess/includes/hec2hrp.h
| r9143 | r9144 | |
| 35 | 35 | Adjust the one shot and A/D timing (sn76477) |
| 36 | 36 | */ |
| 37 | 37 | |
| 38 | |
| 39 | /* Enum status for high memory bank (c000 - ffff)*/ |
| 40 | enum |
| 41 | { |
| 42 | HECTOR_BANK_PROG = 0, /* first BANK is program ram*/ |
| 43 | HECTOR_BANK_VIDEO /* second BANK is Video ram */ |
| 44 | }; |
| 45 | /* Status for rom memory bank (0000 - 3fff) in MX machine*/ |
| 46 | enum |
| 47 | { |
| 48 | HECTORMX_BANK_PAGE0 = 0, /* first BANK is base rom*/ |
| 49 | HECTORMX_BANK_PAGE1, /* second BANK is basic rom */ |
| 50 | HECTORMX_BANK_PAGE2 /* 3 BANK is monitrix / assemblex rom */ |
| 51 | }; |
| 52 | |
| 53 | class hec2hrp_state : public driver_device |
| 54 | { |
| 55 | public: |
| 56 | hec2hrp_state(running_machine &machine, const driver_device_config_base &config) |
| 57 | : driver_device(machine, config) { } |
| 58 | |
| 59 | UINT8 *videoram; |
| 60 | }; |
| 61 | |
| 62 | |
| 63 | /*----------- defined in machine/hec2hrp.c -----------*/ |
| 64 | |
| 65 | /* Sound function*/ |
| 66 | extern sn76477_interface hector_sn76477_interface; |
| 67 | |
| 38 | 68 | /* Protoype of memory Handler*/ |
| 39 | 69 | extern WRITE8_HANDLER( hector_switch_bank_w ); |
| 40 | 70 | extern READ8_HANDLER( hector_keyboard_r ); |
| r9143 | r9144 | |
| 49 | 79 | extern void hector_init(running_machine *machine); |
| 50 | 80 | extern void hector_reset(running_machine *machine, int hr); |
| 51 | 81 | |
| 52 | | extern READ8_HANDLER( hector_mx_io_port_r); |
| 53 | | extern WRITE8_HANDLER( hector_mx80_io_port_w); |
| 54 | | extern WRITE8_HANDLER( hector_mx40_io_port_w); |
| 82 | extern READ8_HANDLER( hector_mx_io_port_r ); |
| 83 | extern WRITE8_HANDLER( hector_mx80_io_port_w ); |
| 84 | extern WRITE8_HANDLER( hector_mx40_io_port_w ); |
| 55 | 85 | |
| 56 | 86 | |
| 57 | | /* Prototype of video function*/ |
| 87 | /*----------- defined in video/hec2video.c -----------*/ |
| 88 | |
| 58 | 89 | extern void hector_80c(bitmap_t *bitmap, UINT8 *page, int ymax, int yram) ; |
| 59 | 90 | extern void hector_hr(bitmap_t *bitmap, UINT8 *page, int ymax, int yram) ; |
| 60 | 91 | VIDEO_START( hec2hrp ); |
| r9143 | r9144 | |
| 71 | 102 | |
| 72 | 103 | /* Color status*/ |
| 73 | 104 | extern UINT8 hector_color[4]; |
| 74 | | |
| 75 | | /* Sound function*/ |
| 76 | | extern sn76477_interface hector_sn76477_interface; |
| 77 | | |
| 78 | | |
| 79 | | /* Enum status for high memory bank (c000 - ffff)*/ |
| 80 | | enum |
| 81 | | { |
| 82 | | HECTOR_BANK_PROG = 0, /* first BANK is program ram*/ |
| 83 | | HECTOR_BANK_VIDEO /* second BANK is Video ram */ |
| 84 | | }; |
| 85 | | /* Status for rom memory bank (0000 - 3fff) in MX machine*/ |
| 86 | | enum |
| 87 | | { |
| 88 | | HECTORMX_BANK_PAGE0 = 0, /* first BANK is base rom*/ |
| 89 | | HECTORMX_BANK_PAGE1, /* second BANK is basic rom */ |
| 90 | | HECTORMX_BANK_PAGE2 /* 3 BANK is monitrix / assemblex rom */ |
| 91 | | }; |
src/mess/drivers/dgn_beta.c
| r9143 | r9144 | |
| 141 | 141 | AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK("bank4") |
| 142 | 142 | AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK("bank5") |
| 143 | 143 | AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK("bank6") |
| 144 | | AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK("bank7") AM_BASE_GENERIC(videoram) |
| 144 | AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK("bank7") AM_BASE_MEMBER(dgn_beta_state, videoram) |
| 145 | 145 | AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK("bank8") |
| 146 | 146 | AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK("bank9") |
| 147 | 147 | AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK("bank10") |
| r9143 | r9144 | |
| 316 | 316 | GFXDECODE_END |
| 317 | 317 | |
| 318 | 318 | |
| 319 | | static MACHINE_CONFIG_START( dgnbeta, driver_device ) |
| 319 | static MACHINE_CONFIG_START( dgnbeta, dgn_beta_state ) |
| 320 | 320 | /* basic machine hardware */ |
| 321 | 321 | MDRV_CPU_ADD(MAINCPU_TAG, M6809E, DGNBETA_CPU_SPEED_HZ) /* 2 MHz */ |
| 322 | 322 | MDRV_CPU_PROGRAM_MAP(dgnbeta_map) |
src/mess/drivers/cbmb.c
| r9143 | r9144 | |
| 84 | 84 | * Add better P500 emulation (almost everything: memory access, inputs, |
| 85 | 85 | Datasette, etc.) |
| 86 | 86 | |
| 87 | | * Was CBM 710 / 720 monitor at 50Hz? If not remove MACHINE_CONFIG_START( cbm700pal, driver_device ) |
| 87 | * Was CBM 710 / 720 monitor at 50Hz? If not remove MACHINE_CONFIG_START( cbm700pal, cbmb_state ) |
| 88 | 88 | and use the 60Hz version for the whole High Profile |
| 89 | 89 | |
| 90 | 90 | * Find info about the following models (if ever existed): |
| r9143 | r9144 | |
| 134 | 134 | AM_RANGE(0xf4000, 0xf5fff) AM_ROM |
| 135 | 135 | AM_RANGE(0xf6000, 0xf7fff) AM_ROM |
| 136 | 136 | AM_RANGE(0xf8000, 0xfbfff) AM_ROM AM_BASE(&cbmb_basic) |
| 137 | | AM_RANGE(0xfd000, 0xfd7ff) AM_RAM AM_BASE_GENERIC(videoram) /* VIDEORAM */ |
| 137 | AM_RANGE(0xfd000, 0xfd7ff) AM_RAM AM_BASE_MEMBER(cbmb_state, videoram) /* VIDEORAM */ |
| 138 | 138 | AM_RANGE(0xfd800, 0xfd800) AM_MIRROR(0xfe) AM_DEVWRITE("crtc", mc6845_address_w) |
| 139 | 139 | AM_RANGE(0xfd801, 0xfd801) AM_MIRROR(0xfe) AM_DEVREADWRITE("crtc", mc6845_register_r , mc6845_register_w) |
| 140 | 140 | /* disk units */ |
src/mess/drivers/x1.c
| r9143 | r9144 | |
| 258 | 258 | |
| 259 | 259 | static VIDEO_START( x1 ) |
| 260 | 260 | { |
| 261 | x1_state *state = machine->driver_data<x1_state>(); |
| 261 | 262 | x1_colorram = auto_alloc_array(machine, UINT8, 0x1000); |
| 262 | | machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x1000); |
| 263 | state->videoram = auto_alloc_array(machine, UINT8, 0x1000); |
| 263 | 264 | gfx_bitmap_ram = auto_alloc_array(machine, UINT8, 0xc000*2); |
| 264 | 265 | } |
| 265 | 266 | |
| 266 | 267 | static void draw_fgtilemap(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int w) |
| 267 | 268 | { |
| 268 | | UINT8 *videoram = machine->generic.videoram.u8; |
| 269 | x1_state *state = machine->driver_data<x1_state>(); |
| 270 | UINT8 *videoram = state->videoram; |
| 269 | 271 | int y,x,res_x,res_y; |
| 270 | 272 | int screen_mask; |
| 271 | 273 | |
| r9143 | r9144 | |
| 1023 | 1025 | |
| 1024 | 1026 | static READ8_HANDLER( x1_pcg_r ) |
| 1025 | 1027 | { |
| 1026 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1028 | x1_state *state = space->machine->driver_data<x1_state>(); |
| 1029 | UINT8 *videoram = state->videoram; |
| 1027 | 1030 | int addr; |
| 1028 | 1031 | int calc_pcg_offset; |
| 1029 | 1032 | static UINT32 kanji_offset; |
| r9143 | r9144 | |
| 1082 | 1085 | |
| 1083 | 1086 | static WRITE8_HANDLER( x1_pcg_w ) |
| 1084 | 1087 | { |
| 1085 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1088 | x1_state *state = space->machine->driver_data<x1_state>(); |
| 1089 | UINT8 *videoram = state->videoram; |
| 1086 | 1090 | int addr,pcg_offset; |
| 1087 | 1091 | UINT8 *PCG_RAM = memory_region(space->machine, "pcg"); |
| 1088 | 1092 | static UINT16 used_pcg_addr; |
| r9143 | r9144 | |
| 1333 | 1337 | |
| 1334 | 1338 | static READ8_HANDLER( x1_io_r ) |
| 1335 | 1339 | { |
| 1336 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1340 | x1_state *state = space->machine->driver_data<x1_state>(); |
| 1341 | UINT8 *videoram = state->videoram; |
| 1337 | 1342 | io_bank_mode = 0; //any read disables the extended mode. |
| 1338 | 1343 | |
| 1339 | 1344 | //if(offset >= 0x0704 && offset <= 0x0707) { return z80ctc_r(space->machine->device("ctc"), offset-0x0704); } |
| r9143 | r9144 | |
| 1362 | 1367 | |
| 1363 | 1368 | static WRITE8_HANDLER( x1_io_w ) |
| 1364 | 1369 | { |
| 1365 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1370 | x1_state *state = space->machine->driver_data<x1_state>(); |
| 1371 | UINT8 *videoram = state->videoram; |
| 1366 | 1372 | if(io_bank_mode == 1) { x1_ex_gfxram_w(space, offset, data); } |
| 1367 | 1373 | // else if(offset >= 0x0704 && offset <= 0x0707) { z80ctc_w(space->machine->device("ctc"), offset-0x0704,data); } |
| 1368 | 1374 | // else if(offset >= 0x0c00 && offset <= 0x0cff) { x1_rs232c_w(space->machine, 0, data); } |
| r9143 | r9144 | |
| 1403 | 1409 | |
| 1404 | 1410 | static READ8_HANDLER( x1turbo_io_r ) |
| 1405 | 1411 | { |
| 1406 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1412 | x1_state *state = space->machine->driver_data<x1_state>(); |
| 1413 | UINT8 *videoram = state->videoram; |
| 1407 | 1414 | io_bank_mode = 0; //any read disables the extended mode. |
| 1408 | 1415 | |
| 1409 | 1416 | if(offset == 0x0700) { return (ym2151_r(space->machine->device("ym"), offset-0x0700) & 0x7f) | (input_port_read(space->machine, "SOUND_SW") & 0x80); } |
| r9143 | r9144 | |
| 1441 | 1448 | |
| 1442 | 1449 | static WRITE8_HANDLER( x1turbo_io_w ) |
| 1443 | 1450 | { |
| 1444 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 1451 | x1_state *state = space->machine->driver_data<x1_state>(); |
| 1452 | UINT8 *videoram = state->videoram; |
| 1445 | 1453 | if(io_bank_mode == 1) { x1_ex_gfxram_w(space, offset, data); } |
| 1446 | 1454 | else if(offset == 0x0700 || offset == 0x0701) { ym2151_w(space->machine->device("ym"), offset-0x0700,data); } |
| 1447 | 1455 | else if(offset >= 0x0704 && offset <= 0x0707) { z80ctc_w(space->machine->device("ctc"), offset-0x0704,data); } |
| r9143 | r9144 | |
| 2223 | 2231 | "x1_flop" |
| 2224 | 2232 | }; |
| 2225 | 2233 | |
| 2226 | | static MACHINE_CONFIG_START( x1, driver_device ) |
| 2234 | static MACHINE_CONFIG_START( x1, x1_state ) |
| 2227 | 2235 | /* basic machine hardware */ |
| 2228 | 2236 | MDRV_CPU_ADD("maincpu", Z80, MAIN_CLOCK/4) |
| 2229 | 2237 | MDRV_CPU_PROGRAM_MAP(x1_mem) |
src/mess/drivers/p2000t.c
| r9143 | r9144 | |
| 59 | 59 | static ADDRESS_MAP_START( p2000m_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 60 | 60 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 61 | 61 | AM_RANGE(0x1000, 0x4fff) AM_ROM |
| 62 | | AM_RANGE(0x5000, 0x5fff) AM_RAM AM_BASE_GENERIC(videoram) |
| 62 | AM_RANGE(0x5000, 0x5fff) AM_RAM AM_BASE_MEMBER(p2000t_state, videoram) |
| 63 | 63 | AM_RANGE(0x6000, 0x9fff) AM_RAM |
| 64 | 64 | AM_RANGE(0xa000, 0xffff) AM_NOP |
| 65 | 65 | ADDRESS_MAP_END |
| r9143 | r9144 | |
| 229 | 229 | }; |
| 230 | 230 | |
| 231 | 231 | /* Machine definition */ |
| 232 | | static MACHINE_CONFIG_START( p2000t, driver_device ) |
| 232 | static MACHINE_CONFIG_START( p2000t, p2000t_state ) |
| 233 | 233 | /* basic machine hardware */ |
| 234 | 234 | MDRV_CPU_ADD("maincpu", Z80, 2500000) |
| 235 | 235 | MDRV_CPU_PROGRAM_MAP(p2000t_mem) |
| r9143 | r9144 | |
| 261 | 261 | |
| 262 | 262 | |
| 263 | 263 | /* Machine definition */ |
| 264 | | static MACHINE_CONFIG_START( p2000m, driver_device ) |
| 264 | static MACHINE_CONFIG_START( p2000m, p2000t_state ) |
| 265 | 265 | /* basic machine hardware */ |
| 266 | 266 | MDRV_CPU_ADD("maincpu", Z80, 2500000) |
| 267 | 267 | MDRV_CPU_PROGRAM_MAP(p2000m_mem) |
src/mess/drivers/pet.c
| r9143 | r9144 | |
| 402 | 402 | *************************************/ |
| 403 | 403 | |
| 404 | 404 | static ADDRESS_MAP_START(pet_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 405 | | AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_RAM AM_BASE_GENERIC(videoram) |
| 405 | AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_RAM AM_BASE_MEMBER(pet_state, videoram) |
| 406 | 406 | AM_RANGE(0xa000, 0xe7ff) AM_ROM |
| 407 | 407 | AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w) |
| 408 | 408 | AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w) |
| r9143 | r9144 | |
| 412 | 412 | ADDRESS_MAP_END |
| 413 | 413 | |
| 414 | 414 | static ADDRESS_MAP_START( pet40_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 415 | | AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_RAM AM_BASE_GENERIC(videoram) |
| 415 | AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_RAM AM_BASE_MEMBER(pet_state, videoram) |
| 416 | 416 | AM_RANGE(0xa000, 0xe7ff) AM_ROM |
| 417 | 417 | AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w) |
| 418 | 418 | AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w) |
| r9143 | r9144 | |
| 460 | 460 | */ |
| 461 | 461 | static ADDRESS_MAP_START( superpet_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 462 | 462 | AM_RANGE(0x0000, 0x7fff) AM_RAM AM_SHARE("share1") AM_BASE(&pet_memory) |
| 463 | | AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("share2") AM_BASE_GENERIC(videoram) |
| 463 | AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("share2") AM_BASE_MEMBER(pet_state, videoram) |
| 464 | 464 | AM_RANGE(0xa000, 0xe7ff) AM_ROM |
| 465 | 465 | AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w) |
| 466 | 466 | AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w) |
src/mess/drivers/nascom1.c
| r9143 | r9144 | |
| 74 | 74 | |
| 75 | 75 | static ADDRESS_MAP_START( nascom1_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 76 | 76 | AM_RANGE(0x0000, 0x07ff) AM_ROM |
| 77 | | AM_RANGE(0x0800, 0x0bff) AM_RAM AM_BASE_GENERIC(videoram) |
| 77 | AM_RANGE(0x0800, 0x0bff) AM_RAM AM_BASE_MEMBER(nascom1_state, videoram) |
| 78 | 78 | AM_RANGE(0x0c00, 0x0fff) AM_RAM |
| 79 | 79 | AM_RANGE(0x1000, 0x13ff) AM_RAM /* 1Kb */ |
| 80 | 80 | AM_RANGE(0x1400, 0x4fff) AM_RAM /* 16Kb */ |
| r9143 | r9144 | |
| 275 | 275 | }; |
| 276 | 276 | |
| 277 | 277 | |
| 278 | | static MACHINE_CONFIG_START( nascom1, driver_device ) |
| 278 | static MACHINE_CONFIG_START( nascom1, nascom1_state ) |
| 279 | 279 | /* basic machine hardware */ |
| 280 | 280 | MDRV_CPU_ADD("maincpu", Z80, XTAL_16MHz/8) |
| 281 | 281 | MDRV_CPU_PROGRAM_MAP(nascom1_mem) |
src/mess/drivers/microtan.c
| r9143 | r9144 | |
| 54 | 54 | |
| 55 | 55 | static ADDRESS_MAP_START( microtan_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 56 | 56 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 57 | | AM_RANGE(0x0200, 0x03ff) AM_RAM_WRITE(microtan_videoram_w) AM_BASE_GENERIC(videoram) |
| 57 | AM_RANGE(0x0200, 0x03ff) AM_RAM_WRITE(microtan_videoram_w) AM_BASE_MEMBER(microtan_state, videoram) |
| 58 | 58 | AM_RANGE(0xbc00, 0xbc00) AM_DEVWRITE("ay8910.1", ay8910_address_w) |
| 59 | 59 | AM_RANGE(0xbc01, 0xbc01) AM_DEVREADWRITE("ay8910.1", ay8910_r, ay8910_data_w) |
| 60 | 60 | AM_RANGE(0xbc02, 0xbc02) AM_DEVWRITE("ay8910.2", ay8910_address_w) |
| r9143 | r9144 | |
| 215 | 215 | DEVCB_NULL |
| 216 | 216 | }; |
| 217 | 217 | |
| 218 | | static MACHINE_CONFIG_START( microtan, driver_device ) |
| 218 | static MACHINE_CONFIG_START( microtan, microtan_state ) |
| 219 | 219 | /* basic machine hardware */ |
| 220 | 220 | MDRV_CPU_ADD("maincpu", M6502, 750000) // 750 kHz |
| 221 | 221 | MDRV_CPU_PROGRAM_MAP(microtan_map) |
src/mess/drivers/ti99_2.c
| r9143 | r9144 | |
| 81 | 81 | #include "machine/tms9901.h" |
| 82 | 82 | #include "cpu/tms9900/tms9900.h" |
| 83 | 83 | |
| 84 | |
| 85 | class ti99_2_state : public driver_device |
| 86 | { |
| 87 | public: |
| 88 | ti99_2_state(running_machine &machine, const driver_device_config_base &config) |
| 89 | : driver_device(machine, config) { } |
| 90 | |
| 91 | UINT8 *videoram; |
| 92 | }; |
| 93 | |
| 94 | |
| 84 | 95 | static int ROM_paged; |
| 85 | 96 | static int state = ASSERT_LINE; |
| 86 | 97 | |
| r9143 | r9144 | |
| 137 | 148 | |
| 138 | 149 | static VIDEO_UPDATE(ti99_2) |
| 139 | 150 | { |
| 140 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 151 | ti99_2_state *state = screen->machine->driver_data<ti99_2_state>(); |
| 152 | UINT8 *videoram = state->videoram; |
| 141 | 153 | int i, sx, sy; |
| 142 | 154 | |
| 143 | 155 | |
| r9143 | r9144 | |
| 187 | 199 | AM_RANGE(0x4000, 0x5fff) AM_ROMBANK("bank1") /* system ROM, banked on 32kb ROMs protos */ |
| 188 | 200 | AM_RANGE(0x6000, 0xdfff) AM_NOP /* free for expansion */ |
| 189 | 201 | AM_RANGE(0xe000, 0xebff) AM_RAM /* system RAM */ |
| 190 | | AM_RANGE(0xec00, 0xeeff) AM_RAM AM_BASE_GENERIC(videoram) |
| 202 | AM_RANGE(0xec00, 0xeeff) AM_RAM AM_BASE_MEMBER(ti99_2_state, videoram) |
| 191 | 203 | AM_RANGE(0xef00, 0xefff) AM_RAM /* system RAM */ |
| 192 | 204 | AM_RANGE(0xf000, 0xffff) AM_NOP /* free for expansion (and internal processor RAM) */ |
| 193 | 205 | ADDRESS_MAP_END |
| r9143 | r9144 | |
| 352 | 364 | 1 /* enable automatic wait state generation */ |
| 353 | 365 | }; |
| 354 | 366 | |
| 355 | | static MACHINE_CONFIG_START( ti99_2, driver_device ) |
| 367 | static MACHINE_CONFIG_START( ti99_2, ti99_2_state ) |
| 356 | 368 | /* basic machine hardware */ |
| 357 | 369 | MDRV_CPU_ADD("maincpu", TMS9995, 10700000) |
| 358 | 370 | MDRV_CPU_CONFIG(ti99_2_processor_config) |
src/mess/drivers/trs80.c
| r9143 | r9144 | |
| 164 | 164 | static ADDRESS_MAP_START( trs80_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 165 | 165 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 166 | 166 | AM_RANGE(0x3800, 0x38ff) AM_READ(trs80_keyboard_r) |
| 167 | | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE_GENERIC(videoram) |
| 167 | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE_MEMBER(trs80_state, videoram) |
| 168 | 168 | AM_RANGE(0x4000, 0x7fff) AM_RAM |
| 169 | 169 | ADDRESS_MAP_END |
| 170 | 170 | |
| r9143 | r9144 | |
| 185 | 185 | AM_RANGE(0x37ee, 0x37ee) AM_DEVREADWRITE("wd179x", wd17xx_sector_r, wd17xx_sector_w) |
| 186 | 186 | AM_RANGE(0x37ef, 0x37ef) AM_DEVREADWRITE("wd179x", wd17xx_data_r, wd17xx_data_w) |
| 187 | 187 | AM_RANGE(0x3800, 0x38ff) AM_MIRROR(0x300) AM_READ(trs80_keyboard_r) |
| 188 | | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE_GENERIC(videoram) |
| 188 | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE_MEMBER(trs80_state, videoram) |
| 189 | 189 | AM_RANGE(0x4000, 0xffff) AM_RAM |
| 190 | 190 | ADDRESS_MAP_END |
| 191 | 191 | |
| r9143 | r9144 | |
| 554 | 554 | NULL |
| 555 | 555 | }; |
| 556 | 556 | |
| 557 | | static MACHINE_CONFIG_START( trs80, driver_device ) // the original model I, level I, with no extras |
| 557 | static MACHINE_CONFIG_START( trs80, trs80_state ) // the original model I, level I, with no extras |
| 558 | 558 | /* basic machine hardware */ |
| 559 | 559 | MDRV_CPU_ADD("maincpu", Z80, 1796000) /* 1.796 MHz */ |
| 560 | 560 | MDRV_CPU_PROGRAM_MAP(trs80_map) |
| r9143 | r9144 | |
| 837 | 837 | |
| 838 | 838 | static DRIVER_INIT( trs80m4 ) |
| 839 | 839 | { |
| 840 | trs80_state *state = machine->driver_data<trs80_state>(); |
| 840 | 841 | trs80_mode = 0; |
| 841 | 842 | trs80_model4 = 2; |
| 842 | | machine->generic.videoram.u8 = memory_region(machine, "maincpu")+0x4000; |
| 843 | state->videoram = memory_region(machine, "maincpu")+0x4000; |
| 843 | 844 | } |
| 844 | 845 | |
| 845 | 846 | static DRIVER_INIT( trs80m4p ) |
| 846 | 847 | { |
| 848 | trs80_state *state = machine->driver_data<trs80_state>(); |
| 847 | 849 | trs80_mode = 0; |
| 848 | 850 | trs80_model4 = 4; |
| 849 | | machine->generic.videoram.u8 = memory_region(machine, "maincpu")+0x4000; |
| 851 | state->videoram = memory_region(machine, "maincpu")+0x4000; |
| 850 | 852 | } |
| 851 | 853 | |
| 852 | 854 | static DRIVER_INIT( lnw80 ) |
| 853 | 855 | { |
| 856 | trs80_state *state = machine->driver_data<trs80_state>(); |
| 854 | 857 | trs80_mode = 0; |
| 855 | 858 | trs80_model4 = 0; |
| 856 | 859 | trs80_gfxram = memory_region(machine, "gfx2"); |
| 857 | | machine->generic.videoram.u8 = memory_region(machine, "gfx2")+0x4000; |
| 860 | state->videoram = memory_region(machine, "gfx2")+0x4000; |
| 858 | 861 | } |
| 859 | 862 | |
| 860 | 863 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
src/mess/drivers/interact.c
| r9143 | r9144 | |
| 61 | 61 | |
| 62 | 62 | #include "includes/hec2hrp.h" |
| 63 | 63 | |
| 64 | |
| 65 | class interact_state : public driver_device |
| 66 | { |
| 67 | public: |
| 68 | interact_state(running_machine &machine, const driver_device_config_base &config) |
| 69 | : driver_device(machine, config) { } |
| 70 | |
| 71 | UINT8 *videoram; |
| 72 | }; |
| 73 | |
| 74 | |
| 64 | 75 | static ADDRESS_MAP_START(interact_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 65 | 76 | ADDRESS_MAP_UNMAP_HIGH |
| 66 | 77 | /* Hardware address mapping*/ |
| r9143 | r9144 | |
| 77 | 88 | /* AM_RANGE(0x1000,0x3fff) AM_RAM*/ |
| 78 | 89 | |
| 79 | 90 | /* Video br mapping*/ |
| 80 | | AM_RANGE(0x4000,0x49ff) AM_RAM AM_BASE_GENERIC(videoram) |
| 91 | AM_RANGE(0x4000,0x49ff) AM_RAM AM_BASE_MEMBER(interact_state, videoram) |
| 81 | 92 | /* continous RAM*/ |
| 82 | 93 | AM_RANGE(0x4A00,0xffff) AM_RAM |
| 83 | 94 | |
| r9143 | r9144 | |
| 116 | 127 | |
| 117 | 128 | static VIDEO_UPDATE( interact ) |
| 118 | 129 | { |
| 119 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 130 | interact_state *state = screen->machine->driver_data<interact_state>(); |
| 131 | UINT8 *videoram = state->videoram; |
| 120 | 132 | screen->set_visible_area(0, 113, 0, 75); |
| 121 | 133 | hector_hr( bitmap, videoram, 77, 32); |
| 122 | 134 | return 0; |
| 123 | 135 | } |
| 124 | 136 | |
| 125 | | static MACHINE_CONFIG_START( interact, driver_device ) |
| 137 | static MACHINE_CONFIG_START( interact, interact_state ) |
| 126 | 138 | |
| 127 | 139 | /* basic machine hardware */ |
| 128 | 140 | MDRV_CPU_ADD("maincpu", I8080, XTAL_2MHz) |
| r9143 | r9144 | |
| 163 | 175 | |
| 164 | 176 | MACHINE_CONFIG_END |
| 165 | 177 | |
| 166 | | static MACHINE_CONFIG_START( hector1, driver_device ) |
| 178 | static MACHINE_CONFIG_START( hector1, interact_state ) |
| 167 | 179 | |
| 168 | 180 | /* basic machine hardware */ |
| 169 | 181 | MDRV_CPU_ADD("maincpu", Z80, XTAL_1_75MHz) |
src/mess/drivers/z80ne.c
| r9143 | r9144 | |
| 129 | 129 | AM_RANGE( 0x0400, 0x7fff ) AM_RAM |
| 130 | 130 | AM_RANGE( 0x8000, 0x83ff ) AM_ROMBANK("bank2") |
| 131 | 131 | AM_RANGE( 0x8400, 0xebff ) AM_RAM |
| 132 | | AM_RANGE( 0xec00, 0xedff ) AM_RAM AM_BASE_GENERIC(videoram) /* (6847) */ |
| 132 | AM_RANGE( 0xec00, 0xedff ) AM_RAM AM_BASE_MEMBER(z80ne_state, videoram) /* (6847) */ |
| 133 | 133 | AM_RANGE( 0xee00, 0xffff ) AM_RAM |
| 134 | 134 | ADDRESS_MAP_END |
| 135 | 135 | |
| 136 | 136 | static ADDRESS_MAP_START( z80netb_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 137 | 137 | AM_RANGE( 0x0000, 0x3fff ) AM_ROM |
| 138 | 138 | AM_RANGE( 0x4000, 0xebff ) AM_RAM |
| 139 | | AM_RANGE( 0xec00, 0xedff ) AM_RAM AM_BASE_GENERIC(videoram) /* (6847) */ |
| 139 | AM_RANGE( 0xec00, 0xedff ) AM_RAM AM_BASE_MEMBER(z80ne_state, videoram) /* (6847) */ |
| 140 | 140 | AM_RANGE( 0xee00, 0xffff ) AM_RAM |
| 141 | 141 | ADDRESS_MAP_END |
| 142 | 142 | |
| r9143 | r9144 | |
| 163 | 163 | AM_RANGE( 0x8000, 0x83ff ) AM_RAMBANK("bank3") |
| 164 | 164 | AM_RANGE( 0x8400, 0xdfff ) AM_RAM |
| 165 | 165 | AM_RANGE( 0xe000, 0xebff ) AM_READNOP AM_WRITENOP |
| 166 | | AM_RANGE( 0xec00, 0xedff ) AM_RAM AM_BASE_GENERIC(videoram) /* (6847) */ |
| 166 | AM_RANGE( 0xec00, 0xedff ) AM_RAM AM_BASE_MEMBER(z80ne_state, videoram) /* (6847) */ |
| 167 | 167 | AM_RANGE( 0xee00, 0xefff ) AM_READNOP AM_WRITENOP |
| 168 | 168 | AM_RANGE( 0xf000, 0xf3ff ) AM_RAMBANK("bank4") |
| 169 | 169 | AM_RANGE( 0xf400, 0xffff ) AM_READNOP AM_WRITENOP |
| r9143 | r9144 | |
| 465 | 465 | DEVCB_NULL |
| 466 | 466 | }; |
| 467 | 467 | |
| 468 | | static MACHINE_CONFIG_START( z80ne, driver_device ) |
| 468 | static MACHINE_CONFIG_START( z80ne, z80ne_state ) |
| 469 | 469 | /* basic machine hardware */ |
| 470 | 470 | MDRV_CPU_ADD("z80ne", Z80, Z80NE_CPU_SPEED_HZ) |
| 471 | 471 | MDRV_CPU_PROGRAM_MAP(z80ne_mem) |
| r9143 | r9144 | |
| 518 | 518 | MDRV_RAM_EXTRA_OPTIONS("1K") |
| 519 | 519 | MACHINE_CONFIG_END |
| 520 | 520 | |
| 521 | | static MACHINE_CONFIG_START( z80netb, driver_device ) |
| 521 | static MACHINE_CONFIG_START( z80netb, z80ne_state ) |
| 522 | 522 | /* basic machine hardware */ |
| 523 | 523 | MDRV_CPU_ADD("z80ne", Z80, Z80NE_CPU_SPEED_HZ) |
| 524 | 524 | MDRV_CPU_PROGRAM_MAP(z80netb_mem) |
| r9143 | r9144 | |
| 554 | 554 | MDRV_RAM_EXTRA_OPTIONS("1K") |
| 555 | 555 | MACHINE_CONFIG_END |
| 556 | 556 | |
| 557 | | static MACHINE_CONFIG_START( z80netf, driver_device ) |
| 557 | static MACHINE_CONFIG_START( z80netf, z80ne_state ) |
| 558 | 558 | /* basic machine hardware */ |
| 559 | 559 | MDRV_CPU_ADD("z80ne", Z80, Z80NE_CPU_SPEED_HZ) |
| 560 | 560 | MDRV_CPU_PROGRAM_MAP(z80netf_mem) |
src/mess/drivers/aquarius.c
| r9143 | r9144 | |
| 231 | 231 | |
| 232 | 232 | static ADDRESS_MAP_START( aquarius_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 233 | 233 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 234 | | AM_RANGE(0x3000, 0x33ff) AM_RAM_WRITE(aquarius_videoram_w) AM_BASE_GENERIC(videoram) |
| 234 | AM_RANGE(0x3000, 0x33ff) AM_RAM_WRITE(aquarius_videoram_w) AM_BASE_MEMBER(aquarius_state, videoram) |
| 235 | 235 | AM_RANGE(0x3400, 0x37ff) AM_RAM_WRITE(aquarius_colorram_w) AM_BASE(&aquarius_colorram) |
| 236 | 236 | AM_RANGE(0x3800, 0x3fff) AM_RAM |
| 237 | 237 | AM_RANGE(0x4000, 0xbfff) AM_NOP /* expansion ram */ |
| r9143 | r9144 | |
| 392 | 392 | NULL |
| 393 | 393 | }; |
| 394 | 394 | |
| 395 | | static MACHINE_CONFIG_START( aquarius, driver_device ) |
| 395 | static MACHINE_CONFIG_START( aquarius, aquarius_state ) |
| 396 | 396 | /* basic machine hardware */ |
| 397 | 397 | MDRV_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz) // ??? |
| 398 | 398 | MDRV_CPU_PROGRAM_MAP(aquarius_mem) |
src/mess/drivers/kaypro.c
| r9143 | r9144 | |
| 54 | 54 | |
| 55 | 55 | static ADDRESS_MAP_START( kaypro_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 56 | 56 | AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION("maincpu", 0x0000) |
| 57 | | AM_RANGE(0x3000, 0x3fff) AM_RAM AM_REGION("maincpu", 0x3000) AM_BASE_GENERIC(videoram) |
| 57 | AM_RANGE(0x3000, 0x3fff) AM_RAM AM_REGION("maincpu", 0x3000) AM_BASE_MEMBER(kaypro_state, videoram) |
| 58 | 58 | AM_RANGE(0x4000, 0xffff) AM_RAM AM_REGION("rambank", 0x4000) |
| 59 | 59 | ADDRESS_MAP_END |
| 60 | 60 | |
| r9143 | r9144 | |
| 219 | 219 | NULL |
| 220 | 220 | }; |
| 221 | 221 | |
| 222 | | static MACHINE_CONFIG_START( kayproii, driver_device ) |
| 222 | static MACHINE_CONFIG_START( kayproii, kaypro_state ) |
| 223 | 223 | /* basic machine hardware */ |
| 224 | 224 | MDRV_CPU_ADD("maincpu", Z80, 2500000) /* 2.5 MHz */ |
| 225 | 225 | MDRV_CPU_PROGRAM_MAP(kaypro_map) |
| r9143 | r9144 | |
| 266 | 266 | MDRV_Z80PIO_ADD( "z80pio_s", 2500000, kaypro4_pio_s_intf ) |
| 267 | 267 | MACHINE_CONFIG_END |
| 268 | 268 | |
| 269 | | static MACHINE_CONFIG_START( kaypro2x, driver_device ) |
| 269 | static MACHINE_CONFIG_START( kaypro2x, kaypro_state ) |
| 270 | 270 | /* basic machine hardware */ |
| 271 | 271 | MDRV_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz */ |
| 272 | 272 | MDRV_CPU_PROGRAM_MAP(kaypro_map) |
src/mess/drivers/channelf.c
| r9143 | r9144 | |
| 124 | 124 | |
| 125 | 125 | static WRITE8_HANDLER( channelf_port_0_w ) |
| 126 | 126 | { |
| 127 | | UINT8 *videoram = space->machine->generic.videoram.u8; |
| 127 | channelf_state *state = space->machine->driver_data<channelf_state>(); |
| 128 | UINT8 *videoram = state->videoram; |
| 128 | 129 | int offs; |
| 129 | 130 | |
| 130 | 131 | latch[0] = data; |
| r9143 | r9144 | |
| 276 | 277 | MDRV_SOFTWARE_LIST_ADD("cart_list","channelf") |
| 277 | 278 | MACHINE_CONFIG_END |
| 278 | 279 | |
| 279 | | static MACHINE_CONFIG_START( channelf, driver_device ) |
| 280 | static MACHINE_CONFIG_START( channelf, channelf_state ) |
| 280 | 281 | /* basic machine hardware */ |
| 281 | 282 | MDRV_CPU_ADD("maincpu", F8, 3579545/2) /* Colorburst/2 */ |
| 282 | 283 | MDRV_CPU_PROGRAM_MAP(channelf_map) |
| r9143 | r9144 | |
| 304 | 305 | MDRV_FRAGMENT_ADD( channelf_cart ) |
| 305 | 306 | MACHINE_CONFIG_END |
| 306 | 307 | |
| 307 | | static MACHINE_CONFIG_START( sabavdpl, driver_device ) |
| 308 | static MACHINE_CONFIG_START( sabavdpl, channelf_state ) |
| 308 | 309 | /* basic machine hardware */ |
| 309 | 310 | MDRV_CPU_ADD("maincpu", F8, MASTER_CLOCK_PAL) /* PAL speed */ |
| 310 | 311 | MDRV_CPU_PROGRAM_MAP(channelf_map) |
| r9143 | r9144 | |
| 333 | 334 | MACHINE_CONFIG_END |
| 334 | 335 | |
| 335 | 336 | |
| 336 | | static MACHINE_CONFIG_START( channlf2, driver_device ) |
| 337 | static MACHINE_CONFIG_START( channlf2, channelf_state ) |
| 337 | 338 | /* basic machine hardware */ |
| 338 | 339 | MDRV_CPU_ADD("maincpu", F8, 3579545/2) /* Colorburst / 2 */ |
| 339 | 340 | MDRV_CPU_PROGRAM_MAP(channelf_map) |
| r9143 | r9144 | |
| 362 | 363 | MACHINE_CONFIG_END |
| 363 | 364 | |
| 364 | 365 | |
| 365 | | static MACHINE_CONFIG_START( sabavpl2, driver_device ) |
| 366 | static MACHINE_CONFIG_START( sabavpl2, channelf_state ) |
| 366 | 367 | /* basic machine hardware */ |
| 367 | 368 | MDRV_CPU_ADD("maincpu", F8, MASTER_CLOCK_PAL) /* PAL speed */ |
| 368 | 369 | MDRV_CPU_PROGRAM_MAP(channelf_map) |
src/mess/drivers/hec2hrp.c
| r9143 | r9144 | |
| 91 | 91 | AM_RANGE(0x0000,0x3fff) AM_ROMBANK("bank2") |
| 92 | 92 | |
| 93 | 93 | /* Video br mapping*/ |
| 94 | | AM_RANGE(0x4000,0x49ff) AM_RAM AM_BASE_GENERIC(videoram) |
| 94 | AM_RANGE(0x4000,0x49ff) AM_RAM AM_BASE_MEMBER(hec2hrp_state, videoram) |
| 95 | 95 | /* continous RAM*/ |
| 96 | 96 | AM_RANGE(0x4A00,0xbfff) AM_RAM |
| 97 | 97 | /* from 0xC000 to 0xFFFF => Bank Ram for video and data !*/ |
| r9143 | r9144 | |
| 259 | 259 | DISCRETE_SOUND_END |
| 260 | 260 | |
| 261 | 261 | /******************************************************************************/ |
| 262 | | static MACHINE_CONFIG_START( hec2hr, driver_device ) |
| 262 | static MACHINE_CONFIG_START( hec2hr, hec2hrp_state ) |
| 263 | 263 | /******************************************************************************/ |
| 264 | 264 | /* basic machine hardware */ |
| 265 | 265 | MDRV_CPU_ADD("maincpu",Z80, XTAL_5MHz) |
| r9143 | r9144 | |
| 301 | 301 | MACHINE_CONFIG_END |
| 302 | 302 | |
| 303 | 303 | /*****************************************************************************/ |
| 304 | | static MACHINE_CONFIG_START( hec2hrp, driver_device ) |
| 304 | static MACHINE_CONFIG_START( hec2hrp, hec2hrp_state ) |
| 305 | 305 | /*****************************************************************************/ |
| 306 | 306 | /* basic machine hardware */ |
| 307 | 307 | MDRV_CPU_ADD("maincpu",Z80, XTAL_5MHz) |
| r9143 | r9144 | |
| 343 | 343 | MACHINE_CONFIG_END |
| 344 | 344 | |
| 345 | 345 | /*****************************************************************************/ |
| 346 | | static MACHINE_CONFIG_START( hec2mx40, driver_device ) |
| 346 | static MACHINE_CONFIG_START( hec2mx40, hec2hrp_state ) |
| 347 | 347 | /*****************************************************************************/ |
| 348 | 348 | /* basic machine hardware */ |
| 349 | 349 | MDRV_CPU_ADD("maincpu",Z80, XTAL_5MHz) |
| r9143 | r9144 | |
| 385 | 385 | MACHINE_CONFIG_END |
| 386 | 386 | |
| 387 | 387 | /*****************************************************************************/ |
| 388 | | static MACHINE_CONFIG_START( hec2mx80, driver_device ) |
| 388 | static MACHINE_CONFIG_START( hec2mx80, hec2hrp_state ) |
| 389 | 389 | /*****************************************************************************/ |
| 390 | 390 | /* basic machine hardware */ |
| 391 | 391 | MDRV_CPU_ADD("maincpu",Z80, XTAL_5MHz) |
src/mess/drivers/intv.c
| r9143 | r9144 | |
| 355 | 355 | AM_RANGE( 0x0000, 0x3fff) AM_READWRITE( intvkbd_dualport8_lsb_r, intvkbd_dualport8_lsb_w ) /* Dual-port RAM */ |
| 356 | 356 | AM_RANGE( 0x4000, 0x7fff) AM_READWRITE( intvkbd_dualport8_msb_r, intvkbd_dualport8_msb_w ) /* Dual-port RAM */ |
| 357 | 357 | AM_RANGE( 0xb7f8, 0xb7ff) AM_RAM /* ??? */ |
| 358 | | AM_RANGE( 0xb800, 0xbfff) AM_RAM AM_BASE_GENERIC(videoram) /* Text Display */ |
| 358 | AM_RANGE( 0xb800, 0xbfff) AM_RAM AM_BASE_MEMBER(intv_state, videoram) /* Text Display */ |
| 359 | 359 | AM_RANGE( 0xc000, 0xffff) AM_ROM |
| 360 | 360 | ADDRESS_MAP_END |
| 361 | 361 | |
| r9143 | r9144 | |
| 373 | 373 | timer_set(device->machine, device->machine->device<cpu_device>("keyboard")->cycles_to_attotime(100), NULL, 0, intv_interrupt2_complete); |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | | static MACHINE_CONFIG_START( intv, driver_device ) |
| 376 | static MACHINE_CONFIG_START( intv, intv_state ) |
| 377 | 377 | /* basic machine hardware */ |
| 378 | 378 | MDRV_CPU_ADD("maincpu", CP1610, XTAL_3_579545MHz/4) /* Colorburst/4 */ |
| 379 | 379 | MDRV_CPU_PROGRAM_MAP(intv_mem) |
src/mess/drivers/jupiter.c
| r9143 | r9144 | |
| 53 | 53 | /* memory w/r functions */ |
| 54 | 54 | static ADDRESS_MAP_START( jupiter_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 55 | 55 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 56 | | AM_RANGE(0x2400, 0x27ff) AM_MIRROR(0x0400) AM_RAM AM_BASE_GENERIC(videoram) |
| 56 | AM_RANGE(0x2400, 0x27ff) AM_MIRROR(0x0400) AM_RAM AM_BASE_MEMBER(jupiter_state, videoram) |
| 57 | 57 | AM_RANGE(0x2c00, 0x2fff) AM_MIRROR(0x0400) AM_WRITE(jupiter_vh_charram_w) AM_BASE(&jupiter_charram) |
| 58 | 58 | AM_RANGE(0x3c00, 0x3fff) AM_MIRROR(0x0c00) AM_RAM |
| 59 | 59 | AM_RANGE(0x4800, 0xffff) AM_RAM_WRITE( jupiter_expram_w ) AM_BASE(&jupiter_expram) /* Expansion RAM */ |
| r9143 | r9144 | |
| 277 | 277 | |
| 278 | 278 | static VIDEO_UPDATE( jupiter ) |
| 279 | 279 | { |
| 280 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 280 | jupiter_state *state = screen->machine->driver_data<jupiter_state>(); |
| 281 | UINT8 *videoram = state->videoram; |
| 281 | 282 | int offs; |
| 282 | 283 | |
| 283 | 284 | for(offs = 0; offs < 768; offs++) |
| r9143 | r9144 | |
| 309 | 310 | }; |
| 310 | 311 | |
| 311 | 312 | /* machine definition */ |
| 312 | | static MACHINE_CONFIG_START( jupiter, driver_device ) |
| 313 | static MACHINE_CONFIG_START( jupiter, jupiter_state ) |
| 313 | 314 | /* basic machine hardware */ |
| 314 | 315 | MDRV_CPU_ADD("maincpu", Z80, XTAL_6_5MHz/2) /* 3.25 MHz */ |
| 315 | 316 | MDRV_CPU_PROGRAM_MAP(jupiter_mem) |
src/mess/drivers/svision.c
| r9143 | r9144 | |
| 247 | 247 | static ADDRESS_MAP_START( svision_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 248 | 248 | AM_RANGE( 0x0000, 0x1fff) AM_RAM |
| 249 | 249 | AM_RANGE( 0x2000, 0x3fff) AM_READWRITE(svision_r, svision_w) AM_BASE(&svision_reg) |
| 250 | | AM_RANGE( 0x4000, 0x5fff) AM_RAM AM_BASE_GENERIC(videoram) |
| 250 | AM_RANGE( 0x4000, 0x5fff) AM_RAM AM_BASE_MEMBER(svision_state, videoram) |
| 251 | 251 | AM_RANGE( 0x6000, 0x7fff) AM_NOP |
| 252 | 252 | AM_RANGE( 0x8000, 0xbfff) AM_ROMBANK("bank1") |
| 253 | 253 | AM_RANGE( 0xc000, 0xffff) AM_ROMBANK("bank2") |
| r9143 | r9144 | |
| 256 | 256 | static ADDRESS_MAP_START( tvlink_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 257 | 257 | AM_RANGE( 0x0000, 0x1fff) AM_RAM |
| 258 | 258 | AM_RANGE( 0x2000, 0x3fff) AM_READWRITE(tvlink_r, tvlink_w) AM_BASE(&svision_reg) |
| 259 | | AM_RANGE( 0x4000, 0x5fff) AM_RAM AM_BASE_GENERIC(videoram) |
| 259 | AM_RANGE( 0x4000, 0x5fff) AM_RAM AM_BASE_MEMBER(svision_state, videoram) |
| 260 | 260 | AM_RANGE( 0x6000, 0x7fff) AM_NOP |
| 261 | 261 | AM_RANGE( 0x8000, 0xbfff) AM_ROMBANK("bank1") |
| 262 | 262 | AM_RANGE( 0xc000, 0xffff) AM_ROMBANK("bank2") |
| r9143 | r9144 | |
| 366 | 366 | |
| 367 | 367 | static VIDEO_UPDATE( svision ) |
| 368 | 368 | { |
| 369 | svision_state *state = screen->machine->driver_data<svision_state>(); |
| 369 | 370 | int x, y, i, j=XPOS/4+YPOS*0x30; |
| 370 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 371 | UINT8 *videoram = state->videoram; |
| 371 | 372 | |
| 372 | 373 | if (BANK&8) |
| 373 | 374 | { |
| r9143 | r9144 | |
| 397 | 398 | |
| 398 | 399 | static VIDEO_UPDATE( tvlink ) |
| 399 | 400 | { |
| 401 | svision_state *state = screen->machine->driver_data<svision_state>(); |
| 400 | 402 | int x, y, i, j = XPOS/4+YPOS*0x30; |
| 401 | | UINT8 *videoram = screen->machine->generic.videoram.u8; |
| 403 | UINT8 *videoram = state->videoram; |
| 402 | 404 | |
| 403 | 405 | if (BANK & 8) |
| 404 | 406 | { |
| r9143 | r9144 | |
| 523 | 525 | tvlink.palette[3] = MAKE24_RGB15(svisionp_palette[(PALETTE_START+3)*3+0], svisionp_palette[(PALETTE_START+3)*3+1], svisionp_palette[(PALETTE_START+3)*3+2]); |
| 524 | 526 | } |
| 525 | 527 | |
| 526 | | static MACHINE_CONFIG_START( svision, driver_device ) |
| 528 | static MACHINE_CONFIG_START( svision, svision_state ) |
| 527 | 529 | /* basic machine hardware */ |
| 528 | 530 | MDRV_CPU_ADD("maincpu", M65C02, 4000000) /* ? stz used! speed? */ |
| 529 | 531 | MDRV_CPU_PROGRAM_MAP(svision_mem) |