Previous 15994 Revisions Next

r9144 Thursday 16th September, 2010 at 07:56:47 UTC by Miodrag Milanović
Rest of changes for removal of generic videoram [Atari Ace]
[src/mess/drivers]aquarius.c cbmb.c channelf.c concept.c dgn_beta.c hec2hrp.c interact.c intv.c jupiter.c kaypro.c mekd2.c microtan.c nascom1.c p2000t.c pc.c pet.c svision.c ti99_2.c trs80.c x1.c z80ne.c
[src/mess/includes]aquarius.h cbmb.h cgenie.h channelf.h concept.h dgn_beta.h hec2hrp.h intv.h jupiter.h kaypro.h mbee.h mekd2.h microtan.h mz700.h nascom1.h p2000t.h pet.h pocketc.h samcoupe.h ssystem3.h super80.h svision.h trs80.h vtech2.h x1.h z80ne.h
[src/mess/machine]cgenie.c concept.c dgn_beta.c mz700.c pc.c pet.c samcoupe.c super80.c vtech2.c z80ne.c
[src/mess/video]aquarius.c cbmb.c cgenie.c channelf.c dgn_beta.c hec2video.c intv.c kaypro.c mbee.c mekd2.c microtan.c mz700.c nascom1.c p2000m.c pc_aga.c pc_cga.c pc_mda.c pc_t1t.c pc_video_mess.c pc_video_mess.h pet.c pocketc.c samcoupe.c ssystem3.c super80.c trs80.c vtech2.c

src/mess/machine/dgn_beta.c
r9143r9144
357357//
358358static void SetDefaultTask(running_machine *machine)
359359{
360   UINT8 *videoram = machine->generic.videoram.u8;
360   dgn_beta_state *state = machine->driver_data<dgn_beta_state>();
361   UINT8 *videoram = state->videoram;
361362   int      Idx;
362363
363364   LOG_DEFAULT_TASK(("SetDefaultTask()\n"));
r9143r9144
10711072/********************************* Machine/Driver Initialization ****************************************/
10721073static void dgnbeta_reset(running_machine &machine)
10731074{
1075   dgn_beta_state *state = machine.driver_data<dgn_beta_state>();
10741076   running_device *fdc = machine.device(FDC_TAG);
10751077   running_device *pia_0 = machine.device( PIA_0_TAG );
10761078   running_device *pia_1 = machine.device( PIA_1_TAG );
r9143r9144
11131115   wd17xx_dden_w(fdc, CLEAR_LINE);
11141116   wd17xx_set_drive(fdc, 0);
11151117
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 */
11171119
11181120    dgnbeta_video_reset(&machine);
11191121    wd17xx_reset(fdc);
src/mess/machine/pet.c
r9143r9144
750750
751751   pet_common_driver_init(machine);
752752   state->cbm8096 = 1;
753   machine->generic.videoram.u8 = &pet_memory[0x8000];
753   state->videoram = &pet_memory[0x8000];
754754   pet80_vh_init(machine);
755755
756756}
src/mess/machine/samcoupe.c
r9143r9144
6767
6868void samcoupe_update_memory(address_space *space)
6969{
70   samcoupe_state *state = space->machine->driver_data<samcoupe_state>();
7071   samcoupe_state *asic = space->machine->driver_data<samcoupe_state>();
7172   const int PAGE_MASK = ((messram_get_size(space->machine->device("messram")) & 0xfffff) / 0x4000) - 1;
7273   UINT8 *rom = memory_region(space->machine, "maincpu");
r9143r9144
131132
132133   /* video memory location */
133134   if (asic->vmpr & 0x40)   /* if bit set in 2 bank screen mode */
134      space->machine->generic.videoram.u8 = &messram_get_ptr(space->machine->device("messram"))[((asic->vmpr & 0x1e) & PAGE_MASK) * 0x4000];
135      state->videoram = &messram_get_ptr(space->machine->device("messram"))[((asic->vmpr & 0x1e) & PAGE_MASK) * 0x4000];
135136   else
136      space->machine->generic.videoram.u8 = &messram_get_ptr(space->machine->device("messram"))[((asic->vmpr & 0x1f) & PAGE_MASK) * 0x4000];
137      state->videoram = &messram_get_ptr(space->machine->device("messram"))[((asic->vmpr & 0x1f) & PAGE_MASK) * 0x4000];
137138}
138139
139140
src/mess/machine/vtech2.c
r9143r9144
117117
118118static void laser_machine_init(running_machine *machine, int bank_mask, int video_mask)
119119{
120   vtech2_state *state = machine->driver_data<vtech2_state>();
120121    int i;
121122
122123   laser_bank_mask = bank_mask;
123124    laser_video_bank = video_mask;
124   machine->generic.videoram.u8 = mem + laser_video_bank * 0x04000;
125   state->videoram = mem + laser_video_bank * 0x04000;
125126   logerror("laser_machine_init(): bank mask $%04X, video %d [$%05X]\n", laser_bank_mask, laser_video_bank, laser_video_bank * 0x04000);
126127
127128   for (i = 0; i < ARRAY_LENGTH(laser_bank); i++)
src/mess/machine/z80ne.c
r9143r9144
650650
651651READ8_DEVICE_HANDLER( lx388_mc6847_videoram_r )
652652{
653   UINT8 *videoram = device->machine->generic.videoram.u8;
653   z80ne_state *state = device->machine->driver_data<z80ne_state>();
654   UINT8 *videoram = state->videoram;
654655   int d6 = BIT(videoram[offset], 6);
655656   int d7 = BIT(videoram[offset], 7);
656657
src/mess/machine/concept.c
r9143r9144
120120
121121VIDEO_UPDATE(concept)
122122{
123   UINT16 *videoram = screen->machine->generic.videoram.u16;
123   concept_state *state = screen->machine->driver_data<concept_state>();
124   UINT16 *videoram = state->videoram;
124125   UINT16 *v;
125126   int x, y;
126127   UINT16 *line;
src/mess/machine/mz700.c
r9143r9144
8282
8383DRIVER_INIT( mz700 )
8484{
85   mz_state *state = machine->driver_data<mz_state>();
8586   mz_state *mz = machine->driver_data<mz_state>();
8687   mz->mz700 = TRUE;
8788   mz->mz700_mode = TRUE;
8889
89   machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x800);
90   state->videoram = auto_alloc_array(machine, UINT8, 0x800);
9091   mz->colorram = auto_alloc_array(machine, UINT8, 0x800);
9192}
9293
9394DRIVER_INIT( mz800 )
9495{
96   mz_state *state = machine->driver_data<mz_state>();
9597   mz_state *mz = machine->driver_data<mz_state>();
9698   mz->mz700 = FALSE;
9799   mz->mz700_mode = FALSE;
98100
99101   /* 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;
102104
103105   /* character generator ram */
104106   mz->cgram = auto_alloc_array(machine, UINT8, 0x1000);
r9143r9144
147149
148150READ8_HANDLER( mz800_bank_0_r )
149151{
150   UINT8 *videoram = space->machine->generic.videoram.u8;
152   mz_state *state = space->machine->driver_data<mz_state>();
153   UINT8 *videoram = state->videoram;
151154   address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
152155   mz_state *mz = space->machine->driver_data<mz_state>();
153156
r9143r9144
265268
266269WRITE8_HANDLER( mz700_bank_3_w )
267270{
268   UINT8 *videoram = space->machine->generic.videoram.u8;
271   mz_state *state = space->machine->driver_data<mz_state>();
272   UINT8 *videoram = state->videoram;
269273   address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
270274   mz_state *mz = space->machine->driver_data<mz_state>();
271275
r9143r9144
313317
314318WRITE8_HANDLER( mz700_bank_4_w )
315319{
316   UINT8 *videoram = space->machine->generic.videoram.u8;
320   mz_state *state = space->machine->driver_data<mz_state>();
321   UINT8 *videoram = state->videoram;
317322   address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
318323   mz_state *mz = space->machine->driver_data<mz_state>();
319324
src/mess/machine/cgenie.c
r9143r9144
132132
133133MACHINE_START( cgenie )
134134{
135   cgenie_state *state = machine->driver_data<cgenie_state>();
135136   address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
136137   UINT8 *gfx = memory_region(machine, "gfx2");
137138   int i;
r9143r9144
155156   /* set up RAM */
156157   memory_install_read_bank(space, 0x4000, 0x4000 + messram_get_size(machine->device("messram")) - 1, 0, 0, "bank1");
157158   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"));
159160   memory_set_bankptr(machine, "bank1", messram_get_ptr(machine->device("messram")));
160161   timer_pulse(machine,  ATTOTIME_IN_HZ(11025), NULL, 0, handle_cassette_input );
161162}
r9143r9144
520521
521522int cgenie_videoram_r( running_machine *machine, int offset )
522523{
523   UINT8 *videoram = machine->generic.videoram.u8;
524   cgenie_state *state = machine->driver_data<cgenie_state>();
525   UINT8 *videoram = state->videoram;
524526   return videoram[offset];
525527}
526528
527529WRITE8_HANDLER( cgenie_videoram_w )
528530{
529   UINT8 *videoram = space->machine->generic.videoram.u8;
531   cgenie_state *state = space->machine->driver_data<cgenie_state>();
532   UINT8 *videoram = state->videoram;
530533   /* write to video RAM */
531534   if( data == videoram[offset] )
532535      return;             /* no change */
src/mess/machine/super80.c
r9143r9144
243243
244244DRIVER_INIT( super80v )
245245{
246   super80_state *state = machine->driver_data<super80_state>();
246247   super80_pcgram = memory_region(machine, "maincpu")+0xf000;
247   machine->generic.videoram.u8 = memory_region(machine, "maincpu")+0x18000;
248   state->videoram = memory_region(machine, "maincpu")+0x18000;
248249   super80_colorram = memory_region(machine, "maincpu")+0x1C000;
249250   driver_init_common(machine);
250251}
src/mess/machine/pc.c
r9143r9144
12341234   memory_install_read16_handler( space, 0xb0000, 0xbffff, 0, 0, pc200_videoram16le_r );
12351235   memory_install_write16_handler( space, 0xb0000, 0xbffff, 0, 0, pc200_videoram16le_w );
12361236   pc_videoram_size = 0x10000;
1237   machine->generic.videoram.u8 = memory_region(machine, "maincpu")+0xb0000;
1237   pc_videoram = memory_region(machine, "maincpu")+0xb0000;
12381238   mess_init_pc_common(machine, PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line);
12391239}
12401240
r9143r9144
12511251   memory_install_read16_handler( space, 0xb0000, 0xbffff, 0, 0, pc200_videoram16le_r );
12521252   memory_install_write16_handler( space, 0xb0000, 0xbffff, 0, 0, pc200_videoram16le_w );
12531253   pc_videoram_size = 0x10000;
1254   machine->generic.videoram.u8 = memory_region(machine, "maincpu")+0xb0000;
1254   pc_videoram = memory_region(machine, "maincpu")+0xb0000;
12551255   mess_init_pc_common(machine, PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line);
12561256   mc146818_init(machine, MC146818_IGNORE_CENTURY);
12571257}
src/mess/video/dgn_beta.c
r9143r9144
308308/* Video init */
309309void dgnbeta_init_video(running_machine *machine)
310310{
311   UINT8 *videoram = machine->generic.videoram.u8;
311   dgn_beta_state *state = machine->driver_data<dgn_beta_state>();
312   UINT8 *videoram = state->videoram;
312313   /* initialise 6845 */
313314   m6845_config(&beta_m6845_interface);
314315   m6845_set_personality(M6845_PERSONALITY_HD6845S);
r9143r9144
391392
392393static void beta_plot_char_line(running_machine *machine, int x,int y, bitmap_t *bitmap)
393394{
394   UINT8 *videoram = machine->generic.videoram.u8;
395   dgn_beta_state *state = machine->driver_data<dgn_beta_state>();
396   UINT8 *videoram = state->videoram;
395397   int CharsPerLine   = m6845_get_register(H_DISPLAYED);   // Get chars per line.
396398   unsigned char *data = memory_region(machine, "gfx1");      // ptr to char rom
397399   int Dot;
r9143r9144
539541
540542static void beta_plot_gfx_line(running_machine *machine,int x,int y, bitmap_t *bitmap)
541543{
542   UINT8 *videoram = machine->generic.videoram.u8;
544   dgn_beta_state *state = machine->driver_data<dgn_beta_state>();
545   UINT8 *videoram = state->videoram;
543546   int crtcAddr;
544547   int Addr;
545548   int Red;
src/mess/video/cbmb.c
r9143r9144
7171
7272MC6845_UPDATE_ROW( cbm600_update_row )
7373{
74   UINT8 *videoram = device->machine->generic.videoram.u8;
74   cbmb_state *state = device->machine->driver_data<cbmb_state>();
75   UINT8 *videoram = state->videoram;
7576   int i;
7677
7778   for( i = 0; i < x_count; i++ ) {
r9143r9144
8586
8687MC6845_UPDATE_ROW( cbm700_update_row )
8788{
88   UINT8 *videoram = device->machine->generic.videoram.u8;
89   cbmb_state *state = device->machine->driver_data<cbmb_state>();
90   UINT8 *videoram = state->videoram;
8991   int i;
9092
9193   for( i = 0; i < x_count; i++ ) {
src/mess/video/mbee.c
r9143r9144
8888
8989WRITE8_HANDLER ( mbee_videoram_w )
9090{
91   UINT8 *videoram = space->machine->generic.videoram.u8;
91   mbee_state *state = space->machine->driver_data<mbee_state>();
92   UINT8 *videoram = state->videoram;
9293   videoram[offset] = data;
9394}
9495
r9143r9144
479480
480481VIDEO_START( mbee )
481482{
483   mbee_state *state = machine->driver_data<mbee_state>();
482484   UINT8 *ram = memory_region(machine, "maincpu");
483   machine->generic.videoram.u8 = ram+0x15000;
485   state->videoram = ram+0x15000;
484486   mbee_pcgram = ram+0x11000;
485487}
486488
487489VIDEO_START( mbeeic )
488490{
491   mbee_state *state = machine->driver_data<mbee_state>();
489492   UINT8 *ram = memory_region(machine, "maincpu");
490   machine->generic.videoram.u8 = ram+0x15000;
493   state->videoram = ram+0x15000;
491494   colorram = ram+0x15800;
492495   mbee_pcgram = ram+0x11000;
493496}
494497
495498VIDEO_UPDATE( mbee )
496499{
497   UINT8 *videoram = screen->machine->generic.videoram.u8;
500   mbee_state *state = screen->machine->driver_data<mbee_state>();
501   UINT8 *videoram = state->videoram;
498502   UINT8 y,ra,chr,gfx;
499503   UINT16 mem,sy=0,ma=0,x;
500504   UINT8 speed = crt.cursor_top&0x20, flash = crt.cursor_top&0x40;            // cursor modes
r9143r9144
551555
552556VIDEO_UPDATE( mbeeic )
553557{
554   UINT8 *videoram = screen->machine->generic.videoram.u8;
558   mbee_state *state = screen->machine->driver_data<mbee_state>();
559   UINT8 *videoram = state->videoram;
555560   UINT8 y,ra,chr,gfx,fg,bg;
556561   UINT16 mem,sy=0,ma=0,x,col;
557562   UINT8 speed = crt.cursor_top&0x20, flash = crt.cursor_top&0x40;            // cursor modes
src/mess/video/pocketc.c
r9143r9144
5151
5252VIDEO_START( pocketc )
5353{
54   machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 6 * 2 + 24);
54   pocketc_state *state = machine->driver_data<pocketc_state>();
55   state->videoram = auto_alloc_array(machine, UINT8, 6 * 2 + 24);
5556}
5657
5758/* Draw an indicator (DEG, SHIFT, etc) */
src/mess/video/mz700.c
r9143r9144
4848
4949VIDEO_UPDATE( mz700 )
5050{
51   UINT8 *videoram = screen->machine->generic.videoram.u8;
51   mz_state *state = screen->machine->driver_data<mz_state>();
52   UINT8 *videoram = state->videoram;
5253   int offs;
5354   mz_state *mz = screen->machine->driver_data<mz_state>();
5455
r9143r9144
8384
8485VIDEO_UPDATE( mz800 )
8586{
86   UINT8 *videoram = screen->machine->generic.videoram.u8;
87   mz_state *state = screen->machine->driver_data<mz_state>();
88   UINT8 *videoram = state->videoram;
8789   mz_state *mz = screen->machine->driver_data<mz_state>();
8890
8991   bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine));
src/mess/video/cgenie.c
r9143r9144
241241
242242static void cgenie_refresh_monitor(running_machine *machine, bitmap_t * bitmap, const rectangle *cliprect)
243243{
244   UINT8 *videoram = machine->generic.videoram.u8;
244   cgenie_state *state = machine->driver_data<cgenie_state>();
245   UINT8 *videoram = state->videoram;
245246   int i, address, offset, cursor, size, code, x, y;
246247    rectangle r;
247248
r9143r9144
320321
321322static void cgenie_refresh_tv_set(running_machine *machine, bitmap_t * bitmap, const rectangle *cliprect)
322323{
323   UINT8 *videoram = machine->generic.videoram.u8;
324   cgenie_state *state = machine->driver_data<cgenie_state>();
325   UINT8 *videoram = state->videoram;
324326   int i, address, offset, cursor, size, code, x, y;
325327    rectangle r;
326328
src/mess/video/aquarius.c
r9143r9144
6868
6969WRITE8_HANDLER( aquarius_videoram_w )
7070{
71   UINT8 *videoram = space->machine->generic.videoram.u8;
71   aquarius_state *state = space->machine->driver_data<aquarius_state>();
72   UINT8 *videoram = state->videoram;
7273   videoram[offset] = data;
7374   tilemap_mark_tile_dirty(aquarius_tilemap, offset);
7475}
r9143r9144
8182
8283static TILE_GET_INFO(aquarius_gettileinfo)
8384{
84   UINT8 *videoram = machine->generic.videoram.u8;
85   aquarius_state *state = machine->driver_data<aquarius_state>();
86   UINT8 *videoram = state->videoram;
8587   int bank = 0;
8688   int code = videoram[tile_index];
8789   int color = aquarius_colorram[tile_index];
src/mess/video/kaypro.c
r9143r9144
2727
2828VIDEO_UPDATE( kayproii )
2929{
30   UINT8 *videoram = screen->machine->generic.videoram.u8;
30   kaypro_state *state = screen->machine->driver_data<kaypro_state>();
31   UINT8 *videoram = state->videoram;
3132/* The display consists of 80 columns and 24 rows. Each row is allocated 128 bytes of ram,
3233    but only the first 80 are used. The total video ram therefore is 0x0c00 bytes.
3334    There is one video attribute: bit 7 causes blinking. The first half of the
r9143r9144
8182
8283VIDEO_UPDATE( omni2 )
8384{
84   UINT8 *videoram = screen->machine->generic.videoram.u8;
85   kaypro_state *state = screen->machine->driver_data<kaypro_state>();
86   UINT8 *videoram = state->videoram;
8587   static UINT8 framecnt=0;
8688   UINT8 y,ra,chr,gfx;
8789   UINT16 sy=0,ma=0,x;
r9143r9144
149151
150152MC6845_UPDATE_ROW( kaypro2x_update_row )
151153{
152   UINT8 *videoram = device->machine->generic.videoram.u8;
154   kaypro_state *state = device->machine->driver_data<kaypro_state>();
155   UINT8 *videoram = state->videoram;
153156   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
154157
155158   for (x = 0; x < x_count; x++)            // for each character
r9143r9144
306309
307310READ8_HANDLER( kaypro_videoram_r )
308311{
309   UINT8 *videoram = space->machine->generic.videoram.u8;
312   kaypro_state *state = space->machine->driver_data<kaypro_state>();
313   UINT8 *videoram = state->videoram;
310314   return videoram[offset];
311315}
312316
313317WRITE8_HANDLER( kaypro_videoram_w )
314318{
315   UINT8 *videoram = space->machine->generic.videoram.u8;
319   kaypro_state *state = space->machine->driver_data<kaypro_state>();
320   UINT8 *videoram = state->videoram;
316321   videoram[offset] = data;
317322}
318323
319324READ8_HANDLER( kaypro2x_videoram_r )
320325{
321   UINT8 *videoram = space->machine->generic.videoram.u8;
326   kaypro_state *state = space->machine->driver_data<kaypro_state>();
327   UINT8 *videoram = state->videoram;
322328   return videoram[mc6845_video_address];
323329}
324330
325331WRITE8_HANDLER( kaypro2x_videoram_w )
326332{
327   UINT8 *videoram = space->machine->generic.videoram.u8;
333   kaypro_state *state = space->machine->driver_data<kaypro_state>();
334   UINT8 *videoram = state->videoram;
328335   videoram[mc6845_video_address] = data;
329336}
330337
src/mess/video/super80.c
r9143r9144
302302
303303READ8_HANDLER( super80v_low_r )
304304{
305   UINT8 *videoram = space->machine->generic.videoram.u8;
305   super80_state *state = space->machine->driver_data<super80_state>();
306   UINT8 *videoram = state->videoram;
306307   if (super80_shared & 4)
307308      return videoram[offset];
308309   else
r9143r9144
311312
312313WRITE8_HANDLER( super80v_low_w )
313314{
314   UINT8 *videoram = space->machine->generic.videoram.u8;
315   super80_state *state = space->machine->driver_data<super80_state>();
316   UINT8 *videoram = state->videoram;
315317   if (super80_shared & 4)
316318      videoram[offset] = data;
317319   else
r9143r9144
331333
332334WRITE8_HANDLER( super80v_high_w )
333335{
334   UINT8 *videoram = space->machine->generic.videoram.u8;
336   super80_state *state = space->machine->driver_data<super80_state>();
337   UINT8 *videoram = state->videoram;
335338   if (~super80_shared & 4)
336339      super80_colorram[offset+0x800] = data;
337340   else
r9143r9144
415418
416419MC6845_UPDATE_ROW( super80v_update_row )
417420{
418   UINT8 *videoram = device->machine->generic.videoram.u8;
421   super80_state *state = device->machine->driver_data<super80_state>();
422   UINT8 *videoram = state->videoram;
419423   UINT8 chr,col,gfx,fg,bg=0;
420424   UINT16 mem,x;
421425   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
src/mess/video/pet.c
r9143r9144
6868//  commodore pet discrete video circuit
6969VIDEO_UPDATE( pet )
7070{
71   UINT8 *videoram = screen->machine->generic.videoram.u8;
71   pet_state *state = screen->machine->driver_data<pet_state>();
72   UINT8 *videoram = state->videoram;
7273   int x, y, i;
7374
7475   for (y=0, i=0; y<25;y++)
r9143r9144
8586
8687MC6845_UPDATE_ROW( pet40_update_row )
8788{
88   UINT8 *videoram = device->machine->generic.videoram.u8;
89   pet_state *state = device->machine->driver_data<pet_state>();
90   UINT8 *videoram = state->videoram;
8991   int i;
9092
9193   for( i = 0; i < x_count; i++ ) {
r9143r9144
9597
9698MC6845_UPDATE_ROW( pet80_update_row )
9799{
98   UINT8 *videoram = device->machine->generic.videoram.u8;
100   pet_state *state = device->machine->driver_data<pet_state>();
101   UINT8 *videoram = state->videoram;
99102   int i;
100103
101104   for( i = 0; i < x_count; i++ ) {
src/mess/video/mekd2.c
r9143r9144
4545
4646VIDEO_START( mekd2 )
4747{
48   machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 6 * 2 + 24);
48   mekd2_state *state = machine->driver_data<mekd2_state>();
49   state->videoram = auto_alloc_array(machine, UINT8, 6 * 2 + 24);
4950}
5051
5152
5253VIDEO_UPDATE( mekd2 )
5354{
54   UINT8 *videoram = screen->machine->generic.videoram.u8;
55   mekd2_state *state = screen->machine->driver_data<mekd2_state>();
56   UINT8 *videoram = state->videoram;
5557   int width = screen->width();
5658    int x, y;
5759   static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3" };
src/mess/video/channelf.c
r9143r9144
4141
4242VIDEO_START( channelf )
4343{
44   machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x2000);
44   channelf_state *state = machine->driver_data<channelf_state>();
45   state->videoram = auto_alloc_array(machine, UINT8, 0x2000);
4546}
4647
4748static int recalc_palette_offset(int reg1, int reg2)
r9143r9144
5455
5556VIDEO_UPDATE( channelf )
5657{
57   UINT8 *videoram = screen->machine->generic.videoram.u8;
58   channelf_state *state = screen->machine->driver_data<channelf_state>();
59   UINT8 *videoram = state->videoram;
5860   int x,y,offset, palette_offset;
5961   int color;
6062   UINT16 pen;
src/mess/video/pc_mda.c
r9143r9144
123123   mda.chr_gen = memory_region( machine, "gfx1" );
124124
125125   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);
128128}
129129
130130
r9143r9144
144144
145145static MC6845_UPDATE_ROW( mda_text_inten_update_row )
146146{
147   UINT8 *videoram = device->machine->generic.videoram.u8;
147   UINT8 *videoram = pc_videoram;
148148   UINT16   *p = BITMAP_ADDR16( bitmap, y, 0 );
149149   UINT16   chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
150150   int i;
r9143r9144
218218
219219static MC6845_UPDATE_ROW( mda_text_blink_update_row )
220220{
221   UINT8 *videoram = device->machine->generic.videoram.u8;
221   UINT8 *videoram = pc_videoram;
222222   UINT16   *p = BITMAP_ADDR16( bitmap, y, 0 );
223223   UINT16   chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
224224   int i;
r9143r9144
477477   mda.chr_gen = memory_region( machine, "gfx1" );
478478
479479   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);
482482}
483483
484484
r9143r9144
491491
492492static MC6845_UPDATE_ROW( hercules_gfx_update_row )
493493{
494   UINT8 *videoram = device->machine->generic.videoram.u8;
494   UINT8 *videoram = pc_videoram;
495495   UINT16   *p = BITMAP_ADDR16( bitmap, y, 0 );
496496   UINT16   gfx_base = ( ( mda.mode_control & 0x80 ) ? 0x8000 : 0x0000 ) | ( ( ra & 0x03 ) << 13 );
497497   int i;
src/mess/video/pc_t1t.c
r9143r9144
405405
406406 READ8_HANDLER ( pc_t1t_videoram_r )
407407{
408   UINT8 *videoram = space->machine->generic.videoram.u8;
408   UINT8 *videoram = pc_videoram;
409409   int data = 0xff;
410410   if( videoram )
411411      data = videoram[offset];
r9143r9144
739739      dram = (data & 0x07) << 14;
740740      vram = (data & 0x38) << (14-3);
741741#endif
742      machine->generic.videoram.u8 = &ram[vram];
742      pc_videoram = &ram[vram];
743743      pcjr.displayram = &ram[dram];
744744      pc_t1t_mode_switch();
745745   }
src/mess/video/nascom1.c
r9143r9144
1111
1212VIDEO_UPDATE( nascom1 )
1313{
14   UINT8 *videoram = screen->machine->generic.videoram.u8;
14   nascom1_state *state = screen->machine->driver_data<nascom1_state>();
15   UINT8 *videoram = state->videoram;
1516   int   sy, sx;
1617
1718   for (sx = 0; sx < 48; sx++)
r9143r9144
3536
3637VIDEO_UPDATE( nascom2 )
3738{
38   UINT8 *videoram = screen->machine->generic.videoram.u8;
39   nascom1_state *state = screen->machine->driver_data<nascom1_state>();
40   UINT8 *videoram = state->videoram;
3941   int   sy, sx;
4042
4143   for (sx = 0; sx < 48; sx++)
src/mess/video/pc_aga.c
r9143r9144
124124
125125/* colors need fixing in the mda_text_* functions ! */
126126static MC6845_UPDATE_ROW( mda_text_inten_update_row ) {
127   UINT8 *videoram = device->machine->generic.videoram.u8;
127   UINT8 *videoram = pc_videoram;
128128   UINT16   *p = BITMAP_ADDR16( bitmap, y, 0 );
129129   UINT16   chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
130130   int i;
r9143r9144
183183
184184
185185static MC6845_UPDATE_ROW( mda_text_blink_update_row ) {
186   UINT8 *videoram = device->machine->generic.videoram.u8;
186   UINT8 *videoram = pc_videoram;
187187   UINT16   *p = BITMAP_ADDR16( bitmap, y, 0 );
188188   UINT16   chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
189189   int i;
r9143r9144
243243
244244
245245static MC6845_UPDATE_ROW( cga_text_inten_update_row ) {
246   UINT8 *videoram = device->machine->generic.videoram.u8;
246   UINT8 *videoram = pc_videoram;
247247   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
248248   int i;
249249
r9143r9144
272272}
273273
274274static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) {
275   UINT8 *videoram = device->machine->generic.videoram.u8;
275   UINT8 *videoram = pc_videoram;
276276   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
277277   int i;
278278
r9143r9144
300300}
301301
302302static MC6845_UPDATE_ROW( cga_text_blink_update_row ) {
303   UINT8 *videoram = device->machine->generic.videoram.u8;
303   UINT8 *videoram = pc_videoram;
304304   UINT16   *p = BITMAP_ADDR16(bitmap, y, 0);
305305   int i;
306306
r9143r9144
332332}
333333
334334static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) {
335   UINT8 *videoram = device->machine->generic.videoram.u8;
335   UINT8 *videoram = pc_videoram;
336336   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
337337   int i;
338338
r9143r9144
366366}
367367
368368static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) {
369   UINT8 *videoram = device->machine->generic.videoram.u8;
369   UINT8 *videoram = pc_videoram;
370370   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
371371   int i;
372372
r9143r9144
390390}
391391
392392static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) {
393   UINT8 *videoram = device->machine->generic.videoram.u8;
393   UINT8 *videoram = pc_videoram;
394394   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
395395   int i;
396396
r9143r9144
422422}
423423
424424static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) {
425   UINT8 *videoram = device->machine->generic.videoram.u8;
425   UINT8 *videoram = pc_videoram;
426426   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
427427   int i;
428428
r9143r9144
446446}
447447
448448static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row ) {
449   UINT8 *videoram = device->machine->generic.videoram.u8;
449   UINT8 *videoram = pc_videoram;
450450   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
451451   UINT8   fg = aga.cga_color_select & 0x0F;
452452   int i;
r9143r9144
777777
778778 READ8_HANDLER( pc_aga_videoram_r )
779779{
780   UINT8 *videoram = space->machine->generic.videoram.u8;
780   UINT8 *videoram = pc_videoram;
781781   switch (aga.mode) {
782782   case AGA_COLOR:
783783      if (offset>=0x8000) return videoram[offset-0x8000];
r9143r9144
791791
792792READ8_HANDLER( pc200_videoram_r )
793793{
794   UINT8 *videoram = space->machine->generic.videoram.u8;
794   UINT8 *videoram = pc_videoram;
795795   switch (aga.mode)
796796   {
797797      default:
src/mess/video/microtan.c
r9143r9144
2323
2424WRITE8_HANDLER( microtan_videoram_w )
2525{
26   UINT8 *videoram = space->machine->generic.videoram.u8;
26   microtan_state *state = space->machine->driver_data<microtan_state>();
27   UINT8 *videoram = state->videoram;
2728   if ((videoram[offset] != data) || (microtan_chunky_buffer[offset] != microtan_chunky_graphics))
2829   {
2930      videoram[offset] = data;
r9143r9144
3435
3536static TILE_GET_INFO(get_bg_tile_info)
3637{
37   UINT8 *videoram = machine->generic.videoram.u8;
38   microtan_state *state = machine->driver_data<microtan_state>();
39   UINT8 *videoram = state->videoram;
3840   int gfxn = microtan_chunky_buffer[tile_index];
3941   int code = videoram[tile_index];
4042
src/mess/video/pc_cga.c
r9143r9144
495495   }
496496
497497   pc_videoram_size = 0x4000;
498   machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 0x4000);
498   pc_videoram = auto_alloc_array(machine, UINT8, 0x4000);
499499
500   memory_set_bankptr(machine,"bank11", machine->generic.videoram.u8);
500   memory_set_bankptr(machine,"bank11", pc_videoram);
501501
502502   internal_pc_cga_video_start(machine, M6845_PERSONALITY_GENUINE);
503503
r9143r9144
558558
559559static MC6845_UPDATE_ROW( cga_text_inten_update_row )
560560{
561   UINT8 *videoram = device->machine->generic.videoram.u8;
561   UINT8 *videoram = pc_videoram;
562562   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
563563   int i;
564564   running_machine *machine = device->machine;
r9143r9144
597597
598598static MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row )
599599{
600   UINT8 *videoram = device->machine->generic.videoram.u8;
600   UINT8 *videoram = pc_videoram;
601601   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
602602   int i;
603603   running_machine *machine = device->machine;
r9143r9144
635635
636636static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row )
637637{
638   UINT8 *videoram = device->machine->generic.videoram.u8;
638   UINT8 *videoram = pc_videoram;
639639   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
640640   int i;
641641   running_machine *machine = device->machine;
r9143r9144
673673
674674static MC6845_UPDATE_ROW( cga_text_blink_update_row )
675675{
676   UINT8 *videoram = device->machine->generic.videoram.u8;
676   UINT8 *videoram = pc_videoram;
677677   UINT16   *p = BITMAP_ADDR16(bitmap, y, 0);
678678   int i;
679679   running_machine *machine = device->machine;
r9143r9144
722722
723723static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row )
724724{
725   UINT8 *videoram = device->machine->generic.videoram.u8;
725   UINT8 *videoram = pc_videoram;
726726   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
727727   int i;
728728   running_machine *machine = device->machine;
r9143r9144
769769
770770static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row )
771771{
772   UINT8 *videoram = device->machine->generic.videoram.u8;
772   UINT8 *videoram = pc_videoram;
773773   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
774774   int i;
775775   running_machine *machine = device->machine;
r9143r9144
826826
827827static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row )
828828{
829   UINT8 *videoram = device->machine->generic.videoram.u8;
829   UINT8 *videoram = pc_videoram;
830830   UINT8   samples[1280];
831831   UINT8   ntsc_decoded[3*1280];
832832   int      samp_index = 0;
r9143r9144
933933
934934static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row )
935935{
936   UINT8 *videoram = device->machine->generic.videoram.u8;
936   UINT8 *videoram = pc_videoram;
937937   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
938938   int i;
939939   running_machine *machine = device->machine;
r9143r9144
968968
969969static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row )
970970{
971   UINT8 *videoram = device->machine->generic.videoram.u8;
971   UINT8 *videoram = pc_videoram;
972972   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
973973   UINT8   fg = cga.color_select & 0x0F;
974974   int i;
r9143r9144
15591559
15601560static MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row )
15611561{
1562   UINT8 *videoram = device->machine->generic.videoram.u8;
1562   UINT8 *videoram = pc_videoram;
15631563   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
15641564   UINT16   offset_base = ra << 13;
15651565   int j;
r9143r9144
15881588
15891589static WRITE8_HANDLER ( pc1512_w )
15901590{
1591   UINT8 *videoram = space->machine->generic.videoram.u8;
1591   UINT8 *videoram = pc_videoram;
15921592   running_device *devconf = space->machine->device(CGA_MC6845_NAME);
15931593
15941594   switch (offset)
r9143r9144
17101710
17111711static WRITE8_HANDLER ( pc1512_videoram_w )
17121712{
1713   UINT8 *videoram = space->machine->generic.videoram.u8;
1713   UINT8 *videoram = pc_videoram;
17141714   if ( ( cga.mode_control & 0x12 ) == 0x12 )
17151715   {
17161716      if (pc1512.write & 1)
r9143r9144
17391739static VIDEO_START( pc1512 )
17401740{
17411741   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]);
17441744
17451745   memset( &pc1512, 0, sizeof ( pc1512 ) );
17461746   pc1512.write = 0xf;
src/mess/video/p2000m.c
r9143r9144
2121
2222VIDEO_UPDATE( p2000m )
2323{
24   UINT8 *videoram = screen->machine->generic.videoram.u8;
24   p2000t_state *state = screen->machine->driver_data<p2000t_state>();
25   UINT8 *videoram = state->videoram;
2526   int offs, sx, sy, code, loop;
2627
2728   for (offs = 0; offs < 80 * 24; offs++)
src/mess/video/intv.c
r9143r9144
778778
779779VIDEO_UPDATE( intvkbd )
780780{
781   UINT8 *videoram = screen->machine->generic.videoram.u8;
781   intv_state *state = screen->machine->driver_data<intv_state>();
782   UINT8 *videoram = state->videoram;
782783   int x,y,offs;
783784   int current_row;
784785//  char c;
src/mess/video/ssystem3.c
r9143r9144
5252
5353VIDEO_START( ssystem3 )
5454{
55   ssystem3_state *state = machine->driver_data<ssystem3_state>();
5556   // artwork seams to need this
56   machine->generic.videoram.u8 = auto_alloc_array(machine, UINT8, 6 * 2 + 24);
57   state->videoram = auto_alloc_array(machine, UINT8, 6 * 2 + 24);
5758}
5859
5960
src/mess/video/samcoupe.c
r9143r9144
2828
2929static void draw_mode4_line(running_machine *machine, int y, int hpos)
3030{
31   UINT8 *videoram = machine->generic.videoram.u8;
31   samcoupe_state *state = machine->driver_data<samcoupe_state>();
32   UINT8 *videoram = state->videoram;
3233   samcoupe_state *asic = machine->driver_data<samcoupe_state>();
3334
3435   /* get start address */
r9143r9144
5354
5455static void draw_mode3_line(running_machine *machine, int y, int hpos)
5556{
56   UINT8 *videoram = machine->generic.videoram.u8;
57   samcoupe_state *state = machine->driver_data<samcoupe_state>();
58   UINT8 *videoram = state->videoram;
5759   samcoupe_state *asic = machine->driver_data<samcoupe_state>();
5860
5961   /* get start address */
r9143r9144
9294
9395static void draw_mode2_line(running_machine *machine, int y, int hpos)
9496{
95   UINT8 *videoram = machine->generic.videoram.u8;
97   samcoupe_state *state = machine->driver_data<samcoupe_state>();
98   UINT8 *videoram = state->videoram;
9699   samcoupe_state *asic = machine->driver_data<samcoupe_state>();
97100
98101   int cell = (y - SAM_BORDER_TOP) * 32 + (hpos - SAM_BORDER_LEFT) / SAM_BLOCK / 2;
r9143r9144
105108
106109static void draw_mode1_line(running_machine *machine, int y, int hpos)
107110{
108   UINT8 *videoram = machine->generic.videoram.u8;
111   samcoupe_state *state = machine->driver_data<samcoupe_state>();
112   UINT8 *videoram = state->videoram;
109113   samcoupe_state *asic = machine->driver_data<samcoupe_state>();
110114
111115   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
r9143r9144
5555/* 7 or 8-bit video, 32/64 characters per line = trs80, trs80l2, sys80 */
5656VIDEO_UPDATE( trs80 )
5757{
58   UINT8 *videoram = screen->machine->generic.videoram.u8;
58   trs80_state *state = screen->machine->driver_data<trs80_state>();
59   UINT8 *videoram = state->videoram;
5960   UINT8 y,ra,chr,gfx,gfxbit;
6061   UINT16 sy=0,ma=0,x;
6162   UINT8 *FNT = memory_region(screen->machine, "gfx1");
r9143r9144
118119/* 8-bit video, 32/64/40/80 characters per line = trs80m3, trs80m4. */
119120VIDEO_UPDATE( trs80m4 )
120121{
121   UINT8 *videoram = screen->machine->generic.videoram.u8;
122   trs80_state *state = screen->machine->driver_data<trs80_state>();
123   UINT8 *videoram = state->videoram;
122124   UINT8 y,ra,chr,gfx,gfxbit;
123125   UINT16 sy=0,ma=0,x;
124126   UINT8 *FNT = memory_region(screen->machine, "gfx1");
r9143r9144
214216/* 7 or 8-bit video, 64/32 characters per line = ht1080z, ht1080z2, ht108064 */
215217VIDEO_UPDATE( ht1080z )
216218{
217   UINT8 *videoram = screen->machine->generic.videoram.u8;
219   trs80_state *state = screen->machine->driver_data<trs80_state>();
220   UINT8 *videoram = state->videoram;
218221   UINT8 y,ra,chr,gfx,gfxbit;
219222   UINT16 sy=0,ma=0,x;
220223   UINT8 *FNT = memory_region(screen->machine, "gfx1");
r9143r9144
274277/* 8-bit video, 64/80 characters per line = lnw80 */
275278VIDEO_UPDATE( lnw80 )
276279{
277   UINT8 *videoram = screen->machine->generic.videoram.u8;
280   trs80_state *state = screen->machine->driver_data<trs80_state>();
281   UINT8 *videoram = state->videoram;
278282   const UINT16 rows[] = { 0, 0x200, 0x100, 0x300, 1, 0x201, 0x101, 0x301 };
279283   UINT8 chr,gfx,gfxbit,bg=7,fg=0;
280284   UINT16 sy=0,ma=0,x,y,ra;
r9143r9144
448452/* lores characters are in the character generator. Each character is 8x16. */
449453VIDEO_UPDATE( radionic )
450454{
451   UINT8 *videoram = screen->machine->generic.videoram.u8;
455   trs80_state *state = screen->machine->driver_data<trs80_state>();
456   UINT8 *videoram = state->videoram;
452457   UINT8 y,ra,chr,gfx;
453458   UINT16 sy=0,ma=0,x;
454459   UINT8 *FNT = memory_region(screen->machine, "gfx1");
r9143r9144
497502
498503READ8_HANDLER( trs80_videoram_r )
499504{
500   UINT8 *videoram = space->machine->generic.videoram.u8;
505   trs80_state *state = space->machine->driver_data<trs80_state>();
506   UINT8 *videoram = state->videoram;
501507   if ((trs80_mode & 0x80) && (~trs80_model4 & 1)) offset |= 0x400;
502508   return videoram[offset];
503509}
504510
505511WRITE8_HANDLER( trs80_videoram_w )
506512{
507   UINT8 *videoram = space->machine->generic.videoram.u8;
513   trs80_state *state = space->machine->driver_data<trs80_state>();
514   UINT8 *videoram = state->videoram;
508515   if ((trs80_mode & 0x80) && (~trs80_model4 & 1)) offset |= 0x400;
509516   videoram[offset] = data;
510517}
src/mess/video/hec2video.c
r9143r9144
152152
153153VIDEO_UPDATE( hec2hrp )
154154{
155   UINT8 *videoram = screen->machine->generic.videoram.u8;
155   hec2hrp_state *state = screen->machine->driver_data<hec2hrp_state>();
156   UINT8 *videoram = state->videoram;
156157    if (hector_flag_hr==1)
157158        {
158159           if (hector_flag_80c==0)
src/mess/video/pc_video_mess.c
r9143r9144
2020***************************************************************************/
2121
2222size_t pc_videoram_size;
23UINT8 *pc_videoram;
2324
2425static pc_video_update_proc (*pc_choosevideomode)(running_machine *machine, int *width, int *height, struct mscrtc6845 *crtc);
2526static struct mscrtc6845 *pc_crtc;
r9143r9144
124125
125126WRITE8_HANDLER ( pc_video_videoram_w )
126127{
127   UINT8 *videoram = space->machine->generic.videoram.u8;
128   UINT8 *videoram = pc_videoram;
128129   if (videoram && videoram[offset] != data)
129130   {
130131      videoram[offset] = data;
r9143r9144
137138
138139WRITE32_HANDLER( pc_video_videoram32_w )
139140{
140   UINT32 *videoram = space->machine->generic.videoram.u32;
141   UINT32 *videoram = (UINT32 *)pc_videoram;
141142   COMBINE_DATA(videoram + offset);
142143   pc_anythingdirty = 1;
143144}
src/mess/video/pc_video_mess.h
r9143r9144
1212#include "includes/crtc6845.h"
1313
1414extern size_t pc_videoram_size;
15extern UINT8 *pc_videoram;
1516
1617typedef void (*pc_video_update_proc)(bitmap_t *bitmap,
1718   struct mscrtc6845 *crtc);
src/mess/video/vtech2.c
r9143r9144
122122
123123VIDEO_UPDATE( laser )
124124{
125   UINT8 *videoram = screen->machine->generic.videoram.u8;
125   vtech2_state *state = screen->machine->driver_data<vtech2_state>();
126   UINT8 *videoram = state->videoram;
126127   int offs, x, y;
127128   int full_refresh = 1;
128129
src/mess/includes/vtech2.h
r9143r9144
88#define VTECH2_H_
99
1010
11class vtech2_state : public driver_device
12{
13public:
14   vtech2_state(running_machine &machine, const driver_device_config_base &config)
15      : driver_device(machine, config) { }
16
17   UINT8 *videoram;
18};
19
20
1121/*----------- defined in machine/vtech2.c -----------*/
1222
1323extern int laser_latch;
src/mess/includes/dgn_beta.h
r9143r9144
7474#define iosize   (0xfEFF-0xfc00)
7575
7676
77class dgn_beta_state : public driver_device
78{
79public:
80   dgn_beta_state(running_machine &machine, const driver_device_config_base &config)
81      : driver_device(machine, config) { }
82
83   UINT8 *videoram;
84};
85
86
7787/*----------- defined in machine/dgn_beta.c -----------*/
7888
7989extern const wd17xx_interface dgnbeta_wd17xx_interface;
src/mess/includes/z80ne.h
r9143r9144
2424#define LX385_TAPE_SAMPLE_FREQ 38400
2525
2626
27class z80ne_state : public driver_device
28{
29public:
30   z80ne_state(running_machine &machine, const driver_device_config_base &config)
31      : driver_device(machine, config) { }
32
33   UINT8 *videoram;
34};
35
36
2737/*----------- defined in machine/z80ne.c -----------*/
2838
2939READ8_HANDLER(lx383_r);
src/mess/includes/cbmb.h
r9143r9144
2929   int p500;
3030   int cbm700;
3131   int cbm_ntsc;
32   UINT8 *videoram;
3233};
3334
3435/*----------- defined in machine/cbmb.c -----------*/
src/mess/includes/mbee.h
r9143r9144
1616#include "sound/speaker.h"
1717
1818
19class mbee_state : public driver_device
20{
21public:
22   mbee_state(running_machine &machine, const driver_device_config_base &config)
23      : driver_device(machine, config) { }
24
25   UINT8 *videoram;
26};
27
28
1929/*----------- defined in drivers/mbee.c -----------*/
2030
2131extern size_t mbee_size;
src/mess/includes/pocketc.h
r9143r9144
88#define POCKETC_H_
99
1010
11class pocketc_state : public driver_device
12{
13public:
14   pocketc_state(running_machine &machine, const driver_device_config_base &config)
15      : driver_device(machine, config) { }
16
17   UINT8 *videoram;
18};
19
20
1121/*----------- defined in video/pocketc.c -----------*/
1222
1323extern PALETTE_INIT( pocketc );
src/mess/includes/x1.h
r9143r9144
99
1010#include "cpu/z80/z80daisy.h"
1111
12extern UINT8 x1_key_irq_flag;
13extern UINT8 x1_key_irq_vector;
14
1512// ======================>  x1_keyboard_device_config
1613
1714class x1_keyboard_device_config :   public device_config,
r9143r9144
5148   const x1_keyboard_device_config &m_config;
5249};
5350
51class x1_state : public driver_device
52{
53public:
54   x1_state(running_machine &machine, const driver_device_config_base &config)
55      : driver_device(machine, config) { }
56
57   UINT8 *videoram;
58};
59
60
61/*----------- defined in drivers/x1.c -----------*/
62
63extern UINT8 x1_key_irq_flag;
64extern UINT8 x1_key_irq_vector;
65
66/*----------- defined in machine/x1.c -----------*/
67
5468extern const device_type X1_KEYBOARD;
5569
5670#endif /* X1_H_ */
src/mess/includes/concept.h
r9143r9144
1414#include "machine/6522via.h"
1515#include "machine/wd17xx.h"
1616
17class concept_state : public driver_device
18{
19public:
20   concept_state(running_machine &machine, const driver_device_config_base &config)
21      : driver_device(machine, config) { }
22
23   UINT16 *videoram;
24};
25
26
1727/*----------- defined in machine/concept.c -----------*/
1828
1929extern const via6522_interface concept_via6522_intf;
src/mess/includes/mz700.h
r9143r9144
4646   int hires_mode;         /* 1 if in 640x200 mode */
4747   int screen;          /* screen designation */
4848   UINT8 *colorram;
49   UINT8 *videoram;
4950};
5051
5152
src/mess/includes/cgenie.h
r9143r9144
99
1010#include "machine/wd17xx.h"
1111
12class cgenie_state : public driver_device
13{
14public:
15   cgenie_state(running_machine &machine, const driver_device_config_base &config)
16      : driver_device(machine, config) { }
17
18   UINT8 *videoram;
19};
20
21
1222/*----------- defined in machine/cgenie.c -----------*/
1323
1424READ8_DEVICE_HANDLER( cgenie_sh_control_port_r );
src/mess/includes/aquarius.h
r9143r9144
77#ifndef __AQUARIUS__
88#define __AQUARIUS__
99
10class aquarius_state : public driver_device
11{
12public:
13   aquarius_state(running_machine &machine, const driver_device_config_base &config)
14      : driver_device(machine, config) { }
15
16   UINT8 *videoram;
17};
18
19
1020/*----------- defined in video/aquarius.c -----------*/
1121
1222extern UINT8 *aquarius_colorram;
src/mess/includes/kaypro.h
r9143r9144
77#include "devices/snapquik.h"
88
99
10class kaypro_state : public driver_device
11{
12public:
13   kaypro_state(running_machine &machine, const driver_device_config_base &config)
14      : driver_device(machine, config) { }
15
16   UINT8 *videoram;
17};
18
19
1020/*----------- defined in machine/kaypro.c -----------*/
1121
1222extern const z80pio_interface kayproii_pio_g_intf;
src/mess/includes/super80.h
r9143r9144
11#include "video/mc6845.h"
22#include "machine/z80pio.h"
33
4class super80_state : public driver_device
5{
6public:
7   super80_state(running_machine &machine, const driver_device_config_base &config)
8      : driver_device(machine, config) { }
9
10   UINT8 *videoram;
11};
12
13
414/*----------- defined in drivers/super80.c -----------*/
515
616extern UINT8 *super80_pcgram;
src/mess/includes/p2000t.h
r9143r9144
88#define P2000T_H_
99
1010
11class p2000t_state : public driver_device
12{
13public:
14   p2000t_state(running_machine &machine, const driver_device_config_base &config)
15      : driver_device(machine, config) { }
16
17   UINT8 *videoram;
18};
19
20
1121/*----------- defined in machine/p2000t.c -----------*/
1222
1323extern  READ8_HANDLER( p2000t_port_000f_r );
src/mess/includes/pet.h
r9143r9144
2525   int pia0_irq;
2626   int pia1_irq;
2727   int via_irq;
28   UINT8 *videoram;
2829};
2930
3031/*----------- defined in video/pet.c -----------*/
src/mess/includes/mekd2.h
r9143r9144
88#define MEKD2_H_
99
1010
11class mekd2_state : public driver_device
12{
13public:
14   mekd2_state(running_machine &machine, const driver_device_config_base &config)
15      : driver_device(machine, config) { }
16
17   UINT8 *videoram;
18};
19
20
1121/*----------- defined in machine/mekd2.c -----------*/
1222
1323DRIVER_INIT( mekd2 );
src/mess/includes/channelf.h
r9143r9144
99
1010
1111
12class channelf_state : public driver_device
13{
14public:
15   channelf_state(running_machine &machine, const driver_device_config_base &config)
16      : driver_device(machine, config) { }
17
18   UINT8 *videoram;
19};
20
21
1222/*----------- defined in video/channelf.c -----------*/
1323
1424extern UINT8 channelf_val_reg;
src/mess/includes/hec2hrp.h
r9143r9144
3535           Adjust the one shot and A/D timing (sn76477)
3636*/
3737
38
39/* Enum status for high memory bank (c000 - ffff)*/
40enum
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*/
46enum
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
53class hec2hrp_state : public driver_device
54{
55public:
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*/
66extern sn76477_interface hector_sn76477_interface;
67
3868/* Protoype of memory Handler*/
3969extern WRITE8_HANDLER( hector_switch_bank_w );
4070extern READ8_HANDLER( hector_keyboard_r );
r9143r9144
4979extern void hector_init(running_machine *machine);
5080extern void hector_reset(running_machine *machine, int hr);
5181
52extern READ8_HANDLER( hector_mx_io_port_r);
53extern WRITE8_HANDLER( hector_mx80_io_port_w);
54extern WRITE8_HANDLER( hector_mx40_io_port_w);
82extern READ8_HANDLER( hector_mx_io_port_r );
83extern WRITE8_HANDLER( hector_mx80_io_port_w );
84extern WRITE8_HANDLER( hector_mx40_io_port_w );
5585
5686
57/* Prototype of video function*/
87/*----------- defined in video/hec2video.c -----------*/
88
5889extern void hector_80c(bitmap_t *bitmap, UINT8 *page, int ymax, int yram) ;
5990extern void hector_hr(bitmap_t *bitmap, UINT8 *page, int ymax, int yram) ;
6091VIDEO_START( hec2hrp );
r9143r9144
71102
72103/* Color status*/
73104extern UINT8 hector_color[4];
74
75/* Sound function*/
76extern sn76477_interface hector_sn76477_interface;
77
78
79/* Enum status for high memory bank (c000 - ffff)*/
80enum
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*/
86enum
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/includes/nascom1.h
r9143r9144
1111#include "machine/wd17xx.h"
1212
1313
14class nascom1_state : public driver_device
15{
16public:
17   nascom1_state(running_machine &machine, const driver_device_config_base &config)
18      : driver_device(machine, config) { }
19
20   UINT8 *videoram;
21};
22
23
1424/*----------- defined in machine/nascom1.c -----------*/
1525
1626extern const wd17xx_interface nascom2_wd17xx_interface;
src/mess/includes/microtan.h
r9143r9144
1919#include "machine/6522via.h"
2020
2121
22class microtan_state : public driver_device
23{
24public:
25   microtan_state(running_machine &machine, const driver_device_config_base &config)
26      : driver_device(machine, config) { }
27
28   UINT8 *videoram;
29};
30
31
2232/*----------- defined in machine/microtan.c -----------*/
2333
2434extern const via6522_interface microtan_via6522_0;
src/mess/includes/intv.h
r9143r9144
2828   int dirty;
2929};
3030
31class intv_state : public driver_device
32{
33public:
34   intv_state(running_machine &machine, const driver_device_config_base &config)
35      : driver_device(machine, config) { }
36
37   UINT8 *videoram;
38};
39
40
3141/*----------- defined in video/stic.c -----------*/
3242
3343READ16_HANDLER( intv_stic_r );
src/mess/includes/jupiter.h
r9143r9144
88#define JUPITER_H_
99
1010
11class jupiter_state : public driver_device
12{
13public:
14   jupiter_state(running_machine &machine, const driver_device_config_base &config)
15      : driver_device(machine, config) { }
16
17   UINT8 *videoram;
18};
19
20
1121/*----------- defined in machine/jupiter.c -----------*/
1222
1323DIRECT_UPDATE_HANDLER( jupiter_opbaseoverride );
src/mess/includes/ssystem3.h
r9143r9144
88#define SSYSTEM3_H_
99
1010
11class ssystem3_state : public driver_device
12{
13public:
14   ssystem3_state(running_machine &machine, const driver_device_config_base &config)
15      : driver_device(machine, config) { }
16
17   UINT8 *videoram;
18};
19
20
1121/*----------- defined in drivers/ssystem3.c -----------*/
1222
1323void ssystem3_playfield_getfigure(int x, int y, int *figure, int *black);
src/mess/includes/samcoupe.h
r9143r9144
5454   emu_timer *mouse_reset;
5555   UINT8 mouse_data[9];
5656   int mouse_x, mouse_y;
57   UINT8 *videoram;
5758};
5859
5960
src/mess/includes/trs80.h
r9143r9144
1414#define FH 12
1515
1616
17class trs80_state : public driver_device
18{
19public:
20   trs80_state(running_machine &machine, const driver_device_config_base &config)
21      : driver_device(machine, config) { }
22
23   UINT8 *videoram;
24};
25
26
1727/*----------- defined in drivers/trs80.c -----------*/
1828
1929extern UINT8 trs80_model4;
src/mess/includes/svision.h
r9143r9144
99
1010
1111
12class svision_state : public driver_device
13{
14public:
15   svision_state(running_machine &machine, const driver_device_config_base &config)
16      : driver_device(machine, config) { }
17
18   UINT8 *videoram;
19};
20
21
1222/*----------- defined in drivers/svision.c -----------*/
1323
1424void svision_irq( running_machine *machine );
src/mess/drivers/dgn_beta.c
r9143r9144
141141   AM_RANGE(0x3000, 0x3FFF)   AM_RAMBANK("bank4")
142142   AM_RANGE(0x4000, 0x4FFF)   AM_RAMBANK("bank5")
143143   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)
145145   AM_RANGE(0x7000, 0x7FFF)   AM_RAMBANK("bank8")
146146   AM_RANGE(0x8000, 0x8FFF)   AM_RAMBANK("bank9")
147147   AM_RANGE(0x9000, 0x9FFF)   AM_RAMBANK("bank10")
r9143r9144
316316GFXDECODE_END
317317
318318
319static MACHINE_CONFIG_START( dgnbeta, driver_device )
319static MACHINE_CONFIG_START( dgnbeta, dgn_beta_state )
320320   /* basic machine hardware */
321321   MDRV_CPU_ADD(MAINCPU_TAG, M6809E, DGNBETA_CPU_SPEED_HZ)        /* 2 MHz */
322322   MDRV_CPU_PROGRAM_MAP(dgnbeta_map)
src/mess/drivers/cbmb.c
r9143r9144
8484* Add better P500 emulation (almost everything: memory access, inputs,
8585    Datasette, etc.)
8686
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 )
8888    and use the 60Hz version for the whole High Profile
8989
9090* Find info about the following models (if ever existed):
r9143r9144
134134   AM_RANGE(0xf4000, 0xf5fff) AM_ROM
135135   AM_RANGE(0xf6000, 0xf7fff) AM_ROM
136136   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 */
138138   AM_RANGE(0xfd800, 0xfd800) AM_MIRROR(0xfe) AM_DEVWRITE("crtc", mc6845_address_w)
139139   AM_RANGE(0xfd801, 0xfd801) AM_MIRROR(0xfe) AM_DEVREADWRITE("crtc", mc6845_register_r , mc6845_register_w)
140140   /* disk units */
src/mess/drivers/x1.c
r9143r9144
258258
259259static VIDEO_START( x1 )
260260{
261   x1_state *state = machine->driver_data<x1_state>();
261262   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);
263264   gfx_bitmap_ram = auto_alloc_array(machine, UINT8, 0xc000*2);
264265}
265266
266267static void draw_fgtilemap(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int w)
267268{
268   UINT8 *videoram = machine->generic.videoram.u8;
269   x1_state *state = machine->driver_data<x1_state>();
270   UINT8 *videoram = state->videoram;
269271   int y,x,res_x,res_y;
270272   int screen_mask;
271273
r9143r9144
10231025
10241026static READ8_HANDLER( x1_pcg_r )
10251027{
1026   UINT8 *videoram = space->machine->generic.videoram.u8;
1028   x1_state *state = space->machine->driver_data<x1_state>();
1029   UINT8 *videoram = state->videoram;
10271030   int addr;
10281031   int calc_pcg_offset;
10291032   static UINT32 kanji_offset;
r9143r9144
10821085
10831086static WRITE8_HANDLER( x1_pcg_w )
10841087{
1085   UINT8 *videoram = space->machine->generic.videoram.u8;
1088   x1_state *state = space->machine->driver_data<x1_state>();
1089   UINT8 *videoram = state->videoram;
10861090   int addr,pcg_offset;
10871091   UINT8 *PCG_RAM = memory_region(space->machine, "pcg");
10881092   static UINT16 used_pcg_addr;
r9143r9144
13331337
13341338static READ8_HANDLER( x1_io_r )
13351339{
1336   UINT8 *videoram = space->machine->generic.videoram.u8;
1340   x1_state *state = space->machine->driver_data<x1_state>();
1341   UINT8 *videoram = state->videoram;
13371342   io_bank_mode = 0; //any read disables the extended mode.
13381343
13391344   //if(offset >= 0x0704 && offset <= 0x0707)      { return z80ctc_r(space->machine->device("ctc"), offset-0x0704); }
r9143r9144
13621367
13631368static WRITE8_HANDLER( x1_io_w )
13641369{
1365   UINT8 *videoram = space->machine->generic.videoram.u8;
1370   x1_state *state = space->machine->driver_data<x1_state>();
1371   UINT8 *videoram = state->videoram;
13661372   if(io_bank_mode == 1)                          { x1_ex_gfxram_w(space, offset, data); }
13671373//  else if(offset >= 0x0704 && offset <= 0x0707)   { z80ctc_w(space->machine->device("ctc"), offset-0x0704,data); }
13681374//  else if(offset >= 0x0c00 && offset <= 0x0cff)   { x1_rs232c_w(space->machine, 0, data); }
r9143r9144
14031409
14041410static READ8_HANDLER( x1turbo_io_r )
14051411{
1406   UINT8 *videoram = space->machine->generic.videoram.u8;
1412   x1_state *state = space->machine->driver_data<x1_state>();
1413   UINT8 *videoram = state->videoram;
14071414   io_bank_mode = 0; //any read disables the extended mode.
14081415
14091416   if(offset == 0x0700)                     { return (ym2151_r(space->machine->device("ym"), offset-0x0700) & 0x7f) | (input_port_read(space->machine, "SOUND_SW") & 0x80); }
r9143r9144
14411448
14421449static WRITE8_HANDLER( x1turbo_io_w )
14431450{
1444   UINT8 *videoram = space->machine->generic.videoram.u8;
1451   x1_state *state = space->machine->driver_data<x1_state>();
1452   UINT8 *videoram = state->videoram;
14451453   if(io_bank_mode == 1)                          { x1_ex_gfxram_w(space, offset, data); }
14461454   else if(offset == 0x0700 || offset == 0x0701)   { ym2151_w(space->machine->device("ym"), offset-0x0700,data); }
14471455   else if(offset >= 0x0704 && offset <= 0x0707)   { z80ctc_w(space->machine->device("ctc"), offset-0x0704,data); }
r9143r9144
22232231   "x1_flop"
22242232};
22252233
2226static MACHINE_CONFIG_START( x1, driver_device )
2234static MACHINE_CONFIG_START( x1, x1_state )
22272235   /* basic machine hardware */
22282236   MDRV_CPU_ADD("maincpu", Z80, MAIN_CLOCK/4)
22292237   MDRV_CPU_PROGRAM_MAP(x1_mem)
src/mess/drivers/p2000t.c
r9143r9144
5959static ADDRESS_MAP_START( p2000m_mem , ADDRESS_SPACE_PROGRAM, 8)
6060   AM_RANGE(0x0000, 0x0fff) AM_ROM
6161   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)
6363   AM_RANGE(0x6000, 0x9fff) AM_RAM
6464   AM_RANGE(0xa000, 0xffff) AM_NOP
6565ADDRESS_MAP_END
r9143r9144
229229};
230230
231231/* Machine definition */
232static MACHINE_CONFIG_START( p2000t, driver_device )
232static MACHINE_CONFIG_START( p2000t, p2000t_state )
233233   /* basic machine hardware */
234234   MDRV_CPU_ADD("maincpu", Z80, 2500000)
235235   MDRV_CPU_PROGRAM_MAP(p2000t_mem)
r9143r9144
261261
262262
263263/* Machine definition */
264static MACHINE_CONFIG_START( p2000m, driver_device )
264static MACHINE_CONFIG_START( p2000m, p2000t_state )
265265   /* basic machine hardware */
266266   MDRV_CPU_ADD("maincpu", Z80, 2500000)
267267   MDRV_CPU_PROGRAM_MAP(p2000m_mem)
src/mess/drivers/pet.c
r9143r9144
402402 *************************************/
403403
404404static 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)
406406   AM_RANGE(0xa000, 0xe7ff) AM_ROM
407407   AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
408408   AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w)
r9143r9144
412412ADDRESS_MAP_END
413413
414414static 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)
416416   AM_RANGE(0xa000, 0xe7ff) AM_ROM
417417   AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
418418   AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w)
r9143r9144
460460*/
461461static ADDRESS_MAP_START( superpet_mem , ADDRESS_SPACE_PROGRAM, 8)
462462   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)
464464   AM_RANGE(0xa000, 0xe7ff) AM_ROM
465465   AM_RANGE(0xe810, 0xe813) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
466466   AM_RANGE(0xe820, 0xe823) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w)
src/mess/drivers/mekd2.c
r9143r9144
4747
4848static WRITE8_HANDLER(mekd2_kbd_w)
4949{
50   UINT8 *videoram = space->machine->generic.videoram.u8;
50   mekd2_state *state = space->machine->driver_data<mekd2_state>();
51   UINT8 *videoram = state->videoram;
5152   pia[offset] = data;
5253   switch( offset )
5354   {
r9143r9144
197198   GFXDECODE_ENTRY( "gfx2", 0, key_layout, 16*2, 2 )
198199GFXDECODE_END
199200
200static MACHINE_CONFIG_START( mekd2, driver_device )
201static MACHINE_CONFIG_START( mekd2, mekd2_state )
201202   /* basic machine hardware */
202203   MDRV_CPU_ADD("maincpu", M6800, 614400)        /* 614.4 kHz */
203204   MDRV_CPU_PROGRAM_MAP(mekd2_mem)
src/mess/drivers/nascom1.c
r9143r9144
7474
7575static ADDRESS_MAP_START( nascom1_mem, ADDRESS_SPACE_PROGRAM, 8 )
7676   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)
7878   AM_RANGE(0x0c00, 0x0fff) AM_RAM
7979   AM_RANGE(0x1000, 0x13ff) AM_RAM   /* 1Kb */
8080   AM_RANGE(0x1400, 0x4fff) AM_RAM   /* 16Kb */
r9143r9144
275275};
276276
277277
278static MACHINE_CONFIG_START( nascom1, driver_device )
278static MACHINE_CONFIG_START( nascom1, nascom1_state )
279279   /* basic machine hardware */
280280   MDRV_CPU_ADD("maincpu", Z80, XTAL_16MHz/8)
281281   MDRV_CPU_PROGRAM_MAP(nascom1_mem)
src/mess/drivers/microtan.c
r9143r9144
5454
5555static ADDRESS_MAP_START( microtan_map, ADDRESS_SPACE_PROGRAM, 8 )
5656   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)
5858   AM_RANGE(0xbc00, 0xbc00) AM_DEVWRITE("ay8910.1", ay8910_address_w)
5959   AM_RANGE(0xbc01, 0xbc01) AM_DEVREADWRITE("ay8910.1", ay8910_r, ay8910_data_w)
6060   AM_RANGE(0xbc02, 0xbc02) AM_DEVWRITE("ay8910.2", ay8910_address_w)
r9143r9144
215215   DEVCB_NULL
216216};
217217
218static MACHINE_CONFIG_START( microtan, driver_device )
218static MACHINE_CONFIG_START( microtan, microtan_state )
219219   /* basic machine hardware */
220220   MDRV_CPU_ADD("maincpu", M6502, 750000)   // 750 kHz
221221   MDRV_CPU_PROGRAM_MAP(microtan_map)
src/mess/drivers/ti99_2.c
r9143r9144
8181#include "machine/tms9901.h"
8282#include "cpu/tms9900/tms9900.h"
8383
84
85class ti99_2_state : public driver_device
86{
87public:
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
8495static int ROM_paged;
8596static int state = ASSERT_LINE;
8697
r9143r9144
137148
138149static VIDEO_UPDATE(ti99_2)
139150{
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;
141153   int i, sx, sy;
142154
143155
r9143r9144
187199   AM_RANGE(0x4000, 0x5fff) AM_ROMBANK("bank1")   /* system ROM, banked on 32kb ROMs protos */
188200   AM_RANGE(0x6000, 0xdfff) AM_NOP          /* free for expansion */
189201   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)
191203   AM_RANGE(0xef00, 0xefff) AM_RAM          /* system RAM */
192204   AM_RANGE(0xf000, 0xffff) AM_NOP          /* free for expansion (and internal processor RAM) */
193205ADDRESS_MAP_END
r9143r9144
352364   1           /* enable automatic wait state generation */
353365};
354366
355static MACHINE_CONFIG_START( ti99_2, driver_device )
367static MACHINE_CONFIG_START( ti99_2, ti99_2_state )
356368   /* basic machine hardware */
357369   MDRV_CPU_ADD("maincpu", TMS9995, 10700000)
358370   MDRV_CPU_CONFIG(ti99_2_processor_config)
src/mess/drivers/trs80.c
r9143r9144
164164static ADDRESS_MAP_START( trs80_map, ADDRESS_SPACE_PROGRAM, 8 )
165165   AM_RANGE(0x0000, 0x0fff) AM_ROM
166166   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)
168168   AM_RANGE(0x4000, 0x7fff) AM_RAM
169169ADDRESS_MAP_END
170170
r9143r9144
185185   AM_RANGE(0x37ee, 0x37ee) AM_DEVREADWRITE("wd179x", wd17xx_sector_r, wd17xx_sector_w)
186186   AM_RANGE(0x37ef, 0x37ef) AM_DEVREADWRITE("wd179x", wd17xx_data_r, wd17xx_data_w)
187187   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)
189189   AM_RANGE(0x4000, 0xffff) AM_RAM
190190ADDRESS_MAP_END
191191
r9143r9144
554554   NULL
555555};
556556
557static MACHINE_CONFIG_START( trs80, driver_device )      // the original model I, level I, with no extras
557static MACHINE_CONFIG_START( trs80, trs80_state )      // the original model I, level I, with no extras
558558   /* basic machine hardware */
559559   MDRV_CPU_ADD("maincpu", Z80, 1796000)        /* 1.796 MHz */
560560   MDRV_CPU_PROGRAM_MAP(trs80_map)
r9143r9144
837837
838838static DRIVER_INIT( trs80m4 )
839839{
840   trs80_state *state = machine->driver_data<trs80_state>();
840841   trs80_mode = 0;
841842   trs80_model4 = 2;
842   machine->generic.videoram.u8 = memory_region(machine, "maincpu")+0x4000;
843   state->videoram = memory_region(machine, "maincpu")+0x4000;
843844}
844845
845846static DRIVER_INIT( trs80m4p )
846847{
848   trs80_state *state = machine->driver_data<trs80_state>();
847849   trs80_mode = 0;
848850   trs80_model4 = 4;
849   machine->generic.videoram.u8 = memory_region(machine, "maincpu")+0x4000;
851   state->videoram = memory_region(machine, "maincpu")+0x4000;
850852}
851853
852854static DRIVER_INIT( lnw80 )
853855{
856   trs80_state *state = machine->driver_data<trs80_state>();
854857   trs80_mode = 0;
855858   trs80_model4 = 0;
856859   trs80_gfxram = memory_region(machine, "gfx2");
857   machine->generic.videoram.u8 = memory_region(machine, "gfx2")+0x4000;
860   state->videoram = memory_region(machine, "gfx2")+0x4000;
858861}
859862
860863/*    YEAR  NAME      PARENT  COMPAT  MACHINE     INPUT    INIT  COMPANY  FULLNAME */
src/mess/drivers/interact.c
r9143r9144
6161
6262#include "includes/hec2hrp.h"
6363
64
65class interact_state : public driver_device
66{
67public:
68   interact_state(running_machine &machine, const driver_device_config_base &config)
69      : driver_device(machine, config) { }
70
71   UINT8 *videoram;
72};
73
74
6475static ADDRESS_MAP_START(interact_mem, ADDRESS_SPACE_PROGRAM, 8)
6576   ADDRESS_MAP_UNMAP_HIGH
6677   /* Hardware address mapping*/
r9143r9144
7788 /*   AM_RANGE(0x1000,0x3fff) AM_RAM*/
7889
7990   /* 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)
8192   /* continous RAM*/
8293   AM_RANGE(0x4A00,0xffff) AM_RAM
8394
r9143r9144
116127
117128static VIDEO_UPDATE( interact )
118129{
119   UINT8 *videoram = screen->machine->generic.videoram.u8;
130   interact_state *state = screen->machine->driver_data<interact_state>();
131   UINT8 *videoram = state->videoram;
120132   screen->set_visible_area(0, 113, 0, 75);
121133   hector_hr( bitmap, videoram,  77, 32);
122134   return 0;
123135}
124136
125static MACHINE_CONFIG_START( interact, driver_device )
137static MACHINE_CONFIG_START( interact, interact_state )
126138
127139   /* basic machine hardware */
128140   MDRV_CPU_ADD("maincpu", I8080, XTAL_2MHz)
r9143r9144
163175
164176MACHINE_CONFIG_END
165177
166static MACHINE_CONFIG_START( hector1, driver_device )
178static MACHINE_CONFIG_START( hector1, interact_state )
167179
168180   /* basic machine hardware */
169181   MDRV_CPU_ADD("maincpu", Z80, XTAL_1_75MHz)
src/mess/drivers/z80ne.c
r9143r9144
129129   AM_RANGE( 0x0400, 0x7fff ) AM_RAM
130130   AM_RANGE( 0x8000, 0x83ff ) AM_ROMBANK("bank2")
131131   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) */
133133   AM_RANGE( 0xee00, 0xffff ) AM_RAM
134134ADDRESS_MAP_END
135135
136136static ADDRESS_MAP_START( z80netb_mem, ADDRESS_SPACE_PROGRAM, 8 )
137137   AM_RANGE( 0x0000, 0x3fff ) AM_ROM
138138   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) */
140140   AM_RANGE( 0xee00, 0xffff ) AM_RAM
141141ADDRESS_MAP_END
142142
r9143r9144
163163   AM_RANGE( 0x8000, 0x83ff ) AM_RAMBANK("bank3")
164164   AM_RANGE( 0x8400, 0xdfff ) AM_RAM
165165   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) */
167167   AM_RANGE( 0xee00, 0xefff ) AM_READNOP AM_WRITENOP
168168   AM_RANGE( 0xf000, 0xf3ff ) AM_RAMBANK("bank4")
169169   AM_RANGE( 0xf400, 0xffff ) AM_READNOP AM_WRITENOP
r9143r9144
465465   DEVCB_NULL
466466};
467467
468static MACHINE_CONFIG_START( z80ne, driver_device )
468static MACHINE_CONFIG_START( z80ne, z80ne_state )
469469   /* basic machine hardware */
470470   MDRV_CPU_ADD("z80ne", Z80, Z80NE_CPU_SPEED_HZ)
471471   MDRV_CPU_PROGRAM_MAP(z80ne_mem)
r9143r9144
518518   MDRV_RAM_EXTRA_OPTIONS("1K")
519519MACHINE_CONFIG_END
520520
521static MACHINE_CONFIG_START( z80netb, driver_device )
521static MACHINE_CONFIG_START( z80netb, z80ne_state )
522522   /* basic machine hardware */
523523   MDRV_CPU_ADD("z80ne", Z80, Z80NE_CPU_SPEED_HZ)
524524   MDRV_CPU_PROGRAM_MAP(z80netb_mem)
r9143r9144
554554   MDRV_RAM_EXTRA_OPTIONS("1K")
555555MACHINE_CONFIG_END
556556
557static MACHINE_CONFIG_START( z80netf, driver_device )
557static MACHINE_CONFIG_START( z80netf, z80ne_state )
558558   /* basic machine hardware */
559559   MDRV_CPU_ADD("z80ne", Z80, Z80NE_CPU_SPEED_HZ)
560560   MDRV_CPU_PROGRAM_MAP(z80netf_mem)
src/mess/drivers/concept.c
r9143r9144
4444   AM_RANGE(0x020000, 0x021fff) AM_ROM                              /* macsbugs ROM (optional) */
4545   AM_RANGE(0x030000, 0x03ffff) AM_READWRITE(concept_io_r,concept_io_w)   /* I/O space */
4646
47   AM_RANGE(0x080000, 0x0fffff) AM_RAM AM_BASE_GENERIC(videoram)/* AM_RAMBANK(2) */   /* DRAM */
47   AM_RANGE(0x080000, 0x0fffff) AM_RAM AM_BASE_MEMBER(concept_state, videoram)/* AM_RAMBANK(2) */   /* DRAM */
4848ADDRESS_MAP_END
4949
5050/* init with simple, fixed, B/W palette */
r9143r9144
119119};
120120
121121/* concept machine */
122static MACHINE_CONFIG_START( concept, driver_device )
122static MACHINE_CONFIG_START( concept, concept_state )
123123   /* basic machine hardware */
124124   MDRV_CPU_ADD("maincpu", M68000, 8182000)        /* 16.364 MHz / 2 */
125125   MDRV_CPU_PROGRAM_MAP(concept_memmap)
src/mess/drivers/aquarius.c
r9143r9144
231231
232232static ADDRESS_MAP_START( aquarius_mem, ADDRESS_SPACE_PROGRAM, 8 )
233233   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)
235235   AM_RANGE(0x3400, 0x37ff) AM_RAM_WRITE(aquarius_colorram_w) AM_BASE(&aquarius_colorram)
236236   AM_RANGE(0x3800, 0x3fff) AM_RAM
237237   AM_RANGE(0x4000, 0xbfff) AM_NOP /* expansion ram */
r9143r9144
392392   NULL
393393};
394394
395static MACHINE_CONFIG_START( aquarius, driver_device )
395static MACHINE_CONFIG_START( aquarius, aquarius_state )
396396   /* basic machine hardware */
397397   MDRV_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz) // ???
398398   MDRV_CPU_PROGRAM_MAP(aquarius_mem)
src/mess/drivers/kaypro.c
r9143r9144
5454
5555static ADDRESS_MAP_START( kaypro_map, ADDRESS_SPACE_PROGRAM, 8 )
5656   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)
5858   AM_RANGE(0x4000, 0xffff) AM_RAM AM_REGION("rambank", 0x4000)
5959ADDRESS_MAP_END
6060
r9143r9144
219219   NULL
220220};
221221
222static MACHINE_CONFIG_START( kayproii, driver_device )
222static MACHINE_CONFIG_START( kayproii, kaypro_state )
223223   /* basic machine hardware */
224224   MDRV_CPU_ADD("maincpu", Z80, 2500000)   /* 2.5 MHz */
225225   MDRV_CPU_PROGRAM_MAP(kaypro_map)
r9143r9144
266266   MDRV_Z80PIO_ADD( "z80pio_s", 2500000, kaypro4_pio_s_intf )
267267MACHINE_CONFIG_END
268268
269static MACHINE_CONFIG_START( kaypro2x, driver_device )
269static MACHINE_CONFIG_START( kaypro2x, kaypro_state )
270270   /* basic machine hardware */
271271   MDRV_CPU_ADD("maincpu", Z80, 4000000)   /* 4 MHz */
272272   MDRV_CPU_PROGRAM_MAP(kaypro_map)
src/mess/drivers/channelf.c
r9143r9144
124124
125125static WRITE8_HANDLER( channelf_port_0_w )
126126{
127   UINT8 *videoram = space->machine->generic.videoram.u8;
127   channelf_state *state = space->machine->driver_data<channelf_state>();
128   UINT8 *videoram = state->videoram;
128129   int offs;
129130
130131   latch[0] = data;
r9143r9144
276277   MDRV_SOFTWARE_LIST_ADD("cart_list","channelf")
277278MACHINE_CONFIG_END
278279
279static MACHINE_CONFIG_START( channelf, driver_device )
280static MACHINE_CONFIG_START( channelf, channelf_state )
280281   /* basic machine hardware */
281282   MDRV_CPU_ADD("maincpu", F8, 3579545/2)        /* Colorburst/2 */
282283   MDRV_CPU_PROGRAM_MAP(channelf_map)
r9143r9144
304305   MDRV_FRAGMENT_ADD( channelf_cart )
305306MACHINE_CONFIG_END
306307
307static MACHINE_CONFIG_START( sabavdpl, driver_device )
308static MACHINE_CONFIG_START( sabavdpl, channelf_state )
308309   /* basic machine hardware */
309310   MDRV_CPU_ADD("maincpu", F8, MASTER_CLOCK_PAL)        /* PAL speed */
310311   MDRV_CPU_PROGRAM_MAP(channelf_map)
r9143r9144
333334MACHINE_CONFIG_END
334335
335336
336static MACHINE_CONFIG_START( channlf2, driver_device )
337static MACHINE_CONFIG_START( channlf2, channelf_state )
337338   /* basic machine hardware */
338339   MDRV_CPU_ADD("maincpu", F8, 3579545/2)        /* Colorburst / 2 */
339340   MDRV_CPU_PROGRAM_MAP(channelf_map)
r9143r9144
362363MACHINE_CONFIG_END
363364
364365
365static MACHINE_CONFIG_START( sabavpl2, driver_device )
366static MACHINE_CONFIG_START( sabavpl2, channelf_state )
366367   /* basic machine hardware */
367368   MDRV_CPU_ADD("maincpu", F8, MASTER_CLOCK_PAL)        /* PAL speed */
368369   MDRV_CPU_PROGRAM_MAP(channelf_map)
src/mess/drivers/hec2hrp.c
r9143r9144
9191   AM_RANGE(0x0000,0x3fff) AM_ROMBANK("bank2")
9292
9393   /* 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)
9595   /* continous RAM*/
9696   AM_RANGE(0x4A00,0xbfff) AM_RAM
9797   /* from 0xC000 to 0xFFFF => Bank Ram for video and data !*/
r9143r9144
259259DISCRETE_SOUND_END
260260
261261/******************************************************************************/
262static MACHINE_CONFIG_START( hec2hr, driver_device )
262static MACHINE_CONFIG_START( hec2hr, hec2hrp_state )
263263/******************************************************************************/
264264   /* basic machine hardware */
265265   MDRV_CPU_ADD("maincpu",Z80, XTAL_5MHz)
r9143r9144
301301MACHINE_CONFIG_END
302302
303303/*****************************************************************************/
304static MACHINE_CONFIG_START( hec2hrp, driver_device )
304static MACHINE_CONFIG_START( hec2hrp, hec2hrp_state )
305305/*****************************************************************************/
306306   /* basic machine hardware */
307307   MDRV_CPU_ADD("maincpu",Z80, XTAL_5MHz)
r9143r9144
343343MACHINE_CONFIG_END
344344
345345/*****************************************************************************/
346static MACHINE_CONFIG_START( hec2mx40, driver_device )
346static MACHINE_CONFIG_START( hec2mx40, hec2hrp_state )
347347/*****************************************************************************/
348348   /* basic machine hardware */
349349   MDRV_CPU_ADD("maincpu",Z80, XTAL_5MHz)
r9143r9144
385385MACHINE_CONFIG_END
386386
387387/*****************************************************************************/
388static MACHINE_CONFIG_START( hec2mx80, driver_device )
388static MACHINE_CONFIG_START( hec2mx80, hec2hrp_state )
389389/*****************************************************************************/
390390   /* basic machine hardware */
391391   MDRV_CPU_ADD("maincpu",Z80, XTAL_5MHz)
src/mess/drivers/intv.c
r9143r9144
355355   AM_RANGE( 0x0000, 0x3fff) AM_READWRITE( intvkbd_dualport8_lsb_r, intvkbd_dualport8_lsb_w )   /* Dual-port RAM */
356356   AM_RANGE( 0x4000, 0x7fff) AM_READWRITE( intvkbd_dualport8_msb_r, intvkbd_dualport8_msb_w )   /* Dual-port RAM */
357357   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 */
359359   AM_RANGE( 0xc000, 0xffff) AM_ROM
360360ADDRESS_MAP_END
361361
r9143r9144
373373   timer_set(device->machine, device->machine->device<cpu_device>("keyboard")->cycles_to_attotime(100), NULL, 0, intv_interrupt2_complete);
374374}
375375
376static MACHINE_CONFIG_START( intv, driver_device )
376static MACHINE_CONFIG_START( intv, intv_state )
377377   /* basic machine hardware */
378378   MDRV_CPU_ADD("maincpu", CP1610, XTAL_3_579545MHz/4)        /* Colorburst/4 */
379379   MDRV_CPU_PROGRAM_MAP(intv_mem)
src/mess/drivers/jupiter.c
r9143r9144
5353/* memory w/r functions */
5454static ADDRESS_MAP_START( jupiter_mem , ADDRESS_SPACE_PROGRAM, 8)
5555   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)
5757   AM_RANGE(0x2c00, 0x2fff) AM_MIRROR(0x0400) AM_WRITE(jupiter_vh_charram_w) AM_BASE(&jupiter_charram)
5858   AM_RANGE(0x3c00, 0x3fff) AM_MIRROR(0x0c00) AM_RAM
5959   AM_RANGE(0x4800, 0xffff) AM_RAM_WRITE( jupiter_expram_w ) AM_BASE(&jupiter_expram)         /* Expansion RAM */
r9143r9144
277277
278278static VIDEO_UPDATE( jupiter )
279279{
280   UINT8 *videoram = screen->machine->generic.videoram.u8;
280   jupiter_state *state = screen->machine->driver_data<jupiter_state>();
281   UINT8 *videoram = state->videoram;
281282   int offs;
282283
283284   for(offs = 0; offs < 768; offs++)
r9143r9144
309310};
310311
311312/* machine definition */
312static MACHINE_CONFIG_START( jupiter, driver_device )
313static MACHINE_CONFIG_START( jupiter, jupiter_state )
313314   /* basic machine hardware */
314315   MDRV_CPU_ADD("maincpu", Z80, XTAL_6_5MHz/2)        /* 3.25 MHz */
315316   MDRV_CPU_PROGRAM_MAP(jupiter_mem)
src/mess/drivers/svision.c
r9143r9144
247247static ADDRESS_MAP_START( svision_mem , ADDRESS_SPACE_PROGRAM, 8)
248248   AM_RANGE( 0x0000, 0x1fff) AM_RAM
249249   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)
251251   AM_RANGE( 0x6000, 0x7fff) AM_NOP
252252   AM_RANGE( 0x8000, 0xbfff) AM_ROMBANK("bank1")
253253   AM_RANGE( 0xc000, 0xffff) AM_ROMBANK("bank2")
r9143r9144
256256static ADDRESS_MAP_START( tvlink_mem , ADDRESS_SPACE_PROGRAM, 8)
257257   AM_RANGE( 0x0000, 0x1fff) AM_RAM
258258   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)
260260   AM_RANGE( 0x6000, 0x7fff) AM_NOP
261261   AM_RANGE( 0x8000, 0xbfff) AM_ROMBANK("bank1")
262262   AM_RANGE( 0xc000, 0xffff) AM_ROMBANK("bank2")
r9143r9144
366366
367367static VIDEO_UPDATE( svision )
368368{
369   svision_state *state = screen->machine->driver_data<svision_state>();
369370   int x, y, i, j=XPOS/4+YPOS*0x30;
370   UINT8 *videoram = screen->machine->generic.videoram.u8;
371   UINT8 *videoram = state->videoram;
371372
372373   if (BANK&8)
373374   {
r9143r9144
397398
398399static VIDEO_UPDATE( tvlink )
399400{
401   svision_state *state = screen->machine->driver_data<svision_state>();
400402   int x, y, i, j = XPOS/4+YPOS*0x30;
401   UINT8 *videoram = screen->machine->generic.videoram.u8;
403   UINT8 *videoram = state->videoram;
402404
403405   if (BANK & 8)
404406   {
r9143r9144
523525   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]);
524526}
525527
526static MACHINE_CONFIG_START( svision, driver_device )
528static MACHINE_CONFIG_START( svision, svision_state )
527529   /* basic machine hardware */
528530   MDRV_CPU_ADD("maincpu", M65C02, 4000000)        /* ? stz used! speed? */
529531   MDRV_CPU_PROGRAM_MAP(svision_mem)
src/mess/drivers/pc.c
r9143r9144
304304static ADDRESS_MAP_START( europc_map, ADDRESS_SPACE_PROGRAM, 8 )
305305   AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
306306   AM_RANGE(0xa0000, 0xaffff) AM_NOP
307   AM_RANGE(0xb0000, 0xbffff) AM_READWRITE(pc_aga_videoram_r, pc_aga_videoram_w) AM_BASE_GENERIC(videoram) AM_SIZE(&pc_videoram_size)
307   AM_RANGE(0xb0000, 0xbffff) AM_READWRITE(pc_aga_videoram_r, pc_aga_videoram_w) AM_BASE(&pc_videoram) AM_SIZE(&pc_videoram_size)
308308   AM_RANGE(0xc0000, 0xc7fff) AM_NOP
309309   AM_RANGE(0xc8000, 0xcffff) AM_ROM
310310   AM_RANGE(0xd0000, 0xeffff) AM_NOP

Previous 15994 Revisions Next


© 1998-2018 The MESS Team