Previous 199869 Revisions Next

r20528 Sunday 27th January, 2013 at 12:17:05 UTC by Curt Coder
(MESS) Tagmap lookup cleanup. (nw)
[src/mess/drivers]abc80.c bullet.c bw2.c mikromik.c portfoli.c tmc600.c trs80m2.c
[src/mess/includes]abc80.h bullet.h bw2.h mikromik.h portfoli.h tmc600.h trs80m2.h
[src/mess/machine]terminal.c terminal.h
[src/mess/video]abc80.c mikromik.c

trunk/src/mess/drivers/portfoli.c
r20527r20528
203203{
204204   UINT8 keycode = 0xff;
205205
206   static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" };
206   UINT8 keydata[8] = { m_y0->read(), m_y1->read(), m_y2->read(), m_y3->read(),
207                   m_y4->read(), m_y5->read(), m_y6->read(), m_y7->read() };
207208
208209   for (int row = 0; row < 8; row++)
209210   {
210      UINT8 data = ioport(keynames[row])->read();
211
211      UINT8 data = keydata[row];
212     
212213      if (data != 0xff)
213214      {
214215         for (int col = 0; col < 8; col++)
r20527r20528
346347   data |= (m_pid != PID_NONE) << 5;
347348
348349   /* battery status */
349   data |= BIT(ioport("BATTERY")->read(), 0) << 6;
350   data |= BIT(m_battery->read(), 0) << 6;
350351
351352   return data;
352353}
r20527r20528
437438   if (BIT(data, 0))
438439   {
439440      // system ROM
440      UINT8 *rom = memregion(M80C88A_TAG)->base();
441      UINT8 *rom = m_rom->base();
441442      program.install_rom(0xc0000, 0xdffff, rom);
442443   }
443444   else
r20527r20528
519520//-------------------------------------------------
520521
521522static INPUT_PORTS_START( portfolio )
522   PORT_START("ROW0")
523   PORT_START("Y0")
523524   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Atari") PORT_CODE(KEYCODE_TILDE)
524525   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
525526   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
r20527r20528
529530   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
530531   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^')
531532
532   PORT_START("ROW1")
533   PORT_START("Y1")
533534   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del Ins") PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL))
534535   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT))
535536   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
r20527r20528
539540   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
540541   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
541542
542   PORT_START("ROW2")
543   PORT_START("Y2")
543544   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(TAB))
544545   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
545546   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL))
r20527r20528
549550   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
550551   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
551552
552   PORT_START("ROW3")
553   PORT_START("Y3")
553554   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
554555   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
555556   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')
r20527r20528
559560   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('"') PORT_CHAR('`')
560561   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}')
561562
562   PORT_START("ROW4")
563   PORT_START("Y4")
563564   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
564565   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
565566   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
r20527r20528
569570   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
570571   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
571572
572   PORT_START("ROW5")
573   PORT_START("Y5")
573574   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
574575   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
575576   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
r20527r20528
579580   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('8')
580581   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
581582
582   PORT_START("ROW6")
583   PORT_START("Y6")
583584   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|')
584585   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
585586   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
r20527r20528
589590   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Fn") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
590591   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
591592
592   PORT_START("ROW7")
593   PORT_START("Y7")
593594   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
594595   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
595596   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
r20527r20528
652653READ8_MEMBER(portfolio_state::hd61830_rd_r)
653654{
654655   UINT16 address = ((offset & 0xff) << 3) | ((offset >> 12) & 0x07);
655   UINT8 data = machine().root_device().memregion(HD61830_TAG)->base()[address];
656   UINT8 data = m_char_rom->base()[address];
656657
657658   return data;
658659}
trunk/src/mess/drivers/tmc600.c
r20527r20528
108108/* Input Ports */
109109
110110static INPUT_PORTS_START( tmc600 )
111   PORT_START("IN0")
111   PORT_START("Y0")
112112   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR('0')
113113   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('1') PORT_CHAR('!')
114114   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR('2') PORT_CHAR('\"')
r20527r20528
118118   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('6') PORT_CHAR('&')
119119   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('7') PORT_CHAR('/')
120120
121   PORT_START("IN1")
121   PORT_START("Y1")
122122   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR('8') PORT_CHAR('(')
123123   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR('9') PORT_CHAR(')')
124124   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(':') PORT_CHAR('*')
r20527r20528
128128   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
129129   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
130130
131   PORT_START("IN2")
131   PORT_START("Y2")
132132   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('@') PORT_CHAR('\\')
133133   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
134134   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
r20527r20528
138138   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
139139   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
140140
141   PORT_START("IN3")
141   PORT_START("Y3")
142142   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
143143   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
144144   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
r20527r20528
148148   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
149149   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
150150
151   PORT_START("IN4")
151   PORT_START("Y4")
152152   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
153153   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
154154   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
r20527r20528
158158   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
159159   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
160160
161   PORT_START("IN5")
161   PORT_START("Y5")
162162   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
163163   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
164164   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
r20527r20528
168168   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('~')
169169   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("BREAK") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END))
170170
171   PORT_START("IN6")
171   PORT_START("Y6")
172172   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
173173   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("DEL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
174174   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
r20527r20528
178178   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E1") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT))
179179   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
180180
181   PORT_START("IN7")
181   PORT_START("Y7")
182182   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT LOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
183183   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("(unknown)") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
184184   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LINE FEED") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_CHAR(10)
r20527r20528
196196
197197READ_LINE_MEMBER( tmc600_state::clear_r )
198198{
199   return BIT(ioport("RUN")->read(), 0);
199   return BIT(m_run->read(), 0);
200200}
201201
202202READ_LINE_MEMBER( tmc600_state::ef2_r )
r20527r20528
206206
207207READ_LINE_MEMBER( tmc600_state::ef3_r )
208208{
209   static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" };
210   UINT8 data = ~ioport(keynames[m_keylatch / 8])->read();
209   UINT8 keydata[8] = { m_y0->read(), m_y1->read(), m_y2->read(), m_y3->read(),
210                   m_y4->read(), m_y5->read(), m_y6->read(), m_y7->read() };
211211
212   UINT8 data = ~keydata[m_keylatch / 8];
213
212214   return BIT(data, m_keylatch % 8);
213215}
214216
trunk/src/mess/drivers/bullet.c
r20527r20528
102102
103103   if (!m_brom && !BIT(offset, 5))
104104   {
105      data = memregion(Z80_TAG)->base()[offset & 0x1f];
105      data = m_rom->base()[offset & 0x1f];
106106   }
107107   else
108108   {
r20527r20528
359359
360360   if (!m_rome && !BIT(offset, 5))
361361   {
362      data = memregion(Z80_TAG)->base()[offset & 0x1f];
362      data = m_rom->base()[offset & 0x1f];
363363   }
364364   else
365365   {
trunk/src/mess/drivers/abc80.c
r20527r20528
101101READ8_MEMBER( abc80_state::read )
102102{
103103   UINT8 data = 0xff;
104   UINT8 mmu = m_mmu_rom[0x40 | (offset >> 10)];
104   UINT8 mmu = m_mmu_rom->base()[0x40 | (offset >> 10)];
105105
106106   if (!(mmu & MMU_XM))
107107   {
r20527r20528
109109   }
110110   else if (!(mmu & MMU_ROM))
111111   {
112      data = memregion(Z80_TAG)->base()[offset & 0x3fff];
112      data = m_rom->base()[offset & 0x3fff];
113113   }
114114   else if (mmu & MMU_VRAMS)
115115   {
r20527r20528
130130
131131WRITE8_MEMBER( abc80_state::write )
132132{
133   UINT8 mmu = m_mmu_rom[0x40 | (offset >> 10)];
133   UINT8 mmu = m_mmu_rom->base()[0x40 | (offset >> 10)];
134134
135135   if (!(mmu & MMU_XM))
136136   {
r20527r20528
585585   m_cassette_timer->adjust(attotime::from_hz(44100), 0, attotime::from_hz(44100));
586586   m_cassette_timer->enable(false);
587587
588   // find memory regions
589   m_mmu_rom = memregion("mmu")->base();
590
591588   // register for state saving
592589   save_item(NAME(m_key_data));
593590   save_item(NAME(m_key_strobe));
trunk/src/mess/drivers/trs80m2.c
r20527r20528
3535   {
3636      if (m_boot_rom)
3737      {
38         data = memregion(Z80_TAG)->base()[offset];
38         data = m_rom->base()[offset];
3939      }
4040      else
4141      {
r20527r20528
390390   {
391391      UINT8 code = state->m_video_ram[(ma + column) & 0x7ff];
392392      offs_t address = ((code & 0x7f) << 4) | (ra & 0x0f);
393      UINT8 data = state->m_char_rom[address];
393      UINT8 data = state->m_char_rom->base()[address];
394394
395395      int dcursor = (column == cursor_x);
396396      int drevid = BIT(code, 7);
r20527r20528
443443
444444void trs80m2_state::video_start()
445445{
446   // find memory regions
447   m_char_rom = memregion(MC6845_TAG)->base();
448
449446   // allocate memory
450447   m_video_ram.allocate(0x800);
451448}
trunk/src/mess/drivers/mikromik.c
r20527r20528
8080READ8_MEMBER( mm1_state::read )
8181{
8282   UINT8 data = 0;
83   UINT8 mmu = m_mmu_rom[(m_a8 << 8) | (offset >> 8)];
83   UINT8 mmu = m_mmu_rom->base()[(m_a8 << 8) | (offset >> 8)];
8484
8585   if (mmu & MMU_IOEN)
8686   {
r20527r20528
130130      }
131131      else if (!(mmu & MMU_CE0))
132132      {
133         data = memregion(I8085A_TAG)->base()[offset & 0x1fff];
133         data = m_rom->base()[offset & 0x1fff];
134134      }
135135      else if (!(mmu & MMU_CE1))
136136      {
137         data = memregion(I8085A_TAG)->base()[0x2000 + (offset & 0x1fff)];
137         data = m_rom->base()[0x2000 + (offset & 0x1fff)];
138138      }
139139   }
140140
r20527r20528
149149
150150WRITE8_MEMBER( mm1_state::write )
151151{
152   UINT8 mmu = m_mmu_rom[(m_a8 << 8) | (offset >> 8)];
152   UINT8 mmu = m_mmu_rom->base()[(m_a8 << 8) | (offset >> 8)];
153153
154154   if (mmu & MMU_IOEN)
155155   {
r20527r20528
287287   if (!BIT(data, m_sense))
288288   {
289289      // get key data from PROM
290      keydata = m_key_rom[(ctrl << 8) | (shift << 7) | (m_drive << 3) | (m_sense)];
290      keydata = m_key_rom->base()[(ctrl << 8) | (shift << 7) | (m_drive << 3) | (m_sense)];
291291   }
292292
293293   if (m_keydata != keydata)
r20527r20528
716716   m_fdc->setup_intrq_cb(upd765_family_device::line_cb(FUNC(mm1_state::fdc_intrq_w), this));
717717   m_fdc->setup_drq_cb(upd765_family_device::line_cb(FUNC(mm1_state::fdc_drq_w), this));
718718
719   // find memory regions
720   m_mmu_rom = memregion("address")->base();
721   m_key_rom = memregion("keyboard")->base();
722
723719   // register for state saving
724720   save_item(NAME(m_sense));
725721   save_item(NAME(m_drive));
trunk/src/mess/drivers/bw2.c
r20527r20528
7676   {
7777      if (!rom)
7878      {
79         data = memregion(Z80_TAG)->base()[offset & 0x3fff];
79         data = m_rom->base()[offset & 0x3fff];
8080      }
8181
8282      if (!vram)
trunk/src/mess/machine/terminal.c
r20527r20528
137137};
138138
139139generic_terminal_device::generic_terminal_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
140   : device_t(mconfig, type, name, tag, owner, clock)
140   : device_t(mconfig, type, name, tag, owner, clock),
141     m_io_term_frame(*this, "TERM_FRAME"),
142     m_io_term_conf(*this, "TERM_CONF")
141143{
142144}
143145
144146generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
145   : device_t(mconfig, GENERIC_TERMINAL, "Generic Terminal", tag, owner, clock)
147   : device_t(mconfig, GENERIC_TERMINAL, "Generic Terminal", tag, owner, clock),
148     m_io_term_frame(*this, "TERM_FRAME"),
149     m_io_term_conf(*this, "TERM_CONF")
146150{
147151}
148152
r20527r20528
227231***************************************************************************/
228232UINT32 generic_terminal_device::update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect)
229233{
230   UINT8 options = ioport("TERM_CONF")->read();
234   UINT8 options = m_io_term_conf->read();
231235   UINT16 cursor = m_y_pos * TERMINAL_WIDTH + m_x_pos;
232236   UINT8 y,ra,chr,gfx;
233237   UINT16 sy=0,ma=0,x;
r20527r20528
479483
480484INPUT_CHANGED_MEMBER(serial_terminal_device::update_frame)
481485{
482   UINT8 val = ioport("TERM_FRAME")->read();
486   UINT8 val = m_io_term_frame->read();
483487   set_tra_rate(rates[val & 0x0f]);
484488   set_rcv_rate(rates[val & 0x0f]);
485489
trunk/src/mess/machine/terminal.h
r20527r20528
6060   virtual ioport_constructor device_input_ports() const;
6161   virtual machine_config_constructor device_mconfig_additions() const;
6262protected:
63   required_ioport m_io_term_frame;
64   required_ioport m_io_term_conf;
65
6366   virtual void term_write(UINT8 data);
6467   virtual void device_start();
6568   virtual void device_reset();
trunk/src/mess/includes/bullet.h
r20527r20528
4949         m_floppy(NULL),
5050         m_terminal(*this, TERMINAL_TAG),
5151         m_centronics(*this, CENTRONICS_TAG),
52         m_rom(*this, Z80_TAG),
5253         m_sw1(*this, "SW1"),
5354         m_fdrdy(0),
5455         m_exdsk_sw(false),
r20527r20528
7273   floppy_image_device *m_floppy;
7374   required_device<serial_terminal_device> m_terminal;
7475   required_device<centronics_device> m_centronics;
76   required_memory_region m_rom;
7577   required_ioport m_sw1;
7678
7779   virtual void machine_start();
trunk/src/mess/includes/trs80m2.h
r20527r20528
5252         m_floppy(NULL),
5353         m_ram(*this, RAM_TAG),
5454         m_kb(*this, TRS80M2_KEYBOARD_TAG),
55         m_rom(*this, Z80_TAG),
56         m_char_rom(*this, MC6845_TAG),
5557         m_video_ram(*this, "video_ram")
5658   { }
5759
r20527r20528
6971   floppy_image_device *m_floppy;
7072   required_device<ram_device> m_ram;
7173   required_device<trs80m2_keyboard_device> m_kb;
74   required_memory_region m_rom;
75   required_memory_region m_char_rom;
7276   optional_shared_ptr<UINT8> m_video_ram;
7377
7478   virtual void machine_start();
r20527r20528
115119   int m_kbirq;
116120
117121   // video state
118   const UINT8 *m_char_rom;
119122   int m_blnkvid;
120123   int m_80_40_char_en;
121124   int m_de;
trunk/src/mess/includes/tmc600.h
r20527r20528
3232         m_cassette(*this, CASSETTE_TAG),
3333         m_ram(*this, RAM_TAG),
3434         m_page_ram(*this, "page_ram"),
35         m_color_ram(*this, "color_ram")
36      { }
35         m_color_ram(*this, "color_ram"),
36         m_run(*this, "RUN"),
37         m_y0(*this, "Y0"),
38         m_y1(*this, "Y1"),
39         m_y2(*this, "Y2"),
40         m_y3(*this, "Y3"),
41         m_y4(*this, "Y4"),
42         m_y5(*this, "Y5"),
43         m_y6(*this, "Y6"),
44         m_y7(*this, "Y7")
45   { }
3746
3847   required_device<cosmac_device> m_maincpu;
3948   required_device<cdp1869_device> m_vis;
r20527r20528
4150   required_device<ram_device> m_ram;
4251   required_shared_ptr<UINT8> m_page_ram;
4352   optional_shared_ptr<UINT8> m_color_ram;
53   required_ioport m_run;
54   required_ioport m_y0;
55   required_ioport m_y1;
56   required_ioport m_y2;
57   required_ioport m_y3;
58   required_ioport m_y4;
59   required_ioport m_y5;
60   required_ioport m_y6;
61   required_ioport m_y7;
4462
4563   virtual void machine_start();
4664
trunk/src/mess/includes/abc80.h
r20527r20528
7272         m_kb(*this, ABC80_KEYBOARD_TAG),
7373         m_ram(*this, RAM_TAG),
7474         m_rs232(*this, RS232_TAG),
75         m_rom(*this, Z80_TAG),
76         m_mmu_rom(*this, "mmu"),
77         m_char_rom(*this, "chargen"),
78         m_hsync_prom(*this, "hsync"),
79         m_vsync_prom(*this, "vsync"),
80         m_line_prom(*this, "line"),
81         m_attr_prom(*this, "attr"),
7582         m_video_ram(*this, "video_ram"),
7683         m_tape_in(1),
7784         m_tape_in_latch(1)
r20527r20528
8592   required_device<abc80_keyboard_device> m_kb;
8693   required_device<ram_device> m_ram;
8794   required_device<rs232_port_device> m_rs232;
95   required_memory_region m_rom;
96   required_memory_region m_mmu_rom;
97   required_memory_region m_char_rom;
98   required_memory_region m_hsync_prom;
99   required_memory_region m_vsync_prom;
100   required_memory_region m_line_prom;
101   required_memory_region m_attr_prom;
88102   optional_shared_ptr<UINT8> m_video_ram;
89103
90104   enum
r20527r20528
131145   int m_tape_in;
132146   int m_tape_in_latch;
133147
134   // memory regions
135   const UINT8 *m_mmu_rom;         // memory mapping ROM
136   const UINT8 *m_char_rom;        // character generator ROM
137   const UINT8 *m_hsync_prom;      // horizontal sync PROM
138   const UINT8 *m_vsync_prom;      // horizontal sync PROM
139   const UINT8 *m_line_prom;       // line address PROM
140   const UINT8 *m_attr_prom;       // character attribute PROM
141
142148   // timers
143149   emu_timer *m_pio_timer;
144150   emu_timer *m_cassette_timer;
trunk/src/mess/includes/mikromik.h
r20527r20528
4343         m_floppy0(*this, UPD765_TAG ":0:525qd"),
4444         m_floppy1(*this, UPD765_TAG ":1:525qd"),
4545         m_ram(*this, RAM_TAG),
46         m_rom(*this, I8085A_TAG),
47         m_mmu_rom(*this, "address"),
48         m_key_rom(*this, "keyboard"),
49         m_char_rom(*this, "chargen"),
4650         m_video_ram(*this, "video_ram"),
4751         m_y0(*this, "Y0"),
4852         m_y1(*this, "Y1"),
r20527r20528
7478   required_device<floppy_image_device> m_floppy0;
7579   required_device<floppy_image_device> m_floppy1;
7680   required_device<ram_device> m_ram;
81   required_memory_region m_rom;
82   required_memory_region m_mmu_rom;
83   required_memory_region m_key_rom;
84   required_memory_region m_char_rom;
7785   required_shared_ptr<UINT8> m_video_ram;
7886   required_ioport m_y0;
7987   required_ioport m_y1;
r20527r20528
9098   virtual void machine_start();
9199   virtual void machine_reset();
92100
93   virtual void video_start();
94101   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
95102
96103   DECLARE_READ8_MEMBER( read );
r20527r20528
115122
116123   void scan_keyboard();
117124
118   const UINT8 *m_mmu_rom;
119125   int m_a8;
120126
121127   // keyboard state
122128   int m_sense;
123129   int m_drive;
124130   UINT8 m_keydata;
125   const UINT8 *m_key_rom;
126131
127132   // video state
128   const UINT8 *m_char_rom;
129133   int m_llen;
130134
131135   // serial state
trunk/src/mess/includes/bw2.h
r20527r20528
4242         m_floppy0(*this, WD2797_TAG":0"),
4343         m_floppy1(*this, WD2797_TAG":1"),
4444         m_floppy(NULL),
45         m_rom(*this, Z80_TAG),
4546         m_y0(*this, "Y0"),
4647         m_y1(*this, "Y1"),
4748         m_y2(*this, "Y2"),
r20527r20528
6566   required_device<floppy_connector> m_floppy0;
6667   required_device<floppy_connector> m_floppy1;
6768   floppy_image_device *m_floppy;
69   required_memory_region m_rom;
6870   required_ioport m_y0;
6971   required_ioport m_y1;
7072   required_ioport m_y2;
trunk/src/mess/includes/portfoli.h
r20527r20528
3535         m_uart(*this, M82C50A_TAG),
3636         m_speaker(*this, SPEAKER_TAG),
3737         m_timer_tick(*this, TIMER_TICK_TAG),
38         m_rom(*this, M80C88A_TAG),
39         m_char_rom(*this, HD61830_TAG),
40         m_y0(*this, "Y0"),
41         m_y1(*this, "Y1"),
42         m_y2(*this, "Y2"),
43         m_y3(*this, "Y3"),
44         m_y4(*this, "Y4"),
45         m_y5(*this, "Y5"),
46         m_y6(*this, "Y6"),
47         m_y7(*this, "Y7"),
48         m_battery(*this, "BATTERY"),
3849         m_contrast(*this, "contrast")
3950   { }
4051
r20527r20528
4455   required_device<ins8250_device> m_uart;
4556   required_device<speaker_sound_device> m_speaker;
4657   required_device<timer_device> m_timer_tick;
47
58   required_memory_region m_rom;
59   required_memory_region m_char_rom;
60   required_ioport m_y0;
61   required_ioport m_y1;
62   required_ioport m_y2;
63   required_ioport m_y3;
64   required_ioport m_y4;
65   required_ioport m_y5;
66   required_ioport m_y6;
67   required_ioport m_y7;
68   required_ioport m_battery;
69   
4870   virtual void machine_start();
4971   virtual void machine_reset();
5072
trunk/src/mess/video/abc80.c
r20527r20528
4747
4848   for (int y = 0; y < 312; y++)
4949   {
50      UINT8 vsync_data = m_vsync_prom[y];
51      UINT8 l = m_line_prom[y];
50      UINT8 vsync_data = m_vsync_prom->base()[y];
51      UINT8 l = m_line_prom->base()[y];
5252      int dv = (vsync_data & ABC80_K2_DV) ? 1 : 0;
5353
5454      if (!(vsync_data & ABC80_K2_FRAME_RESET))
r20527r20528
5959
6060      for (int sx = 0; sx < 64; sx++)
6161      {
62         UINT8 hsync_data = m_hsync_prom[sx];
62         UINT8 hsync_data = m_hsync_prom->base()[sx];
6363         int dh = (hsync_data & ABC80_K5_DH) ? 1 : 0;
6464         UINT8 data = 0;
6565
r20527r20528
8989         UINT16 videoram_addr = ((r & 0x07) << 7) | (s << 3) | (c & 0x07);
9090         UINT8 videoram_data = m_latch;
9191         UINT8 attr_addr = ((dh & dv) << 7) | (videoram_data & 0x7f);
92         UINT8 attr_data = m_attr_prom[attr_addr];
92         UINT8 attr_data = m_attr_prom->base()[attr_addr];
9393
9494         int blank = (attr_data & ABC80_J3_BLANK) ? 1 : 0;
9595         int j = (attr_data & ABC80_J3_TEXT) ? 1 : 0;
r20527r20528
123123            // text mode
124124            UINT16 chargen_addr = ((videoram_data & 0x7f) * 10) + l;
125125
126            data = m_char_rom[chargen_addr];
126            data = m_char_rom->base()[chargen_addr];
127127         }
128128
129129         // shift out pixels
r20527r20528
182182   // allocate memory
183183   m_video_ram.allocate(0x400);
184184
185   // find memory regions
186   m_char_rom = memregion("chargen")->base();
187   m_hsync_prom = memregion("hsync")->base();
188   m_vsync_prom = memregion("vsync")->base();
189   m_line_prom = memregion("line")->base();
190   m_attr_prom = memregion("attr")->base();
191
192185   // register for state saving
193186   save_item(NAME(m_blink));
194187   save_item(NAME(m_latch));
trunk/src/mess/video/mikromik.c
r20527r20528
1010{
1111   mm1_state *state = device->machine().driver_data<mm1_state>();
1212
13   UINT8 romdata = state->m_char_rom[(charcode << 4) | linecount];
13   UINT8 romdata = state->m_char_rom->base()[(charcode << 4) | linecount];
1414
1515   int d0 = BIT(romdata, 0);
1616   int d7 = BIT(romdata, 7);
r20527r20528
8484
8585
8686//-------------------------------------------------
87//  VIDEO_START( mm1 )
88//-------------------------------------------------
89
90void mm1_state::video_start()
91{
92   // find memory regions
93   m_char_rom = memregion("chargen")->base();
94}
95
96
97//-------------------------------------------------
9887//  SCREEN_UPDATE_IND16( mm1 )
9988//-------------------------------------------------
10089

Previous 199869 Revisions Next


© 1997-2024 The MAME Team