Previous 15994 Revisions Next

r5853 Tuesday 22nd September, 2009 at 20:49:31 UTC by Angelo Salese
[M6847]: Fixed a bug with external char rom not being read properly, this fixes startup display of the Nec PC-6001. Also fixed a regression with MC1000 graphics caused by this fix.
[src/mess/drivers]mc1000.c
[src/mess/video]m6847.c

src/mess/video/m6847.c
r5852r5853
11991199
12001200      bg_color = color(m6847->colordata[attr_index][byte / 16][0]);
12011201      fg_color = color(m6847->colordata[attr_index][byte / 16][1]);
1202     
1202
12031203      if( (!m6847->has_lowercase) && (attr & M6847_INTEXT) && !(attr & M6847_AS)) {
12041204         if (m6847->get_char_rom) {
12051205            char_data = m6847->get_char_rom(machine,byte,scanline % 12);
r5852r5853
12071207            char_data = 0xff;
12081208         }
12091209      } else {
1210         char_data = m6847->fontdata[attr_index][byte][scanline % 12];
1210         if (m6847->get_char_rom)
1211            char_data = m6847->get_char_rom(machine,byte,scanline % 12);
1212         else
1213            char_data = m6847->fontdata[attr_index][byte][scanline % 12];
12111214      }
12121215
12131216      line[x*8+0] = (char_data & 0x80) ? fg_color : bg_color;
r5852r5853
17601763
17611764         if (attr & M6847_GM1)
17621765            attr ^= M6847_INV;
1763         
1766
17641767      }
17651768
17661769      if (attr & M6847_INV)
src/mess/drivers/mc1000.c
r5852r5853
8484static READ8_HANDLER( printer_r )
8585{
8686   mc1000_state *state = space->machine->driver_data;
87   
87
8888   return centronics_busy_r(state->centronics);
8989}
9090
r5852r5853
148148   AM_RANGE(0x05, 0x05) AM_DEVWRITE(CENTRONICS_TAG, centronics_data_w)
149149//   AM_RANGE(0x10, 0x10) AM_DEVWRITE(MC6845_TAG, mc6845_address_w)
150150//   AM_RANGE(0x11, 0x11) AM_DEVREADWRITE(MC6845_TAG, mc6845_register_r, mc6845_register_w)
151   AM_RANGE(0x12, 0x12) AM_WRITE(mc6845_ctrl_w)   
151   AM_RANGE(0x12, 0x12) AM_WRITE(mc6845_ctrl_w)
152152   AM_RANGE(0x20, 0x20) AM_DEVWRITE(AY8910_TAG, ay8910_address_w)
153153   AM_RANGE(0x40, 0x40) AM_DEVREAD(AY8910_TAG, ay8910_r)
154154   AM_RANGE(0x60, 0x60) AM_DEVWRITE(AY8910_TAG, ay8910_data_w)
r5852r5853
271271   return data;
272272}
273273
274#if 0
274275static UINT8 mc1000_get_char_rom(running_machine *machine, UINT8 ch,int line)
275276{
276277   return ch;
277278}
279#endif
278280
279281static const UINT8 *mc1000_get_video_ram(running_machine *machine, int scanline)
280282{
281283   mc1000_state *state = machine->driver_data;
282   
284
283285   UINT16 addr = 0;
284286
285287   if (BIT(state->mc6847_attr, 7))
r5852r5853
312314   cfg.field_sync_callback = mc1000_vsync;
313315   cfg.get_attributes = mc1000_get_attributes;
314316   cfg.get_video_ram = mc1000_get_video_ram;
315   cfg.get_char_rom = mc1000_get_char_rom;
317//   cfg.get_char_rom = mc1000_get_char_rom;
316318
317319   m6847_init(machine, &cfg);
318320}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team