Previous 15994 Revisions Next

r3366 Wednesday 1st October, 2008 at 19:51:49 UTC by Curt Coder
[ABC80X] Optimized video by storing ROM regions to driver state.
[src/mess/includes]abc80x.h
[src/mess/video]abc806.c abc80x.c

src/mess/video/abc80x.c
r3365r3366
174174
175175static MC6845_UPDATE_ROW( abc800m_update_row )
176176{
177   abc800_state *state = device->machine->driver_data;
178
177179   int column;
178   const UINT8 *charrom = memory_region(device->machine, "chargen");
179180
180181   for (column = 0; column < x_count; column++)
181182   {
182183      int bit;
183184
184185      UINT16 address = (videoram[(ma + column) & 0x7ff] << 4) | (ra & 0x0f);
185      UINT8 data = (charrom[address & 0x7ff] & 0x3f);
186      UINT8 data = (state->char_rom[address & 0x7ff] & 0x3f);
186187
187188      if (column == cursor_x)
188189      {
r3365r3366
219220   abc802_state *state = device->machine->driver_data;
220221
221222   int column;
222   const UINT8 *charrom = memory_region(device->machine, "chargen");
223223
224224   for (column = 0; column < x_count; column++)
225225   {
r3365r3366
235235         ra_latch = 0x0f;
236236      }
237237
238      data = charrom[(address + ra_latch) & 0x1fff];
238      data = state->char_rom[(address + ra_latch) & 0x1fff];
239239
240240      if (data & ABC802_ATE)
241241      {
r3365r3366
272272         }
273273
274274         // reload data and mask out two bottom bits
275         data = charrom[(address + ra_latch) & 0x1fff] & 0xfc;
275         data = state->char_rom[(address + ra_latch) & 0x1fff] & 0xfc;
276276      }
277277     
278278      data <<= 2;
r3365r3366
361361   /* find devices */
362362
363363   state->mc6845 = device_list_find_by_tag(machine->config->devicelist, MC6845, MC6845_TAG);
364
365   /* find memory regions */
366
367   state->char_rom = memory_region(machine, "chargen");
364368}
365369
366370static VIDEO_START( abc802 )
r3365r3366
371375
372376   state->mc6845 = device_list_find_by_tag(machine->config->devicelist, MC6845, MC6845_TAG);
373377
378   /* find memory regions */
379
380   state->char_rom = memory_region(machine, "chargen");
381
374382   /* allocate timer */
375383
376384   state->flash_timer = timer_alloc(abc802_flash_tick, NULL);
src/mess/video/abc806.c
r3365r3366
205205   abc806_state *state = device->machine->driver_data;
206206 
207207   int column;
208   const UINT8 *charrom = memory_region(device->machine, "chargen");
209208 
210209   UINT8 old_data = 0xff;
211210   int fg_color = 7;
r3365r3366
286285      else
287286      {
288287         rad_addr = (e6 << 8) | (e5 << 7) | (flash << 6) | (underline << 5) | (state->flshclk << 4) | ra;
289         rad_data = memory_region(device->machine, "rad")[rad_addr] & 0x0f;
288         rad_data = state->rad_prom[rad_addr] & 0x0f;
290289 
291290         rad_data = ra; // HACK because the RAD prom is not dumped yet
292291      }
293292 
294293      chargen_addr = (th << 12) | (data << 4) | rad_data;
295      chargen_data = charrom[chargen_addr & 0xfff] << 2;
294      chargen_data = state->char_rom[chargen_addr & 0xfff] << 2;
296295      x = column * ABC800_CHAR_WIDTH;
297296 
298297      for (bit = 0; bit < ABC800_CHAR_WIDTH; bit++)
r3365r3366
426425 
427426   state->mc6845 = device_list_find_by_tag(machine->config->devicelist, MC6845, MC6845_TAG);
428427 
428   /* find memory regions */
429 
430   state->char_rom = memory_region(machine, "chargen");
431   state->rad_prom = memory_region(machine, "rad");
432 
429433   /* allocate memory */
430434 
431435   state->charram = auto_malloc(ABC806_CHAR_RAM_SIZE);
src/mess/includes/abc80x.h
r3365r3366
4545   const device_config *z80dart;
4646   const device_config *z80sio;
4747   const device_config *mc6845;
48
49   /* memory regions */
50   const UINT8 *char_rom;   /* character generator ROM */
4851};
4952
5053typedef struct _abc802_state abc802_state;
r3365r3366
6669   const device_config *z80dart;
6770   const device_config *z80sio;
6871   const device_config *mc6845;
72
73   /* memory regions */
74   const UINT8 *char_rom;   /* character generator ROM */
6975};
7076
7177typedef struct _abc806_state abc806_state;
r3365r3366
104110   const device_config *z80dart;
105111   const device_config *z80sio;
106112   const device_config *mc6845;
113
114   /* memory regions */
115   const UINT8 *rad_prom;   /* line address PROM */
116   const UINT8 *char_rom;   /* character generator ROM */
107117};
108118
109119/*----------- defined in video/abc80x.c -----------*/

Previous 15994 Revisions Next


© 1998-2018 The MESS Team